summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_cmbat.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow non-privilaged user to retrive battery or AC line information.takawata2003-02-151-0/+5
| | | | Reviewed by: rwatson
* Add status initialization code for acpi_cmbat and acpi_acad,iwasaki2002-11-031-6/+83
| | | | | | | | acpi_cmbat_init_battery() and acpi_cmbat_init_acline() respectively. Call acpi_cmbat_init_battery() from acpi_cmbat_resume() too just in case. This is a workaround for embedded controller operations which is unstable for about a minute (typically 30 or 40 sec.) at boot time.
* Use the _STA method of a battery control method to see if a battery isjhb2002-08-211-10/+16
| | | | | | present or not. My laptop now properly notices when a battery is removed. Reviewed by: iwasaki
* Add NULL check for the output buffer from AcpiEvaluateObject().iwasaki2002-07-231-2/+2
| | | | Submitted by: jon
* Do not concatenate __func__ with strings, because it is not a string.peter2002-03-121-2/+2
| | | | Later gcc's blow up on this.
* Match namespace cleanup changes in ACPI CA 20020217 update.msmith2002-02-231-34/+15
| | | | | | | | | | | Use ACPI_SUCCESS/ACPI_FAILURE consistently. The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER. Kill off the timeouts that used to read _BIF and _BST. These are invoked when the battery is actually read. timeout() is dangerous in combination with ACPI, as the interpreter can block. This driver still needs more work.
* Add OS layer ACPI mutex and threading support.iwasaki2001-12-221-64/+19
| | | | | | | | | | | | | | | | | | - Temporary fix a bug of Intel ACPI CA core code. - Add OS layer ACPI mutex support. This can be disabled by specifying option ACPI_NO_SEMAPHORES. - Add ACPI threading support. Now that we have a dedicate taskqueue for ACPI tasks and more ACPI task threads can be created by specifying option ACPI_MAX_THREADS. - Change acpi_EvaluateIntoBuffer() behavior slightly to reuse given caller's buffer unless AE_BUFFER_OVERFLOW occurs. Also CM battery's evaluations were changed to use acpi_EvaluateIntoBuffer(). - Add new utility function acpi_ConvertBufferToInteger(). - Add simple locking for CM battery and temperature updating. - Fix a minor problem on EC locking. - Make the thermal zone polling rate to be changeable. - Change minor things on AcpiOsSignal(); in ACPI_SIGNAL_FATAL case, entering Debugger is easier to investigate the problem rather than panic.
* Add disabling code via the debug.acpi.disable environment variable.iwasaki2001-11-221-0/+1
|
* Cleanups of verbose printing. All the messages for the debugging isiwasaki2001-11-181-21/+20
| | | | | | | disabled unless verbose flag is set. Also fix some messages in terms of English. The critical messages and error messages in probe/attach routine are unchanged by this commit.
* Oops, deleted wrong BIF acquisition timeout invocation by mistakeiwasaki2001-11-011-1/+1
| | | | | | in my previous commit. acpi_cmbat_get_bif() from taskqueue calls acpi_cmbat_timeout() so it's better for startup.
* Style(9) fix, mainly white spaces.iwasaki2001-10-301-85/+102
|
* Some improvements of control method battery driver.iwasaki2001-10-301-23/+43
| | | | | | | | | | | | | - Add a new MIB for battery info expire time in order to make it changeable. Battery info expire time can be specified by hw.acpi.battery.info_expire in sec. - Add own MALLOC type and fix some potential memory leakages. - Change some frequent printings to verbose printing. - Stop timeout during acpi_cmbat_get_bst() too. This should reduce the races with BIF evaluation. - Remove acpi_cmbat_get_bif() invocation from acpi_cmbat_attach(). This was redundant because this should be called from acpi_cmbat_timeout() now.
* Reduce frequency of Battery info (_BIF) acquisition. This helpsiwasaki2001-10-221-6/+38
| | | | | | | | | avoiding EC read errors on some laptops. - Stop updating Battery info for all user requests - Update Battery info by notify events and resume method - Poll Battery info every one minute Suggested by: takawata
* Reset timestamps of battery info. and status by thier notify handler.iwasaki2001-06-241-10/+13
| | | | Suggested by: takawata
* Add sysctl interface (Read-only) for temprature, AC-line and Battery.iwasaki2001-06-231-48/+302
| | | | Patches for acpi_cmbat.c submitted by Munehiro Matsuda.
* - Updates for new constant naming in the ACPI CA 20010518 update.msmith2001-05-291-0/+6
| | | | | | | | | | | - Use __func__ instead of __FUNCTION. - Support power-off to S3 or S5 (takawata) - Enable ACPI debugging earlier (with a sysinit) - Fix a deadlock in the EC code (takawata) - Improve arithmetic and reduce the risk of spurious wakeup in AcpiOsSleep. - Add AcpiOsGetThreadId. - Simplify mutex code (still disabled).
* When ensuring the destination buffer is truncated for a string obtainedjhb2001-02-261-1/+1
| | | | | | | from a BIF, use the size of the destinatino buffer, not the length of the string to determine where to put the nul char. As a side effect, the old code would truncate the string by one character while it was possibly overflowing the buffer.
* ACPI_NUMBER becomes ACPI_INTEGER. acpi_EvaluateNumber becomesmsmith2001-01-311-2/+2
| | | | | | | | | | | acpi_EvaluateInteger. Use acpi_EvaluateInteger instead of doing things the hard way where possible. AcpiSetSystemSleepState (unofficial) becomes AcpiEnterSleepState. Use the AcpiGbl_FADT pointer rather than searching for the FADT.
* Add ioctls to acpi_cmbat and acpi_acad. These use mike's acpi_register_ioctl().iwasaki2000-12-241-4/+88
| | | | Fix wrong AML method calling in acpi_cmbat.
* Add ACPI AC adaptor and ACPI Control Method Battery.takawata2000-12-221-0/+275
And install notify handler for thermal zone .
OpenPOWER on IntegriCloud