APM emulation driver for class batteries
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.
Signed-off-by Anton Vorontsov <[email protected]>
--- 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
@@ -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
@@ -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