Skip to contentSkip to conversation

goldfish: power device

PATCH RESEND Applied Alan Cox 2 participants 2 messages Jan 25, 2013 – Feb 3, 2013

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH RESEND 1/1 goldfish: power device

From: Mike Lockwood <[email protected]>

Add the emulated power driver for the Goldfish platform.

This folds together the code from the Google tree, Jun Nakajima's cleanups and x86 porting work, and then a tidy up to pass checkpatch.

[cleanup and x86 support]
[ported to 3.4]
[ported to 3.7 and final tidy]

---

 drivers/power/Kconfig            |    8 +
 drivers/power/Makefile           |    1 
 drivers/power/goldfish_battery.c |  234 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 242 insertions(+), 1 deletion(-)
 create mode 100644 drivers/power/goldfish_battery.c
drivers/power/Kconfig +7 -1
index 9f45e2f..0c5208d 100644
@@ -346,8 +346,14 @@ config AB8500_BM
 	help
 	  Say Y to include support for AB8500 battery management.
 
-source "drivers/power/reset/Kconfig"
+config BATTERY_GOLDFISH
+	tristate "Goldfish battery driver"
+	depends on GOLDFISH
+	help
+	  Say Y to enable support for the battery and AC power in the
+	  Goldfish emulator.
 
+source "drivers/power/reset/Kconfig"
 endif # POWER_SUPPLY
 
 source "drivers/power/avs/Kconfig"
drivers/power/Makefile +1 -0
index b11e0c7..a9f5c06 100644
@@ -20,6 +20,7 @@ obj-$(CONFIG_BATTERY_DS2760)	+= ds2760_battery.o
 obj-$(CONFIG_BATTERY_DS2780)	+= ds2780_battery.o
 obj-$(CONFIG_BATTERY_DS2781)	+= ds2781_battery.o
 obj-$(CONFIG_BATTERY_DS2782)	+= ds2782_battery.o
+obj-$(CONFIG_BATTERY_GOLDFISH)	+= goldfish_battery.o
 obj-$(CONFIG_BATTERY_PMU)	+= pmu_battery.o
 obj-$(CONFIG_BATTERY_OLPC)	+= olpc_battery.o
 obj-$(CONFIG_BATTERY_TOSA)	+= tosa_battery.o
drivers/power/goldfish_battery.c new file +234 -0

234 lines not on this page · raw message

#1 lore raw
Quoted 7 lines · Alan Cox

From: Mike Lockwood <[email protected]>

Add the emulated power driver for the Goldfish platform.

This folds together the code from the Google tree, Jun Nakajima's cleanups and x86 porting work, and then a tidy up to pass checkpatch.

Quoted 11 lines
[cleanup and x86 support]
[ported to 3.4]
[ported to 3.7 and final tidy]

Applied, thank you!