APM emulation driver for class batteries
PATCH 5/8 APM emulation driver for class batteries
Signed-off-by Anton Vorontsov <[email protected]>
--- drivers/power/Kconfig | 7 ++ drivers/power/Makefile | 1 + drivers/power/apm_power.c | 249 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+), 0 deletions(-) create mode 100644 drivers/power/apm_power.c
drivers/power/Kconfig +7 -0
@@ -21,4 +21,11 @@ config PDA_POWER one or two external power supplies (AC/USB) connected to main and backup batteries, and optional builtin charger. +config APM_POWER + tristate "APM emulation for class batteries" + depends on APM_EMULATION + help + Say Y here to enable support APM status emulation using + battery class devices. + endif # POWER_SUPPLY
drivers/power/Makefile +1 -0
@@ -15,3 +15,4 @@ endif obj-$(CONFIG_POWER_SUPPLY) += power_supply.o obj-$(CONFIG_PDA_POWER) += pda_power.o +obj-$(CONFIG_APM_POWER) += apm_power.o
drivers/power/apm_power.c new file +249 -0
249 lines not on this page · raw message
Signature · 1 line
1.5.1.1-dirty
Hi!
drivers/power/apm_power.c line 18
Quoted 12 lines
Signed-off-by Anton Vorontsov <[email protected]>--- drivers/power/Kconfig | 7 ++ drivers/power/Makefile | 1 + drivers/power/apm_power.c | 249 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+), 0 deletions(-) create mode 100644 drivers/power/apm_power.cdrivers/power/apm_power.c new file +3
-0+#ifdef current +#undef current/* it expands to get_current() */ +#endif
Uff, now that's a dirty hack. Can you rename your variables? current -> I?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 11 lines · Pavel Machek
Hi!
Quoted 8 lines
Signed-off-by Anton Vorontsov <[email protected]>--- drivers/power/Kconfig | 7 ++ drivers/power/Makefile | 1 + drivers/power/apm_power.c | 249 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 257 insertions(+), 0 deletions(-) create mode 100644 drivers/power/apm_power.c
Quoted 6 lines
drivers/power/apm_power.c line 18
Quoted 3 lines
drivers/power/apm_power.c new file +3
-0+#ifdef current +#undef current/* it expands to get_current() */ +#endif Uff, now that's a dirty hack. Can you rename your variables? current -> I?
Thanks, will try to cook something.
Quoted 5 lines
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Signature · 4 lines
Anton Vorontsov email: [email protected] backup email: [email protected] irc://irc.freenode.org/bd2