aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2011-01-06 01:32:17 +0000
committerLars-Peter Clausen <lars@metafoo.de>2011-01-06 01:32:17 +0000
commit4f7abc1c7a9e564f2730041899f88567f63aada3 (patch)
tree6323c3dc79da446fa622542a1c120d2f9441d46f /target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch
parent9abe5cf11047a9590417f6baf2226e86a3a12f54 (diff)
downloadupstream-4f7abc1c7a9e564f2730041899f88567f63aada3.tar.gz
upstream-4f7abc1c7a9e564f2730041899f88567f63aada3.tar.bz2
upstream-4f7abc1c7a9e564f2730041899f88567f63aada3.zip
Add 2.6.37 support
SVN-Revision: 24914
Diffstat (limited to 'target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch')
-rw-r--r--target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch b/target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch
new file mode 100644
index 0000000000..20b4a5ec34
--- /dev/null
+++ b/target/linux/xburst/patches-2.6.37/020-qi_lb60-add-gpio-charger.patch
@@ -0,0 +1,57 @@
+From d6d333bf7512547ca5dab6763e989181bd705d0d Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Sat, 17 Jul 2010 11:16:29 +0000
+Subject: [PATCH 05/23] MIPS: JZ4740: qi_lb60: Add gpio-charger device
+
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+---
+ arch/mips/jz4740/board-qi_lb60.c | 24 ++++++++++++++++++++++++
+ 1 files changed, 24 insertions(+), 0 deletions(-)
+
+--- a/arch/mips/jz4740/board-qi_lb60.c
++++ b/arch/mips/jz4740/board-qi_lb60.c
+@@ -23,6 +23,7 @@
+ #include <linux/spi/spi_gpio.h>
+ #include <linux/power_supply.h>
+ #include <linux/power/jz4740-battery.h>
++#include <linux/power/gpio-charger.h>
+
+ #include <asm/mach-jz4740/jz4740_fb.h>
+ #include <asm/mach-jz4740/jz4740_mmc.h>
+@@ -396,6 +397,28 @@ static struct platform_device qi_lb60_pw
+ },
+ };
+
++/* 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,
++ .batteries = qi_lb60_batteries,
++ .num_batteries = 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_platfo
+ &jz4740_adc_device,
+ &qi_lb60_gpio_keys,
+ &qi_lb60_pwm_beeper,
++ &qi_lb60_charger_device,
+ };
+
+ static void __init board_gpio_setup(void)