PXA: Reworked spitz-battery
Subsystems (3)
PATCH v3 1/1 PXA: Reworked spitz-battery
Signed-off-by Marek Vasut <[email protected]>
--- arch/arm/mach-pxa/Makefile | 2 +- arch/arm/mach-pxa/spitz.c | 23 ++ drivers/power/Kconfig | 7 + drivers/power/Makefile | 1 + drivers/power/spitz_battery.c | 547 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 579 insertions(+), 1 deletions(-) create mode 100644 drivers/power/spitz_battery.c
arch/arm/mach-pxa/Makefile +1 -1
@@ -82,7 +82,7 @@ obj-$(CONFIG_MACH_PALMZ72) += palmz72.o obj-$(CONFIG_MACH_PALMLD) += palmld.o obj-$(CONFIG_PALM_TREO) += palmtreo.o obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o -obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o +obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o obj-$(CONFIG_MACH_POODLE) += poodle.o obj-$(CONFIG_MACH_TOSA) += tosa.o obj-$(CONFIG_MACH_ICONTROL) += icontrol.o mxm8x10.o
arch/arm/mach-pxa/spitz.c +23 -0
@@ -683,6 +683,28 @@ static inline void spitz_irda_init(void) {}#endif /****************************************************************************** +* Battery +******************************************************************************/ +//#if defined(CONFIG_PXA_FICP) || defined(CONFIG_PXA_FICP_MODULE) +static struct platform_device spitz_batt_device = { + .name ="spitz-battery" , + .id =-1 , +// .dev = { +// .platform_data = &spitz_gpio_keys_platform_data, +// }, +}; + +static void __init spitz_batt_init (void ) +{ +printk ("%s[%i]\n" , __FUNCTION__, __LINE__); +platform_device_register (&spitz_batt_device); +printk ("%s[%i]\n" , __FUNCTION__, __LINE__); +} +//#else +//static inline void spitz_batt_init(void) {} +//#endif + +/****************************************************************************** * Framebuffer ******************************************************************************/ #if defined(CONFIG_FB_PXA ) || defined(CONFIG_FB_PXA_MODULE )
@@ -966,6 +988,7 @@ static void __init spitz_init(void)spitz_nor_init ();spitz_nand_init ();spitz_i2c_init (); +spitz_batt_init (); } static void __init spitz_fixup(struct machine_desc *desc,
drivers/power/Kconfig +7 -0
@@ -136,6 +136,13 @@ config BATTERY_Z2 help Say Y to include support for the battery on the Zipit Z2. +config BATTERY_SPITZ + tristate "Sharp Spitz/Akita/Borzoi battery driver" + depends on SENSORS_MAX1111 && (MACH_AKITA || MACH_SPITZ || MACH_BORZOI) + help + Say Y to include support for the battery in the + Sharp Spitz/Akita/Borzoi. + config CHARGER_PCF50633 tristate "NXP PCF50633 MBC" depends on MFD_PCF50633
drivers/power/Makefile +1 -0
@@ -33,4 +33,5 @@ obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o obj-$(CONFIG_BATTERY_DA9030) += da9030_battery.o obj-$(CONFIG_BATTERY_MAX17040) += max17040_battery.o obj-$(CONFIG_BATTERY_Z2) += z2_battery.o +obj-$(CONFIG_BATTERY_SPITZ) += spitz_battery.o obj-$(CONFIG_CHARGER_PCF50633) += pcf50633-charger.o
drivers/power/spitz_battery.c new file +547 -0
547 lines not on this page · raw message
Signature · 1 line
1.7.1