diff options
author | Matt Hsu <matt_hsu@openmoko.org> | 2009-01-08 18:51:35 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2009-01-08 18:51:35 +0000 |
commit | 9523be39af783431d7920195b8e38fd7ad0532df (patch) | |
tree | 3a0207f3b52b70b1288f38d5729d63c61bf92954 | |
parent | df0c7235850c9ce996acd3a513dd9ef35dcc5004 (diff) |
Add registeration of lp5521 device on gta03.
Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
-rw-r--r-- | arch/arm/mach-s3c6410/include/mach/om-gta03.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c6410/mach-om-gta03.c | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c6410/include/mach/om-gta03.h b/arch/arm/mach-s3c6410/include/mach/om-gta03.h index 17a07dd4c6f..7eb68055406 100644 --- a/arch/arm/mach-s3c6410/include/mach/om-gta03.h +++ b/arch/arm/mach-s3c6410/include/mach/om-gta03.h @@ -51,6 +51,8 @@ extern struct pcf50633_platform_data om_gta03_pcf_pdata; #define GTA03_GPIO_NWLAN_POWER S3C64XX_GPK(0) #define GTA03_GPIO_MODEN_ON S3C64XX_GPK(2) +#define GTA03_GPIO_LED_TRIG S3C64XX_GPK(3) +#define GTA03_GPIO_LED_EN S3C64XX_GPK(4) #define GTA03_GPIO_TP_RESET S3C64XX_GPM(0) #define GTA03_GPIO_GPS_LNA_EN S3C64XX_GPM(2) @@ -88,4 +90,6 @@ extern struct pcf50633_platform_data om_gta03_pcf_pdata; #define GTA03_IRQ_IO1 S3C_EINT(11) #define GTA03_IRQ_NONKEYWAKE S3C_EINT(12) +#define GTA03_IRQ_LED IRQ_EINT_GROUP(6, 9) + #endif /* _OM_GTA03_H */ diff --git a/arch/arm/mach-s3c6410/mach-om-gta03.c b/arch/arm/mach-s3c6410/mach-om-gta03.c index 6ff3aad10be..4ed9b41d002 100644 --- a/arch/arm/mach-s3c6410/mach-om-gta03.c +++ b/arch/arm/mach-s3c6410/mach-om-gta03.c @@ -29,6 +29,7 @@ #include <linux/fb.h> #include <linux/delay.h> #include <linux/lis302dl.h> +#include <linux/lp5521.h> #include <video/platform_lcd.h> @@ -532,6 +533,15 @@ struct pcf50633_platform_data om_gta03_pcf_pdata = { .mbc_event_callback = om_gta03_pmu_event_callback, }; +static void om_gta03_lp5521_chip_enable(int level) +{ + gpio_direction_output(GTA03_GPIO_LED_EN, level); + mdelay(500); +} + +static struct lp5521_platform_data om_gta03_lp5521_pdata = { + .ext_enable = om_gta03_lp5521_chip_enable, +}; static struct i2c_board_info om_gta03_i2c_devs[] __initdata = { { @@ -543,6 +553,11 @@ static struct i2c_board_info om_gta03_i2c_devs[] __initdata = { I2C_BOARD_INFO("pcap7200", 0x0a), .irq = GTA03_IRQ_TOUCH, }, + { + I2C_BOARD_INFO("lp5521", 0x32), + .irq = GTA03_IRQ_LED, + .platform_data = &om_gta03_lp5521_pdata, + }, }; |