ARM: pxa: add gpio-charger configuration on poodle
Subsystems (3)
PATCH 1/3 ARM: pxa: add gpio-charger configuration on poodle
Add declration of gpio-charger device for Sharp SL-5600 poodle device.
--- arch/arm/mach-pxa/poodle.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm/mach-pxa/poodle.c +20 -0
@@ -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[] = {
Signature · 1 line
2.1.4
PATCH 2/3 ARM: pxa: poodle: add gpio-keys configuration
Support setting wakeup sources through the two gpio keys - On button and 'Sync' key present on cradle.
--- arch/arm/mach-pxa/poodle.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/mach-pxa/poodle.c +35 -0
@@ -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,
Signature · 1 line
2.1.4
PATCH 3/3 ARM: pxa: declare battery device on poodle
In reply to Dmitry Eremin-SolenikovDeclare a battery platform device for SL-5600 (poodle) platform.
--- arch/arm/mach-pxa/poodle.c | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/mach-pxa/poodle.c +6 -0
@@ -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[] = {
Signature · 1 line
2.1.4
Robert Jarzmik
maintainerPATCH 3/3 ARM: pxa: declare battery device on poodle
Quoted 1 line · Dmitry Eremin-Solenikov
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
PATCH 3/3 ARM: pxa: declare battery device on poodle
2015-04-03 22:29 GMT+03:00 Robert Jarzmik <[email protected]>:
Quoted 4 lines
Quoted 1 line · Dmitry Eremin-Solenikov
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
Signature · 2 lines
With best wishes Dmitry
Robert Jarzmik
maintainerPATCH 1/3 ARM: pxa: add gpio-charger configuration on poodle
In reply to Dmitry Eremin-SolenikovQuoted 1 line · Dmitry Eremin-Solenikov
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
PATCH 1/3 ARM: pxa: add gpio-charger configuration on poodle
2015-04-03 22:16 GMT+03:00 Robert Jarzmik <[email protected]>:
Quoted 8 lines
Quoted 1 line · Dmitry Eremin-Solenikov
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.
Quoted 1 line
- 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.
Signature · 2 lines
With best wishes Dmitry
Robert Jarzmik
maintainerPATCH 1/3 ARM: pxa: add gpio-charger configuration on poodle
Quoted 10 lines · Dmitry Eremin-Solenikov
2015-04-03 22:16 GMT+03:00 Robert Jarzmik <[email protected]>:
Quoted 8 lines
Quoted 1 line · Dmitry Eremin-Solenikov
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) ?
Quoted 6 lines
I'll add it to v2.
Quoted 1 line
- 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.
Signature · 1 line
Robert