From dde0658050829ea79e7ebeed02c18fb7547b7b63 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 5 Oct 2009 14:58:32 +0200 Subject: Add jbt6k74 device --- arch/arm/mach-s3c2442/mach-gta02.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c index 8fa94ef405a..eb4e215f473 100644 --- a/arch/arm/mach-s3c2442/mach-gta02.c +++ b/arch/arm/mach-s3c2442/mach-gta02.c @@ -88,6 +88,7 @@ #include #include +#include #include #include @@ -672,6 +673,36 @@ static struct s3c2410_hcd_info gta02_usb_info = { }, }; +/* JBT6k74 display controller */ +static void gta02_jbt6k74_probe_completed(struct device *dev) +{ + struct pcf50633 *pcf = gta02_pcf; + /* Switch on backlight. Qi does not do it for us */ + pcf50633_reg_write(pcf, PCF50633_REG_LEDOUT, 0x01); + pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x00); + pcf50633_reg_write(pcf, PCF50633_REG_LEDDIM, 0x01); + pcf50633_reg_write(pcf, PCF50633_REG_LEDENA, 0x01); + + gta02_bl_dev.dev.parent = dev; + platform_device_register(>a02_bl_dev); +} + +const struct jbt6k74_platform_data jbt6k74_pdata = { + .probe_completed = gta02_jbt6k74_probe_completed, + .gpio_reset = GTA02_GPIO_GLAMO(4), +}; + +static struct spi_board_info gta02_spi_board_info[] = { + { + .modalias = "jbt6k74", + .platform_data = &jbt6k74_pdata, + .controller_data = (void*)GTA02_GPIO_GLAMO(12), + /* irq */ + .max_speed_hz = 100 * 1000, + .bus_num = 2, + .chip_select = 0 + }, +}; static void __init gta02_map_io(void) { @@ -698,7 +729,6 @@ static struct platform_device *gta02_devices[] __initdata = { /* These guys DO need to be children of PMU. */ static struct platform_device *gta02_devices_pmu_children[] = { - >a02_bl_dev, >a02_glamo_dev, }; @@ -750,6 +780,8 @@ static void __init gta02_machine_init(void) s3c_i2c0_set_platdata(NULL); i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs)); + spi_register_board_info(gta02_spi_board_info, + ARRAY_SIZE(gta02_spi_board_info)); platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices)); pm_power_off = gta02_poweroff; -- cgit v1.2.3