1 From d6d333bf7512547ca5dab6763e989181bd705d0d Mon Sep 17 00:00:00 2001
2 From: Lars-Peter Clausen <lars@metafoo.de>
3 Date: Sat, 17 Jul 2010 11:16:29 +0000
4 Subject: [PATCH 05/23] MIPS: JZ4740: qi_lb60: Add gpio-charger device
6 Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
8 arch/mips/jz4740/board-qi_lb60.c | 24 ++++++++++++++++++++++++
9 1 files changed, 24 insertions(+), 0 deletions(-)
11 --- a/arch/mips/jz4740/board-qi_lb60.c
12 +++ b/arch/mips/jz4740/board-qi_lb60.c
14 #include <linux/spi/spi_gpio.h>
15 #include <linux/power_supply.h>
16 #include <linux/power/jz4740-battery.h>
17 +#include <linux/power/gpio-charger.h>
19 #include <asm/mach-jz4740/jz4740_fb.h>
20 #include <asm/mach-jz4740/jz4740_mmc.h>
21 @@ -396,6 +397,28 @@ static struct platform_device qi_lb60_pw
26 +static char *qi_lb60_batteries[] = {
30 +static struct gpio_charger_platform_data qi_lb60_charger_pdata = {
32 + .type = POWER_SUPPLY_TYPE_USB,
33 + .gpio = JZ_GPIO_PORTD(28),
34 + .gpio_active_low = 1,
35 + .batteries = qi_lb60_batteries,
36 + .num_batteries = ARRAY_SIZE(qi_lb60_batteries),
39 +static struct platform_device qi_lb60_charger_device = {
40 + .name = "gpio-charger",
42 + .platform_data = &qi_lb60_charger_pdata,
47 static struct platform_device *jz_platform_devices[] __initdata = {
50 @@ -410,6 +433,7 @@ static struct platform_device *jz_platfo
54 + &qi_lb60_charger_device,
57 static void __init board_gpio_setup(void)