diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2009-10-14 03:20:24 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-11-30 20:03:10 -0500 |
commit | 9c017ca1a0782ccfe26bfb36f03a9ba09370d7f7 (patch) | |
tree | 10616479613b03ac535a07fe5dd42ba32e5878e3 /arch | |
parent | edaa64c906f1e977396d0bd868079ee632583149 (diff) |
[ARM] pxa/cm-x300: add da9030 support
Register DA9030 PMIC. Use only backlight sub-device for now.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/cm-x300.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 2142fe74666c..8aedc60aaa65 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/i2c/pca953x.h> | 28 | #include <linux/i2c/pca953x.h> |
29 | 29 | ||
30 | #include <linux/mfd/da903x.h> | ||
31 | |||
30 | #include <linux/spi/spi.h> | 32 | #include <linux/spi/spi.h> |
31 | #include <linux/spi/spi_gpio.h> | 33 | #include <linux/spi/spi_gpio.h> |
32 | #include <linux/spi/tdo24m.h> | 34 | #include <linux/spi/tdo24m.h> |
@@ -552,6 +554,35 @@ static void __init cm_x300_init_rtc(void) | |||
552 | static inline void cm_x300_init_rtc(void) {} | 554 | static inline void cm_x300_init_rtc(void) {} |
553 | #endif | 555 | #endif |
554 | 556 | ||
557 | /* DA9030 */ | ||
558 | struct da903x_subdev_info cm_x300_da9030_subdevs[] = { | ||
559 | { | ||
560 | .name = "da903x-backlight", | ||
561 | .id = DA9030_ID_WLED, | ||
562 | } | ||
563 | }; | ||
564 | |||
565 | static struct da903x_platform_data cm_x300_da9030_info = { | ||
566 | .num_subdevs = ARRAY_SIZE(cm_x300_da9030_subdevs), | ||
567 | .subdevs = cm_x300_da9030_subdevs, | ||
568 | }; | ||
569 | |||
570 | static struct i2c_board_info cm_x300_pmic_info = { | ||
571 | I2C_BOARD_INFO("da9030", 0x49), | ||
572 | .irq = IRQ_GPIO(0), | ||
573 | .platform_data = &cm_x300_da9030_info, | ||
574 | }; | ||
575 | |||
576 | static struct i2c_pxa_platform_data cm_x300_pwr_i2c_info = { | ||
577 | .use_pio = 1, | ||
578 | }; | ||
579 | |||
580 | static void __init cm_x300_init_da9030(void) | ||
581 | { | ||
582 | pxa3xx_set_i2c_power_info(&cm_x300_pwr_i2c_info); | ||
583 | i2c_register_board_info(1, &cm_x300_pmic_info, 1); | ||
584 | } | ||
585 | |||
555 | static void __init cm_x300_init_wi2wi(void) | 586 | static void __init cm_x300_init_wi2wi(void) |
556 | { | 587 | { |
557 | int bt_reset, wlan_en; | 588 | int bt_reset, wlan_en; |
@@ -610,6 +641,7 @@ static void __init cm_x300_init(void) | |||
610 | pxa_set_btuart_info(NULL); | 641 | pxa_set_btuart_info(NULL); |
611 | pxa_set_stuart_info(NULL); | 642 | pxa_set_stuart_info(NULL); |
612 | 643 | ||
644 | cm_x300_init_da9030(); | ||
613 | cm_x300_init_dm9000(); | 645 | cm_x300_init_dm9000(); |
614 | cm_x300_init_lcd(); | 646 | cm_x300_init_lcd(); |
615 | cm_x300_init_ohci(); | 647 | cm_x300_init_ohci(); |