08 Nov, 2008
1 commit
-
This is a reimplemention of commit
0119509c4fbc9adcef1472817fda295334612976
from Matthew GarrettThis patch got removed because of a regression: ThinkPads with a
Intel graphics card and an Integrated Graphics Device BIOS implementation
stopped working.
In fact, they only worked because the ACPI device of the discrete, the
wrong one, got used (via int10). So ACPI functions were poking on the wrong
hardware used which is a sever bug.
The next patch provides support for above ThinkPads to be able to
switch brightness via the legacy thinkpad_acpi driver and automatically
detect when to use it.Original commit message from Matthew Garrett:
Vendors often ship machines with a choice of integrated or discrete
graphics, and use the same DSDT for both. As a result, the ACPI video
module will locate devices that may not exist on this specific platform.
Attempt to determine whether the device exists or not, and abort the
device creation if it doesn't.http://bugzilla.kernel.org/show_bug.cgi?id=9614
Signed-off-by: Thomas Renninger
Acked-by: Zhang Rui
Signed-off-by: Andi Kleen
Signed-off-by: Len Brown
23 Oct, 2008
2 commits
-
Conflicts:
drivers/acpi/bay.c
drivers/acpi/dock.c
drivers/ata/libata-acpi.cSigned-off-by: Len Brown
11 Oct, 2008
2 commits
-
As of version 2.0, ACPI can return 64-bit integers. The current
acpi_evaluate_integer only supports 64-bit integers on 64-bit platforms.
Change the argument to take a pointer to an acpi_integer so we support
64-bit integers on all platforms.lenb: replaced use of "acpi_integer" with "unsigned long long"
lenb: fixed bug in acpi_thermal_trips_update()Signed-off-by: Matthew Wilcox
Signed-off-by: Len Brown -
Catch attempts to use of acpi_driver_data on pointers of wrong type.
akpm: rewritten to use proper C typechecking and remove the
"function"-used-as-lvalue thing.Signed-off-by: Pavel Machek
Signed-off-by: Andrew Morton
Signed-off-by: Len Brown
24 Sep, 2008
1 commit
-
The battery driver already registers notification handler.
To avoid registering notification handler again,
introduce a notifier chain in global system notifier handler
and use it in dock driver.Signed-off-by: Shaohua Li
Signed-off-by: Len Brown
09 Jul, 2008
1 commit
-
So that one of the several config option permutations will build again.
Tested-by: Alexander Beregalov
Signed-off-by: David Howells
Signed-off-by: Jesse Barnes
08 Jul, 2008
3 commits
-
* Introduce function acpi_pm_device_sleep_wake() for enabling and
disabling the system wake-up capability of devices that are power
manageable by ACPI.* Introduce function acpi_bus_can_wakeup() allowing other (dependent)
subsystems to check if ACPI is able to enable the system wake-up
capability of given device.* Introduce callback .sleep_wake() in struct pci_platform_pm_ops and
for the ACPI PCI 'driver' make it use acpi_pm_device_sleep_wake().* Introduce callback .can_wakeup() in struct pci_platform_pm_ops and
for the ACPI 'driver' make it use acpi_bus_can_wakeup().* Move the PME# handlig code out of pci_enable_wake() and split it
into two functions, pci_pme_capable() and pci_pme_active(),
allowing the caller to check if given device is capable of
generating PME# from given power state and to enable/disable the
device's PME# functionality, respectively.* Modify pci_enable_wake() to use the new ACPI callbacks and the new
PME#-related functions.* Drop the generic .platform_enable_wakeup() callback that is not
used any more.* Introduce device_set_wakeup_capable() that will set the
power.can_wakeup flag of given device.* Rework PCI device PM initialization so that, if given device is
capable of generating wake-up events, either natively through the
PME# mechanism, or with the help of the platform, its
power.can_wakeup flag is set and its power.should_wakeup flag is
unset as appropriate.* Make ACPI set the power.can_wakeup flag for devices found to be
wake-up capable by it.* Make the ACPI wake-up code enable/disable GPEs for devices that
have the wakeup.flags.prepared flag set (which means that their
wake-up power has been enabled).Signed-off-by: Rafael J. Wysocki
Signed-off-by: Jesse Barnes -
Introduce additional flag 'prepared' in struct acpi_device_wakeup_flags
and use it to prevent devices from being enable/disabled do wake up the
system multiple times in a row (this does not happen currently, but will
be possible after some of the following patches).Signed-off-by: Rafael J. Wysocki
Signed-off-by: Jesse Barnes -
Introduce function acpi_bus_power_manageable() allowing other
(dependent) subsystems to check if ACPI is able to power manage given
device. This may be useful, for example, for PCI device power
management.Signed-off-by: Rafael J. Wysocki
Acked-by: Pavel Machek
Signed-off-by: Jesse Barnes
12 Jun, 2008
1 commit
-
Get rid of a superfluous acpi_pm_device_sleep_state() parameter. The
only legitimate value of that parameter must be derived from the first
parameter, which is what all the callers already do. (However, this
does not address the fact that ACPI still doesn't set up those flags.)Signed-off-by: David Brownell
Acked-by: Pavel Machek
Signed-off-by: Rafael J. Wysocki
Signed-off-by: Len Brown
07 Feb, 2008
2 commits
-
Conflicts:
include/acpi/acpi_bus.h
Signed-off-by: Len Brown
-
Kernel mode graphics drivers need this ACPI notifier chaine
so that they can get notified upon hotkey events.Signed-off-by: Zhang Rui
Signed-off-by: Len Brown
02 Feb, 2008
1 commit
-
Intel menlow driver needs to get the pointer of themal_zone_device
structure of an ACPI thermal zone.
Attach this to each ACPI thermal zone device object.Signed-off-by: Zhang Rui
Signed-off-by: Thomas Sujith
Signed-off-by: Len Brown
25 Jan, 2008
1 commit
-
We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.Cc: Kay Sievers
Cc: Len Brown
Signed-off-by: Greg Kroah-Hartman
24 Jan, 2008
1 commit
-
This reverts commit 93ad7c07ad487b036add8760dabcc35666a550ef.
http://bugzilla.kernel.org/show_bug.cgi?id=9798
Signed-off-by: Len Brown
26 Oct, 2007
1 commit
-
force_power_state was used as a workaround for invalid cached
power state of the device. We do not cache power state, so no need for
workaround.Signed-off-by: Alexey Starikovskiy
Acked-by: Rafael J. Wysocki
Signed-off-by: Len Brown
10 Oct, 2007
1 commit
28 Sep, 2007
2 commits
-
acpi_bus_generate_event() takes two strings out of passed device object.
SBS needs to supply these strings directly.Signed-off-by: Alexey Starikovskiy
Signed-off-by: Len Brown -
S4 suspend to disk will disable GPE's permanently
because acpi_gpe_sleep_prepare() does not have
a counterpart at resume time. Thus, those devices
became unavailable for wakeup from subsequent
S3 suspend-to-ram.Here acpi_gpe_sleep_prepare() is removed, and upon suspend
acpi_enable_wakeup_device() gets its functionality.
Upon resume, acpi_disable_wakeup_device() restores the state.https://bugzilla.novell.com/show_bug.cgi?id=292300
Signed-off-by: Alexey Starikovskiy
Acked-by: Pavel Machek
Signed-off-by: Len Brown
24 Aug, 2007
2 commits
-
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=ySigned-off-by: Len Brown
-
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/bayevents that are sent via input layer:
button
video hotkey
thinkpad_acpi hotkey
asus_acpi/asus-laptop hotkey
sonypi/sonylaptopSigned-off-by: Zhang Rui
Signed-off-by: Len Brown
30 Jul, 2007
1 commit
-
Introduce CONFIG_SUSPEND representing the ability to enter system sleep
states, such as the ACPI S3 state, and allow the user to choose SUSPEND
and HIBERNATION independently of each other.Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has
been chosen and the kernel is intended for SMP systems.Also, introduce CONFIG_PM_SLEEP which is automatically selected if
CONFIG_SUSPEND or CONFIG_HIBERNATION is set and use it to select the
code needed for both suspend and hibernation.The top-level power management headers and the ACPI code related to
suspend and hibernation are modified to use the new definitions (the
changes in drivers/acpi/sleep/main.c are, mostly, moving code to reduce
the number of ifdefs).There are many other files in which CONFIG_PM can be replaced with
CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in
the future.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Linus Torvalds
25 Jul, 2007
2 commits
-
Conflicts:
drivers/acpi/sleep/main.c
Signed-off-by: Len Brown
24 Jul, 2007
1 commit
-
Define standardized HIDs - Rename current acpi_device_id to acpica_device_id
Signed-off-by: Thomas Renninger
Signed-off-by: Len Brown
22 Jul, 2007
1 commit
-
Based on the David Brownell's patch at
http://marc.info/?l=linux-acpi&m=117873972806360&w=2
updated by: Rafael J. WysockiAdd a helper routine returning the lowest power (highest number) ACPI device
power state that given device can be in while the system is in the sleep state
indicated by acpi_target_sleep_state .Signed-off-by: Rafael J. Wysocki
Acked-by: Pavel Machek
Signed-off-by: Len Brown
04 Jul, 2007
1 commit
-
Upon ACPI events, send an "acpi_event" via Generic Netlink.
This is in addition to /proc/acpi/event, which remains intact for now.Thanks to Jamal for his great help.
Signed-off-by: Zhang Rui
Signed-off-by: Len Brown
10 May, 2007
1 commit
-
Signed-off-by: Len Brown
09 May, 2007
1 commit
-
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
Cc: Adam Belay
Cc: Bjorn Helgaas
Cc: Len Brown
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 May, 2007
1 commit
-
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman
03 Feb, 2007
2 commits
-
Conflicts:
Documentation/feature-removal-schedule.txt
include/acpi/acpi_drivers.hSigned-off-by: Len Brown
-
Signed-off-by: Len Brown
06 Jan, 2007
1 commit
-
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
Signed-off-by: Len Brown
16 Dec, 2006
6 commits
-
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
Signed-off-by: Len Brown -
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
Signed-off-by: Len Brown -
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
Signed-off-by: Len Brown -
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
Signed-off-by: Zhang Rui
Signed-off-by: Len Brown -
ACPI device/driver registration Interfaces are modified
to follow Linux driver model.Signed-off-by: Li Shaohua
Signed-off-by: Zhang Rui
Signed-off-by: Len Brown -
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
Signed-off-by: Zhang Rui
Signed-off-by: Len Brown