aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbs.c
Commit message (Collapse)AuthorAge
* ACPI: SBS: Host controller must initialize before SBS.Alexey Starikovskiy2008-02-09
| | | | | | | | | | In static case sbshc must be compiled ahead of sbs, so that hc is configured first. http://bugzilla.kernel.org/show_bug.cgi?id=9910 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: misc cleanupsAdrian Bunk2008-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the following possible cleanups: - make the following needlessly global code static: - drivers/acpi/bay.c:dev_attr_eject - drivers/acpi/bay.c:dev_attr_present - drivers/acpi/dock.c:dev_attr_docked - drivers/acpi/dock.c:dev_attr_flags - drivers/acpi/dock.c:dev_attr_uid - drivers/acpi/dock.c:dev_attr_undock - drivers/acpi/pci_bind.c:acpi_pci_unbind() - drivers/acpi/pci_link.c:acpi_link_lock - drivers/acpi/sbs.c:acpi_sbs_callback() - drivers/acpi/sbshc.c:acpi_smbus_transaction() - drivers/acpi/sleep/main.c:acpi_sleep_prepare() - #if 0 the following unused global functions: - drivers/acpi/numa.c:acpi_unmap_pxm_to_node() - remove the following unused EXPORT_SYMBOL's: - acpi_register_gsi - acpi_unregister_gsi - acpi_strict - acpi_bus_receive_event - register_acpi_bus_type - unregister_acpi_bus_type - acpi_os_printf - acpi_os_sleep - acpi_os_stall - acpi_os_read_pci_configuration - acpi_os_create_semaphore - acpi_os_delete_semaphore - acpi_os_wait_semaphore - acpi_os_signal_semaphore - acpi_os_signal - acpi_pci_irq_enable - acpi_get_pxm Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Make sysfs interface in ACPI power optional.Alexey Starikovskiy2008-01-01
| | | | | | | Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9494 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Return rate in mW if capacity in mWhAlexey Starikovskiy2007-12-14
| | | | | | | | | klaptopd assumes rate to be in same units as capacity. http://bugzilla.kernel.org/show_bug.cgi?id=9362 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Ignore alarms coming from unknown devicesAlexey Starikovskiy2007-12-14
| | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=9362 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull procfs-default into release branchLen Brown2007-11-20
|\ | | | | | | | | | | | | | | Conflicts: drivers/acpi/sbs.c Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: Split out control for /proc/acpi entries from battery, ac, and sbs.Alexey Starikovskiy2007-11-19
| | | | | | | | | | | | | | | | | | Introduce new ACPI_PROCFS_POWER (default Yes) config option and move procfs code in battery, ac, and sbs drivers under it. This is done to allow ACPI_PROCFS to be default No. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: SBS: Fix retval warningJeff Garzik2007-11-18
|/ | | | | | | | | | | | | | | | | | drivers/acpi/sbs.c: In function acpi_battery_add: drivers/acpi/sbs.c:811: warning: ignoring return value of device_create_file, declared with attribute warn_unused_result Additional cleanups: * use struct acpi_battery in acpi_battery_remove() to clean up function calls, just like acpi_battery_add() already does. * put braces around unregister call, as it depends on dev being not NULL. * remove unneeded braces Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Add sysfs alarmAlexey Starikovskiy2007-09-27
| | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Add ACPI_PROCFS around procfs handling code.Alexey Starikovskiy2007-09-27
| | | | | | | Make procfs support optional under ACPI_PROCFS Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Add support for power_supply class (and sysfs)Alexey Starikovskiy2007-09-27
| | | | | | | | Add support for power_supply class and sysfs interface of it. Refer to Documentation/power_supply_class.txt for interface description. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Make SBS reads table-driven.Alexey Starikovskiy2007-09-27
| | | | | | Re-factor SBS functions to use tables and cycles for repeated operations. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Simplify data structures in SBSAlexey Starikovskiy2007-09-27
| | | | | Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: SBS: Split host controller (ACPI0001) from SBS driver (ACPI0002)Alexey Starikovskiy2007-09-27
| | | | | | | Replace poll-based host controller driver with the notify-based one. Split it out of sbs.c. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Add acpi_bus_generate_event4() functionAlexey Starikovskiy2007-09-27
| | | | | | | | acpi_bus_generate_event() takes two strings out of passed device object. SBS needs to supply these strings directly. Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Schedule /proc/acpi/event for removalLen Brown2007-08-23
| | | | | | | | | | | | Schedule /proc/acpi/event for removal in 6 months. Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event() to make sure there is no confusion that it is for /proc/acpi/event only. Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event. There is no functional change if CONFIG_ACPI_PROC_EVENT=y Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: don't duplicate input events on netlinkZhang Rui2007-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous events patch added a netlink event for every user of the legacy /proc/acpi/event interface. However, some users of /proc/acpi/event are really input events, and they already report their events via the input layer. Introduce a new interface, acpi_bus_generate_netlink_event(), which is explicitly called by devices that want to repoprt events via netlink. This allows the input-like events to opt-out of generating netlink events. In summary: events that are sent via netlink: ac/battery/sbs thermal processor thinkpad_acpi dock/bay events that are sent via input layer: button video hotkey thinkpad_acpi hotkey asus_acpi/asus-laptop hotkey sonypi/sonylaptop Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: sbs: remove dead codeAdrian Bunk2007-08-03
| | | | | | | | | Remove dead code spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger2007-07-23
| | | | | | | | | | drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: sbs: probe smart battery vis SMBus controllerAlexey Starikovskiy2007-06-23
| | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=8559 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: sbs: Common interface with CM batteryVladimir Lebedev2007-03-22
| | | | | | | | The SBS driver has tne features as CM battery: SBS update_time variable has tne same definition as CM battery 'update_time' variable. Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: sbs: Debug messages correction/improvementVladimir Lebedev2007-03-22
| | | | | | | | Debug messages correction/improvement: Use ACPI_EXCEPTION instead of ACPI_DEBUG_PRINT. Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: sbs: use EC rather than I2CVladimir Lebedev2007-03-22
| | | | | | | | | SBS is based on EC function(ec_read/ec_write). Not needed using of I2C structures/functions ... is removed. SBS does not depend on I2C now. Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull bugzilla-7897 into release branchLen Brown2007-02-16
|\
| * ACPI: sbs: fix present rateVladimir Lebedev2007-02-10
| | | | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=7897 Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-12
| | | | | | | | | | | | | | | | | | Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: fix acpi_driver.name usageLen Brown2007-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was erroneously used as a description rather than a name. ie. turn this: lenb@se7525gp2:/sys> ls bus/acpi/drivers ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver ACPI container driver ACPI PCI Root Bridge Driver hpet into this: lenb@se7525gp2:~> ls /sys/bus/acpi/drivers ac battery button container ec fan hpet pci_link pci_root power processor thermal Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-12
|/ | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: replace kmalloc+memset with kzallocBurman Yan2006-12-20
| | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull style into test branchLen Brown2006-12-16
|\ | | | | | | | | | | | | | | | | Conflicts: drivers/acpi/button.c drivers/acpi/ec.c drivers/acpi/osl.c drivers/acpi/sbs.c
| * ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpiJan Engelhardt2006-10-14
| | | | | | | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: sbs: fix module_param() initializersLebedev, Vladimir P2006-10-14
| | | | | | | | Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: sbs: check for NULL device pointerLebedev, Vladimir P2006-10-14
|/ | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: skip smart battery init when acpi=offLen Brown2006-08-15
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: remove function tracing macros from drivers/acpi/*.cLen Brown2006-07-01
| | | | | | a few invocations appeared due to the SBS and other patches. Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: add support for Smart BatteryRich Townsend2006-07-01
Most batteries today are ACPI "Control Method" batteries, but some models ship with the older "Smart Battery" that requires this code. Rich Townsend and Bruno Ducrot were the original authors. Vladimir Lebedev updated to run on latest kernel. http://bugzilla.kernel.org/show_bug.cgi?id=3734 Signed-off-by: Len Brown <len.brown@intel.com>