aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-handheld-4.0/poodle/0001-ARM-pxa-add-gpio-charger-configuration-on-poodle.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-handheld-4.0/poodle/0001-ARM-pxa-add-gpio-charger-configuration-on-poodle.patch')
-rw-r--r--recipes-kernel/linux/linux-handheld-4.0/poodle/0001-ARM-pxa-add-gpio-charger-configuration-on-poodle.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-handheld-4.0/poodle/0001-ARM-pxa-add-gpio-charger-configuration-on-poodle.patch b/recipes-kernel/linux/linux-handheld-4.0/poodle/0001-ARM-pxa-add-gpio-charger-configuration-on-poodle.patch
new file mode 100644
index 0000000..0733967
--- /dev/null
+++ b/recipes-kernel/linux/linux-handheld-4.0/poodle/0001-ARM-pxa-add-gpio-charger-configuration-on-poodle.patch
@@ -0,0 +1,59 @@
+From 326abbbaca8943824dd72a8db3e9ed907a7fca5f Mon Sep 17 00:00:00 2001
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Date: Tue, 2 Dec 2014 20:20:40 +0300
+Subject: [PATCH 01/04] ARM: pxa: add gpio-charger configuration on poodle
+
+Add declration of gpio-charger device for Sharp SL-5600 poodle device.
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/poodle.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
+index 6002112..4dd29a7 100644
+--- a/arch/arm/mach-pxa/poodle.c
++++ b/arch/arm/mach-pxa/poodle.c
+@@ -31,6 +31,7 @@
+ #include <linux/spi/ads7846.h>
+ #include <linux/spi/pxa2xx_spi.h>
+ #include <linux/mtd/sharpsl.h>
++#include <linux/power/gpio-charger.h>
+ #include <linux/memblock.h>
+ #include <linux/iio/machine.h>
+ #include <linux/mfd/locomo.h>
+@@ -413,12 +414,31 @@ static struct platform_device sharpsl_rom_device = {
+ .dev.platform_data = &sharpsl_rom_data,
+ };
+
++static char *poodle_ac_supplied_to[] = {
++ "main-battery",
++};
++
++static struct gpio_charger_platform_data poodle_power_data = {
++ .name = "charger",
++ .type = POWER_SUPPLY_TYPE_MAINS,
++ .gpio = POODLE_GPIO_AC_IN,
++ .supplied_to = poodle_ac_supplied_to,
++ .num_supplicants = ARRAY_SIZE(poodle_ac_supplied_to),
++};
++
++static struct platform_device poodle_power_device = {
++ .name = "gpio-charger",
++ .id = -1,
++ .dev.platform_data = &poodle_power_data,
++};
++
+ static struct platform_device *devices[] __initdata = {
+ &poodle_locomo_device,
+ &poodle_scoop_device,
+ &poodle_audio_device,
+ &sharpsl_nand_device,
+ &sharpsl_rom_device,
++ &poodle_power_device,
+ };
+
+ static struct i2c_board_info __initdata poodle_i2c_devices[] = {
+--
+1.9.1
+