* [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle
@ 2015-03-30 10:39 Dmitry Eremin-Solenikov
2015-03-30 10:39 ` [PATCH 2/3] ARM: pxa: poodle: add gpio-keys configuration Dmitry Eremin-Solenikov
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Dmitry Eremin-Solenikov @ 2015-03-30 10:39 UTC (permalink / raw)
To: linux-arm-kernel
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[] = {
--
2.1.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/3] ARM: pxa: poodle: add gpio-keys configuration 2015-03-30 10:39 [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle Dmitry Eremin-Solenikov @ 2015-03-30 10:39 ` Dmitry Eremin-Solenikov 2015-03-30 10:39 ` [PATCH 3/3] ARM: pxa: declare battery device on poodle Dmitry Eremin-Solenikov 2015-04-03 19:16 ` [PATCH 1/3] ARM: pxa: add gpio-charger configuration " Robert Jarzmik 2 siblings, 0 replies; 8+ messages in thread From: Dmitry Eremin-Solenikov @ 2015-03-30 10:39 UTC (permalink / raw) To: linux-arm-kernel Support setting wakeup sources through the two gpio keys - On button and 'Sync' key present on cradle. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> --- arch/arm/mach-pxa/poodle.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 4dd29a7..596e756 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -35,6 +35,8 @@ #include <linux/memblock.h> #include <linux/iio/machine.h> #include <linux/mfd/locomo.h> +#include <linux/gpio_keys.h> +#include <linux/input.h> #include <mach/hardware.h> #include <asm/mach-types.h> @@ -161,6 +163,38 @@ static struct scoop_pcmcia_config poodle_pcmcia_config = { EXPORT_SYMBOL(poodle_scoop_device); +static struct gpio_keys_button poodle_gpio_keys[] = { + { + .type = EV_PWR, + .code = KEY_RESERVED, + .gpio = POODLE_GPIO_ON_KEY, + .desc = "On key", + .wakeup = 1, + .active_low = 1, + }, + { + .type = EV_PWR, + .code = KEY_WAKEUP, + .gpio = POODLE_GPIO_WAKEUP, + .desc = "Sync", + .wakeup = 1, + .active_low = 1, + }, +}; + +static struct gpio_keys_platform_data poodle_gpio_keys_data = { + .buttons = poodle_gpio_keys, + .nbuttons = ARRAY_SIZE(poodle_gpio_keys), +}; + +static struct platform_device poodle_gpio_keys_device = { + .name = "gpio-keys", + .id = -1, + .dev = { + .platform_data = &poodle_gpio_keys_data, + }, +}; + static struct platform_device poodle_audio_device = { .name = "poodle-audio", @@ -436,6 +470,7 @@ static struct platform_device *devices[] __initdata = { &poodle_locomo_device, &poodle_scoop_device, &poodle_audio_device, + &poodle_gpio_keys_device, &sharpsl_nand_device, &sharpsl_rom_device, &poodle_power_device, -- 2.1.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] ARM: pxa: declare battery device on poodle 2015-03-30 10:39 [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle Dmitry Eremin-Solenikov 2015-03-30 10:39 ` [PATCH 2/3] ARM: pxa: poodle: add gpio-keys configuration Dmitry Eremin-Solenikov @ 2015-03-30 10:39 ` Dmitry Eremin-Solenikov 2015-04-03 19:29 ` Robert Jarzmik 2015-04-03 19:16 ` [PATCH 1/3] ARM: pxa: add gpio-charger configuration " Robert Jarzmik 2 siblings, 1 reply; 8+ messages in thread From: Dmitry Eremin-Solenikov @ 2015-03-30 10:39 UTC (permalink / raw) To: linux-arm-kernel Declare a battery platform device for SL-5600 (poodle) platform. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> --- arch/arm/mach-pxa/poodle.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 596e756..90d679a 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c @@ -466,6 +466,11 @@ static struct platform_device poodle_power_device = { .dev.platform_data = &poodle_power_data, }; +static struct platform_device poodle_battery_device = { + .name = "poodle-battery", + .id = -1, +}; + static struct platform_device *devices[] __initdata = { &poodle_locomo_device, &poodle_scoop_device, @@ -474,6 +479,7 @@ static struct platform_device *devices[] __initdata = { &sharpsl_nand_device, &sharpsl_rom_device, &poodle_power_device, + &poodle_battery_device, }; static struct i2c_board_info __initdata poodle_i2c_devices[] = { -- 2.1.4 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] ARM: pxa: declare battery device on poodle 2015-03-30 10:39 ` [PATCH 3/3] ARM: pxa: declare battery device on poodle Dmitry Eremin-Solenikov @ 2015-04-03 19:29 ` Robert Jarzmik 2015-04-03 19:32 ` Dmitry Eremin-Solenikov 0 siblings, 1 reply; 8+ messages in thread From: Robert Jarzmik @ 2015-04-03 19:29 UTC (permalink / raw) To: linux-arm-kernel Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> writes: > Declare a battery platform device for SL-5600 (poodle) platform. Why ? Is there a driver for it ? I didn't found any in driver/power. Cheers. -- Robert ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] ARM: pxa: declare battery device on poodle 2015-04-03 19:29 ` Robert Jarzmik @ 2015-04-03 19:32 ` Dmitry Eremin-Solenikov 0 siblings, 0 replies; 8+ messages in thread From: Dmitry Eremin-Solenikov @ 2015-04-03 19:32 UTC (permalink / raw) To: linux-arm-kernel 2015-04-03 22:29 GMT+03:00 Robert Jarzmik <robert.jarzmik@free.fr>: > Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> writes: > >> Declare a battery platform device for SL-5600 (poodle) platform. > Why ? Is there a driver for it ? I didn't found any in driver/power. Due to my error it was submitted separately from these patches. http://thread.gmane.org/gmane.linux.power-management.general/58546 -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle 2015-03-30 10:39 [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle Dmitry Eremin-Solenikov 2015-03-30 10:39 ` [PATCH 2/3] ARM: pxa: poodle: add gpio-keys configuration Dmitry Eremin-Solenikov 2015-03-30 10:39 ` [PATCH 3/3] ARM: pxa: declare battery device on poodle Dmitry Eremin-Solenikov @ 2015-04-03 19:16 ` Robert Jarzmik 2015-04-03 19:23 ` Dmitry Eremin-Solenikov 2 siblings, 1 reply; 8+ messages in thread From: Robert Jarzmik @ 2015-04-03 19:16 UTC (permalink / raw) To: linux-arm-kernel Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> writes: > Add declration of gpio-charger device for Sharp SL-5600 poodle device. Typo here ^. And I'd like in the commit message to know : - is it the main battery charger (I could look into the code, I know, but I'd like it to be in the commit message anyway) ? - was it successfully tested on Sharp SL-5600 ? Cheers. -- Robert ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle 2015-04-03 19:16 ` [PATCH 1/3] ARM: pxa: add gpio-charger configuration " Robert Jarzmik @ 2015-04-03 19:23 ` Dmitry Eremin-Solenikov 2015-06-19 18:43 ` Robert Jarzmik 0 siblings, 1 reply; 8+ messages in thread From: Dmitry Eremin-Solenikov @ 2015-04-03 19:23 UTC (permalink / raw) To: linux-arm-kernel 2015-04-03 22:16 GMT+03:00 Robert Jarzmik <robert.jarzmik@free.fr>: > Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> writes: > >> Add declration of gpio-charger device for Sharp SL-5600 poodle device. > Typo here ^. > > And I'd like in the commit message to know : > - is it the main battery charger (I could look into the code, I know, but I'd > like it to be in the commit message anyway) ? I'll add it to v2. > - was it successfully tested on Sharp SL-5600 ? :)) I wouldn't dare to submit a code that wasn't tested on hw w/o special notice. -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle 2015-04-03 19:23 ` Dmitry Eremin-Solenikov @ 2015-06-19 18:43 ` Robert Jarzmik 0 siblings, 0 replies; 8+ messages in thread From: Robert Jarzmik @ 2015-06-19 18:43 UTC (permalink / raw) To: linux-arm-kernel Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> writes: > 2015-04-03 22:16 GMT+03:00 Robert Jarzmik <robert.jarzmik@free.fr>: >> Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> writes: >> >>> Add declration of gpio-charger device for Sharp SL-5600 poodle device. >> Typo here ^. >> >> And I'd like in the commit message to know : >> - is it the main battery charger (I could look into the code, I know, but I'd >> like it to be in the commit message anyway) ? > > I'll add it to v2. > >> - was it successfully tested on Sharp SL-5600 ? > > :)) I wouldn't dare to submit a code that wasn't tested on hw w/o > special notice. Hi Dmitry, I'll drop that from my radar, I didn't see any update lately. Once the poodle battery driver is accepted and once you provide an update on these patches, I'll come back to these patches. Cheers. -- Robert ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-19 18:43 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-30 10:39 [PATCH 1/3] ARM: pxa: add gpio-charger configuration on poodle Dmitry Eremin-Solenikov 2015-03-30 10:39 ` [PATCH 2/3] ARM: pxa: poodle: add gpio-keys configuration Dmitry Eremin-Solenikov 2015-03-30 10:39 ` [PATCH 3/3] ARM: pxa: declare battery device on poodle Dmitry Eremin-Solenikov 2015-04-03 19:29 ` Robert Jarzmik 2015-04-03 19:32 ` Dmitry Eremin-Solenikov 2015-04-03 19:16 ` [PATCH 1/3] ARM: pxa: add gpio-charger configuration " Robert Jarzmik 2015-04-03 19:23 ` Dmitry Eremin-Solenikov 2015-06-19 18:43 ` Robert Jarzmik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).