From b774a5e990d9719e4fe7dfb98457e40443b72c58 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 8 Feb 2011 03:43:53 +0100 Subject: [PATCH] --- yaml --- r: 242477 b: refs/heads/master c: 0b4cf1813f54d708b18c639260fc13dc3d922e96 h: refs/heads/master i: 242475: 0686a49374d221d1c58e55c494c4a5890493205a v: v3 --- [refs] | 2 +- trunk/arch/mips/jz4740/board-qi_lb60.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5ba59372ebb7..e1c9b1d07645 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1bbf28756149a0aa0e3c8a74cea9bbe715639027 +refs/heads/master: 0b4cf1813f54d708b18c639260fc13dc3d922e96 diff --git a/trunk/arch/mips/jz4740/board-qi_lb60.c b/trunk/arch/mips/jz4740/board-qi_lb60.c index 2c0e107966ad..ed8d66b4b03f 100644 --- a/trunk/arch/mips/jz4740/board-qi_lb60.c +++ b/trunk/arch/mips/jz4740/board-qi_lb60.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -396,6 +397,28 @@ static struct platform_device qi_lb60_pwm_beeper = { }, }; +/* charger */ +static char *qi_lb60_batteries[] = { + "battery", +}; + +static struct gpio_charger_platform_data qi_lb60_charger_pdata = { + .name = "usb", + .type = POWER_SUPPLY_TYPE_USB, + .gpio = JZ_GPIO_PORTD(28), + .gpio_active_low = 1, + .supplied_to = qi_lb60_batteries, + .num_supplicants = ARRAY_SIZE(qi_lb60_batteries), +}; + +static struct platform_device qi_lb60_charger_device = { + .name = "gpio-charger", + .dev = { + .platform_data = &qi_lb60_charger_pdata, + }, +}; + + static struct platform_device *jz_platform_devices[] __initdata = { &jz4740_udc_device, &jz4740_mmc_device, @@ -410,6 +433,7 @@ static struct platform_device *jz_platform_devices[] __initdata = { &jz4740_adc_device, &qi_lb60_gpio_keys, &qi_lb60_pwm_beeper, + &qi_lb60_charger_device, }; static void __init board_gpio_setup(void)