aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/scan.c
AgeCommit message (Collapse)Author
2007-07-23ACPI: autoload modules - Create ACPI alias interfaceThomas Renninger
Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias like: grep acpi /lib/modules/2.6.22-rc4-default/modules.alias alias acpi*:SNY5001:* sony_laptop alias acpi*:SNY6001:* sony_laptop for e.g. the sony_laptop module. This module matches against all ACPI devices with a HID or CID of SNY5001 or SNY6001 Export an uevent and modalias sysfs file containing the string: [MODALIAS=]acpi:PNP0C0C: additional CIDs are concatenated at the end. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-08PNPACPI sets pnpdev->dev.archdataDavid Brownell
Teach PNPACPI how to hook up its devices to their ACPI nodes, so that pnpdev->dev.archdata points to the parallel acpi device node. Previously this only worked for PCI, leaving a notable hole. Export "acpi_bus_type" so this can work. Remove some extraneous whitespace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-25ACPI: use _STA bit names rather than 0x0FBjorn Helgaas
Be explicit about what "device->status = 0x0F" really means. syntax only. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-12ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown
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>
2007-02-12ACPI: clean up ACPI_MODULE_NAME() useLen Brown
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>
2007-02-03Pull trivial into test branchLen Brown
Conflicts: drivers/acpi/scan.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-03ACPI: bay: Convert ACPI Bay driver to be compatible with sysfs update.Zhang Rui
Set fake hid for ejectable drive bay. Match bay devices by checking the hid. Remove .match method of Bay driver. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-03Pull sysfs into test branchLen Brown
Conflicts: Documentation/feature-removal-schedule.txt include/acpi/acpi_drivers.h Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02ACPICA: use new ACPI headers.Alexey Starikovskiy
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02ACPICA: minimal patch to integrate new tables into LinuxAlexey Starikovskiy
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30ACPI: delete unused acpi_device_get_debug_info()Len Brown
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-30ACPI: Correct ACPI_DEBUG_OUTPUT typoRobert P. J. Day
-#ifdef CONFIG_ACPI_DEBUG_OUTPUT +#ifdef ACPI_DEBUG_OUTPUT As the former doesn't exist. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-05ACPI: use more understandable bus_id for ACPI devicesZhang Rui
Some of the ACPI devices use the internal fake hids which are exposed to userspace as devces' bus_id after sysfs conversion. To make it more friendly, we convert them to more understandable strings. For those devices w/o PNPids, we use "device:instance_no" as the bus_id instead of "PNPIDNON:instance_no". Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-21ACPI: fix Supermicro X7DB8+ Boot regressionRui Zhang
http://bugzilla.kernel.org/show_bug.cgi?id=7695 Originally we converted bind/unbind to use a new pci bridge driver. The driver will add/remove _PRT, so we can eventually remove .bind/.unbind methods. But we found that some of the _ADR-Based devices don't have _PRT, i.e. they are not managed by the new ACPI PCI bridge driver. So that .bind method is not called for some _ADR-Based devices, which leads to a failure. Now we make ACPI PCI Root Bridge Driver scan and binds all _ADR-Based devices once the driver is loaded, in the .add method of ACPI PCI Root Bridge driver. Extra code path for calling .bind/.unbind when _ADR-Based devices are hot added/removed is also added. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-21ACPI: use PNPID:instance_no as bus_id of ACPI deviceZhang Rui
Previously we used the device name in the DSDT, but would crash upon encountering a duplicate. Also, exposing the DSDT device name to the user in a patch isn't a good idea, because it is arbitrary. After some discussion, we finally decided to use "PNPID:instance_no" as the bus_id of ACPI devices. Two attributes for each device are added at the same time, the full pathname in ACPI namespace and hardware_id if it has. NOTE: acpi_bus_id_list is used to keep the information of PNPID and instance number of the given PNPID. Loop the acpi_bus_id_list to find the instance_no of the same PNPID when register a device. If failed, i.e. we don't have a node with this PNPID, allocate one and link it to this list. NOTE: Now I don't take the memory free work in charge. If necessary, I can add a reference count in struct acpi_device_bus_id, and check the reference and when unregister a device, i.e. memory is freed when the reference count of a given PNPID is 0. Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20ACPI: replace kmalloc+memset with kzallocBurman Yan
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: Set fake hid for non-PNPID ACPI devicesZhang Rui
We do this mainly because: 1. hid is used to match ACPI devices and drivers. .match method which is incompatible to driver model can be deleted from acpi_driver.ops then. 2. As the .uevent method mark ACPI drivers by PNPID, fake hid is set to non-PNPID devices so that udev script can load the right ACPI driver by looking for "HWID = " or "COMPTID = ". Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: Convert ACPI PCI .bind/.unbind to use PCI bridge driverLi Shaohua
acpi_device had a .bind/.unbind methods, but Linux driver model does not. Cut ACPI PCI code over to use the Linux driver model methods. Convert bind/unbind to use a new pci bridge driver. The driver will add/remove _PRT, so we can eventually remove .bind/.unbind methods. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: add acpi_bus_removal_type in acpi_deviceLi Shaohua
Add removal_type in structure acpi_device for hot removal. ACPI_BUS_REMOVAL_EJECT is used for ACPI device hot removal. Only one parameter is allowed in .remove method due to driver model. So removal_type is added to indicate different removal type. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: add acpi_bus_ops in acpi_deviceLi Shaohua
Add acpi_bus_ops in acpi_device to support acpi hot plug. NOTE: Two methods .add and .start in acpi_driver.ops are called separately to probe ACPI devices, while only .probe method is called in driver model. As executing .add and .start separately is critical for ACPI device hot plug, we use acpi_bus_ops to distinguish different code path. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: convert to sysfs frameworkPatrick Mochel
Setup new sysfs framework 1. Remove /sys/firmware/acpi 2. Add ACPI device in device tree. File "eject" for every device that has _EJ0 method is moved from /sys/firmware to /sys/devices. Operation on this file is exactly the same as before. i.e. echo 1 to "eject" will cause hot removal of this device. Corresponding changes should be made in userspace for hot removal. Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Zhang Rui<rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: change registration interface to follow driver modelPatrick Mochel
ACPI device/driver registration Interfaces are modified to follow Linux driver model. Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: add ACPI bus_type for driver modelPatrick Mochel
Add ACPI bus_type for Linux driver model. 1. .shutdown method is added into acpi_driver.ops needed by bus_type operations. 2. remove useless parameter 'int state' in .resume method. 3. change parameter 'int state' to 'pm_message_t state' in .suspend method. Note: The new .uevent method mark ACPI drivers by PNPID instead of by name. Udev script needs to look for "HWID=" or "COMPTID=" to load ACPI drivers as a result. Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: add device_driver and hepler functionsPatrick Mochel
Add device_driver into acpi_driver for driver model. Add helper functions 'to_acpi_device' and 'to_acpi_driver' to get structure acpi_device/acpi_driver by device/device_driver. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: rename some functionsZhang Rui
We want the name 'to_acpi_device'. And the current macro 'to_acpi_device' will be removed after device model is setup. So just simply rename them. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15ACPI: clean up scan.cZhang Rui
Adjust the code and make code doing similar things together. No logic changes. Signed-off-by : Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-12ACPI: scan: handle kset/kobject errorsRandy Dunlap
Check and handle kset_register() and kobject_register() init errors. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09Revert "Revert "ACPI: dock driver""Len Brown
This reverts 953969ddf5b049361ed1e8471cc43dc4134d2a6f commit.
2006-07-09Revert "ACPI: dock driver"Linus Torvalds
This reverts commit a5e1b94008f2a96abf4a0c0371a55a56b320c13e. Adrian Bunk points out that it has build errors, and apparently no maintenance. Throw it out. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-01Pull acpi_os_free into release branchLen Brown
2006-06-30ACPI: drivers/acpi/scan.c: make acpi_bus_type staticAdrian Bunk
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30ACPI: delete acpi_os_free(), use kfree() directlyLen Brown
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28ACPI: dock driverKristen Accardi
Create a driver which lives in the acpi subsystem to handle dock events. This driver is not an "ACPI" driver, because acpi drivers require that the object be present when the driver is loaded. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Cc: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27ACPI: delete tracing macros from drivers/acpi/*.cPatrick Mochel
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-27ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)Len Brown
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-26ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUGThomas Renninger
Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-15Pull bugzilla-5000 into release branchLen Brown
2006-06-15Pull sem2mutex into release branchLen Brown
2006-06-15Pull acpi_bus_register_driver into release branchLen Brown
Conflicts: drivers/acpi/asus_acpi.c drivers/acpi/scan.c
2006-06-15Pull trivial1 into release branchLen Brown
2006-05-15ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend()Len Brown
in case we want to decode it for future use in acpi_op_suspend(..., state) also, inline new 1-liner static function http://bugzilla.kernel.org/show_bug.cgi?id=5000 Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15ACPI: create acpi_device_suspend()/acpi_device_resume()Patrick Mochel
updated and tested by Konstantin Karasyov http://bugzilla.kernel.org/show_bug.cgi?id=5000 Signed-off-by: Patrick Mochel <patrick.mochel@intel.com> Signed-off-by: Konstantin Karasyov <konstantin.karasyov @intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13ACPI: acpi_bus_unregister_driver() returns voidBjorn Helgaas
Nobody looks at the return value, and this brings it into line with pci_unregister_driver(), etc. Also removed validation of the driver pointer passed in to register and unregister. More consistent, and we'll find bugs faster if we fault rather than returning an error that's ignored. Also makes internal functions acpi_device_unregister() and acpi_driver_detach() void, since nobody uses their returns either. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13ACPI: delete unused acpi_bus_drivers_lockLen Brown
acpi_bus_drivers is protected by acpi_device_lock Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01ACPI: Allow hot-add of ejected processorAshok Raj
acpi_eject_store() didn't trim processors, causing subsequent hot-add to fail. Signed-off-by: Ashok Raj <ashok.raj@intel.com> Cc: Andi Kleen <ak@muc.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01ACPI: simplify scan.c codingBjorn Helgaas
No functional changes; just remove leftover, unused "buffer" and simplify control flow (no need to remember error values and goto the end, when we can simply return the value directly). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01ACPI: make acpi_bus_register_driver() return success/failure, not device count Bjorn Helgaas
acpi_bus_register_driver() should not return the number of devices claimed. We're not asking to find devices, we're making a driver available to devices, including hot-pluggable devices that may appear in the future. I audited all callers of acpi_bus_register_driver(), and except asus_acpi.c and sonypi.c (fixed in previous patches), all either ignore the return value or test only for failure (<0). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-23[PATCH] acpi: export acpi_bus_trimKristen Accardi
Export the acpi_bus_trim function so that the pci hotplug driver can use it. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-24[ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi ↵Len Brown
branches into release Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-07[ACPI] fix kernel-doc warnings in acpi/scan.cRandy Dunlap
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>