aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-27 13:12:35 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-27 13:12:35 -0400
commitea0ca3a843babd50c22dfbb5cf2d9a14df821b2b (patch)
tree0d27fc6d7b9a0a2cdfe29833eb84ee07beac91ab /arch/arm/mach-omap2
parent74e6392ca3fd445a775dd42b54d5e42cf1e706e6 (diff)
parent906649de0eacde7a643b5a0750de6207441ad54f (diff)
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: PXA: Use dev_pm_ops in z2_battery ds2760_battery: Fix rated capacity of the hx4700 1800mAh battery ds2760_battery: Fix indexing of the 4 active full EEPROM registers power: Make test_power driver more dynamic. bq27x00_battery: Name of cycle count property max8903_charger: Add GENERIC_HARDIRQS as a dependency (fixes S390 build) ARM: RX-51: Enable isp1704 power on/off isp1704_charger: Allow board specific powering routine gpio-charger: Add gpio_charger_resume power_supply: Add driver for MAX8903 charger
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c27
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 2b00f72e8e36..f6247e71a194 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>
@@ -53,6 +54,8 @@
53#define RX51_FMTX_RESET_GPIO 163 54#define RX51_FMTX_RESET_GPIO 163
54#define RX51_FMTX_IRQ 53 55#define RX51_FMTX_IRQ 53
55 56
57#define RX51_USB_TRANSCEIVER_RST_GPIO 67
58
56/* list all spi devices here */ 59/* list all spi devices here */
57enum { 60enum {
58 RX51_SPI_WL1251, 61 RX51_SPI_WL1251,
@@ -111,10 +114,30 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
111 }, 114 },
112}; 115};
113 116
117static void rx51_charger_set_power(bool on)
118{
119 gpio_set_value(RX51_USB_TRANSCEIVER_RST_GPIO, on);
120}
121
122static struct isp1704_charger_data rx51_charger_data = {
123 .set_power = rx51_charger_set_power,
124};
125
114static struct platform_device rx51_charger_device = { 126static struct platform_device rx51_charger_device = {
115 .name = "isp1704_charger", 127 .name = "isp1704_charger",
128 .dev = {
129 .platform_data = &rx51_charger_data,
130 },
116}; 131};
117 132
133static void __init rx51_charger_init(void)
134{
135 WARN_ON(gpio_request_one(RX51_USB_TRANSCEIVER_RST_GPIO,
136 GPIOF_OUT_INIT_LOW, "isp1704_reset"));
137
138 platform_device_register(&rx51_charger_device);
139}
140
118#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 141#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
119 142
120#define RX51_GPIO_CAMERA_LENS_COVER 110 143#define RX51_GPIO_CAMERA_LENS_COVER 110
@@ -961,6 +984,6 @@ void __init rx51_peripherals_init(void)
961 if (partition) 984 if (partition)
962 omap2_hsmmc_init(mmc); 985 omap2_hsmmc_init(mmc);
963 986
964 platform_device_register(&rx51_charger_device); 987 rx51_charger_init();
965} 988}
966 989