diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index bbcb6775a6a3..fad98abd4844 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/gpio_keys.h> | 24 | #include <linux/gpio_keys.h> |
25 | #include <linux/mmc/host.h> | 25 | #include <linux/mmc/host.h> |
26 | #include <linux/power/isp1704_charger.h> | ||
26 | 27 | ||
27 | #include <plat/mcspi.h> | 28 | #include <plat/mcspi.h> |
28 | #include <plat/board.h> | 29 | #include <plat/board.h> |
@@ -52,6 +53,8 @@ | |||
52 | #define RX51_FMTX_RESET_GPIO 163 | 53 | #define RX51_FMTX_RESET_GPIO 163 |
53 | #define RX51_FMTX_IRQ 53 | 54 | #define RX51_FMTX_IRQ 53 |
54 | 55 | ||
56 | #define RX51_USB_TRANSCEIVER_RST_GPIO 67 | ||
57 | |||
55 | /* list all spi devices here */ | 58 | /* list all spi devices here */ |
56 | enum { | 59 | enum { |
57 | RX51_SPI_WL1251, | 60 | RX51_SPI_WL1251, |
@@ -110,10 +113,30 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { | |||
110 | }, | 113 | }, |
111 | }; | 114 | }; |
112 | 115 | ||
116 | static void rx51_charger_set_power(bool on) | ||
117 | { | ||
118 | gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on); | ||
119 | } | ||
120 | |||
121 | static struct isp1704_charger_data rx51_charger_data = { | ||
122 | .set_power = rx51_charger_set_power, | ||
123 | }; | ||
124 | |||
113 | static struct platform_device rx51_charger_device = { | 125 | static struct platform_device rx51_charger_device = { |
114 | .name = "isp1704_charger", | 126 | .name = "isp1704_charger", |
127 | .dev = { | ||
128 | .platform_data = &rx51_charger_data, | ||
129 | }, | ||
115 | }; | 130 | }; |
116 | 131 | ||
132 | static void __init rx51_charger_init(void) | ||
133 | { | ||
134 | WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO, | ||
135 | GPIOF_OUT_INIT_LOW, "isp1704_reset")); | ||
136 | |||
137 | platform_device_register(&rx51_charger_device); | ||
138 | } | ||
139 | |||
117 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 140 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
118 | 141 | ||
119 | #define RX51_GPIO_CAMERA_LENS_COVER 110 | 142 | #define RX51_GPIO_CAMERA_LENS_COVER 110 |
@@ -981,6 +1004,6 @@ void __init rx51_peripherals_init(void) | |||
981 | if (partition) | 1004 | if (partition) |
982 | omap2_hsmmc_init(mmc); | 1005 | omap2_hsmmc_init(mmc); |
983 | 1006 | ||
984 | platform_device_register(&rx51_charger_device); | 1007 | rx51_charger_init(); |
985 | } | 1008 | } |
986 | 1009 | ||