Skip to contentSkip to conversation

APM emulation driver for class batteries

PATCH In review Anton Vorontsov 2 participants 3 messages May 3, 2007 – May 7, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 5/8 APM emulation driver for class batteries

---
 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
index cc70644..791fa0c 100644
@@ -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
index 1808b69..a8fbc7e 100644
@@ -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
#1 lore raw

Hi!

drivers/power/apm_power.c line 18

Quoted 12 lines
---
 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/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
#2 lore raw
Quoted 11 lines · Pavel Machek

Hi!

Quoted 8 lines
---
 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