Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Oct 2005 00:16:41 +0000 (UTC)
From:      Nate Lawson <njl@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/acpica acpi_battery.c acpiio.h
Message-ID:  <200510230016.j9N0GfWa046658@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
njl         2005-10-23 00:16:41 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/acpica       acpi_battery.c acpiio.h 
  Log:
  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>
  
  Revision  Changes    Path
  1.20      +120 -29   src/sys/dev/acpica/acpi_battery.c
  1.16      +4 -1      src/sys/dev/acpica/acpiio.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510230016.j9N0GfWa046658>