ARM: MX3: add support for mc13783 on lilly-db
The chip is actually located on the module, not on the base board. But other base boards might add more SPI devices, so the spi_board_info struct must be separated from the module code. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Родитель
3ea2e1a4b7
Коммит
50f349e9fc
|
@ -29,6 +29,8 @@
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/spi/spi.h>
|
||||||
|
#include <linux/mfd/mc13783.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
|
@ -202,6 +204,22 @@ static void __init mx31lilly_init_fb(void)
|
||||||
gpio_direction_output(LCD_VCC_EN_GPIO, 1);
|
gpio_direction_output(LCD_VCC_EN_GPIO, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* SPI */
|
||||||
|
|
||||||
|
static struct mc13783_platform_data mc13783_pdata __initdata = {
|
||||||
|
.flags = MC13783_USE_RTC | MC13783_USE_TOUCHSCREEN,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct spi_board_info lilly_spi_devs[] __initdata = {
|
||||||
|
{
|
||||||
|
.modalias = "mc13783",
|
||||||
|
.max_speed_hz = 1000000,
|
||||||
|
.bus_num = 1,
|
||||||
|
.chip_select = 0,
|
||||||
|
.platform_data = &mc13783_pdata,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
void __init mx31lilly_db_init(void)
|
void __init mx31lilly_db_init(void)
|
||||||
{
|
{
|
||||||
mxc_iomux_setup_multiple_pins(lilly_db_board_pins,
|
mxc_iomux_setup_multiple_pins(lilly_db_board_pins,
|
||||||
|
@ -212,5 +230,6 @@ void __init mx31lilly_db_init(void)
|
||||||
mxc_register_device(&mxc_uart_device2, &uart_pdata);
|
mxc_register_device(&mxc_uart_device2, &uart_pdata);
|
||||||
mxc_register_device(&mxcsdhc_device0, &mmc_pdata);
|
mxc_register_device(&mxcsdhc_device0, &mmc_pdata);
|
||||||
mx31lilly_init_fb();
|
mx31lilly_init_fb();
|
||||||
|
spi_register_board_info(lilly_spi_devs, ARRAY_SIZE(lilly_spi_devs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче