Skip to contentSkip to conversation

APM emulation driver for class batteries

PATCH In review Anton Vorontsov 1 participant 1 message Apr 20, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 5/7 APM emulation driver for class batteries

It's still tristate, but now on module removal it will set apm get status function to NULL, to not cause oops if two APM modules loaded/unloaded in special order.

Fixing APM API itself is another story.

---
 drivers/battery/Kconfig     |    7 ++
 drivers/battery/Makefile    |    1 +
 drivers/battery/apm_power.c |  228 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 236 insertions(+), 0 deletions(-)
 create mode 100644 drivers/battery/apm_power.c
drivers/battery/Kconfig +7 -0
index 0c14ae0..5e2dac8 100644
@@ -15,4 +15,11 @@ config BATTERY_DS2760
 	help
 	  Say Y here to enable support for batteries with ds2760 chip.
 
+config APM_POWER
+	tristate "APM emulation"
+	depends on BATTERY && APM_EMULATION
+	help
+	  Say Y here to enable support APM status emulation using
+	  battery class devices.
+
 endmenu
drivers/battery/Makefile +1 -0
index 9902513..cea5807 100644
@@ -1,2 +1,3 @@
 obj-$(CONFIG_BATTERY)              += battery.o
 obj-$(CONFIG_BATTERY_DS2760)       += ds2760_battery.o
+obj-$(CONFIG_APM_POWER)            += apm_power.o
drivers/battery/apm_power.c new file +228 -0

228 lines not on this page · raw message

Signature · 1 line
1.5.1.1-dirty