Nate Lawson 9aa72f7404 Cleanups and support code for importing smart battery support.
* Use ACPI_BATT_UNKNOWN instead of constants
* Use maxunit instead of a count of devices since we may have sparse
  battery devices in the future.  Only userland should be using unit
  numbers anyway, so provide a translation function.  (Kernel use of
  batteries should be restricted to looking up a device_t and calling
  methods directly.
* Don't check acpi_BatteryIsPresent() in acpi_battery.  Leave it up to
  the hardware-specific driver (i.e. cmbat) since smart batteries seem
  to not report the "battery present" flag.
* Convert mA to mW if the battery uses those units.  CM-batteries only
  used mW so this deficiency went unnoticed.
* Clean strings reported in the battery info from any control chars.
* Only dereference the unit from ioctl_arg if the full struct is present.
  Unit wouldn't have been used later if it wasn't present but this is
  cleaner.  Translate the unit if it's not ACPI_BATTERY_ALL_UNITS.
* bzero structs before returning them to usermode for future compat.

Most of this work was submitted by Hans Petter Selasky and then majorly
reworked by myself.

Submitted by:	Hans Petter Selasky <hselasky / c2i.net>
2005-10-23 00:16:41 +00:00
..
2005-09-22 04:51:11 +00:00
2005-10-13 08:05:21 +00:00
2005-09-16 10:09:23 +00:00
2005-09-27 16:57:44 +00:00
2005-10-18 06:09:42 +00:00
2005-10-22 07:43:20 +00:00
2005-09-20 19:50:27 +00:00
2005-10-19 00:25:39 +00:00
2005-09-11 18:39:03 +00:00
2005-09-22 05:52:54 +00:00
2005-10-11 07:30:06 +00:00
2005-09-08 14:13:36 +00:00
2005-07-29 00:20:50 +00:00
2005-09-27 09:11:44 +00:00
2005-10-07 18:11:32 +00:00
2005-09-21 22:45:14 +00:00
2005-09-22 06:01:44 +00:00
2005-09-22 05:56:32 +00:00
2005-09-22 06:01:44 +00:00
2005-09-21 22:45:14 +00:00
2005-10-03 15:47:15 +00:00
2005-10-06 08:30:40 +00:00