10 Oct, 2016
1 commit
-
On some platforms with ACPI4 variable speed fan, reading cur_state from
cooling device returns "invalid value" error. This confuses user space
applications.This issue occurs as the current driver doesn't take account of
"FineGrainControl" from _FIF(Fan Information). When the "FineGrainControl"
is set, _FSL(FSL Set Level) takes argument as a percent, which doesn't
have to match from any control value from _FPS(Fan Performance States).
It is also possible that the Fan is not actually running at the requested
speed returning a lower speed.
On some platforms the BIOS is setting fan speed to a level during boot,
which will not have an exact match to _FPS control values. The current
implementation will treat this level as invalid value.The simple change is to atleast return state corresponding to a maximum
control value in the _FPS compared to the current level.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Rafael J. Wysocki
10 Mar, 2016
1 commit
-
Silence the following checkpatch warning:
WARNING: struct dev_pm_ops should normally be const.Signed-off-by: Kaiyen Chang
Signed-off-by: Brian Norris
Signed-off-by: Rafael J. Wysocki
16 Jan, 2016
1 commit
-
On my laptop, I see "Setting initial power state" on boot. It's a
firmware bug on my laptop, but the message made me think that the
initial power state was bogus and the driver fixed it. The error
actually means that the driver failed to set the initial power
state. Fix the message.Signed-off-by: Andy Lutomirski
Signed-off-by: Rafael J. Wysocki
08 Jul, 2015
1 commit
-
There is no need to carry potentially outdated Free Software Foundation
mailing address in file headers since the COPYING file includes it.Signed-off-by: Jarkko Nikula
Signed-off-by: Rafael J. Wysocki
16 May, 2015
1 commit
-
The ACPI 6 specification has made some changes in the device power
management area. In particular:* The D3hot power state is now supposed to be always available
(instead of D3cold) and D3cold is only regarded as valid if the
_PR3 object is present for the given device.* The required ordering of transitions into power states deeper than
D0 is now such that for a transition into state Dx the _PSx method
is supposed to be executed first, if present, and the states of
the power resources the device depends on are supposed to be
changed after that.* It is now explicitly forbidden to transition devices from
lower-power (deeper) into higher-power (shallower) power states
other than D0.Those changes have been made so the specification reflects the
Windows' device power management code that the vast majority of
systems using ACPI is validated against.To avoid artificial differences in ACPI device power management
between Windows and Linux, modify the ACPI device power management
code to follow the new specification. Add comments explaining the
code flow in some unclear places.This only may affect some real corner cases in which the OS behavior
expected by the firmware is different from the Windows one, but that's
quite unlikely. The transition ordering change affects transitions
to D1 and D2 which are rarely used (if at all) and into D3hot and
D3cold for devices actually having _PR3, but those are likely to
be validated against Windows anyway. The other changes may affect
code calling acpi_device_get_power() or acpi_device_update_power()
where ACPI_STATE_D3_HOT may be returned instead of ACPI_STATE_D3_COLD
(that's why the ACPI fan driver needs to be updated too) and since
transitions into ACPI_STATE_D3_HOT may remove power now, it is better
to avoid this one in acpi_pm_device_sleep_state() if the "no power
off" PM QoS flag is set.The only existing user of acpi_device_can_poweroff() really cares
about the case when _PR3 is present, so the change in that function
should not cause any problems to happen too.A plus is that PCI_D3hot can be mapped to ACPI_STATE_D3_HOT
now and the compatibility with older systems should be covered
automatically.In any case, if any real problems result from this, it still will
be better to follow the Windows' behavior (which now is reflected
by the specification too) in general and handle the cases when it
doesn't work via quirks.Signed-off-by: Rafael J. Wysocki
11 Dec, 2014
1 commit
-
The _ART (Active Cooling Relationship Table), specifies relationship
among heat generating sources to a target active cooling device like
fan. The _ART table refers to actual bus id name for specifying relationship.
Naming "Fan" is not enough as name in the _ART table can change on every
platform, to establish relationship for user space thermal controllers.Signed-off-by: Srinivas Pandruvada
Signed-off-by: Rafael J. Wysocki
25 Oct, 2014
1 commit
-
Pull thermal management updates from Zhang Rui:
"Sorry that I missed the merge window as there is a bug found in the
last minute, and I have to fix it and wait for the code to be tested
in linux-next tree for a few days. Now the buggy patch has been
dropped entirely from my next branch. Thus I hope those changes can
still be merged in 3.18-rc2 as most of them are platform thermal
driver changes.Specifics:
- introduce ACPI INT340X thermal drivers.
Newer laptops and tablets may have thermal sensors and other
devices with thermal control capabilities that are exposed for the
OS to use via the ACPI INT340x device objects. Several drivers are
introduced to expose the temperature information and cooling
ability from these objects to user-space via the normal thermal
framework.From: Lu Aaron, Lan Tianyu, Jacob Pan and Zhang Rui.
- introduce a new thermal governor, which just uses a hysteresis to
switch abruptly on/off a cooling device. This governor can be used
to control certain fan devices that can not be throttled but just
switched on or off. From: Peter Feuerer.- introduce support for some new thermal interrupt functions on
i.MX6SX, in IMX thermal driver. From: Anson, Huang.- introduce tracing support on thermal framework. From: Punit
Agrawal.- small fixes in OF thermal and thermal step_wise governor"
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (25 commits)
Thermal: int340x thermal: select ACPI fan driver
Thermal: int3400_thermal: use acpi_thermal_rel parsing APIs
Thermal: int340x_thermal: expose acpi thermal relationship tables
Thermal: introduce int3403 thermal driver
Thermal: introduce INT3402 thermal driver
Thermal: move the KELVIN_TO_MILLICELSIUS macro to thermal.h
ACPI / Fan: support INT3404 thermal device
ACPI / Fan: add ACPI 4.0 style fan support
ACPI / fan: convert to platform driver
ACPI / fan: use acpi_device_xxx_power instead of acpi_bus equivelant
ACPI / fan: remove no need check for device pointer
ACPI / fan: remove unused macro
Thermal: int3400 thermal: register to thermal framework
Thermal: int3400 thermal: add capability to detect supporting UUIDs
Thermal: introduce int3400 thermal driver
ACPI: add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package()
ACPI: make acpi_create_platform_device() an external API
thermal: step_wise: fix: Prevent from binary overflow when trend is dropping
ACPI: introduce ACPI int340x thermal scan handler
thermal: Added Bang-bang thermal governor
...
10 Oct, 2014
6 commits
-
INT3404 ACPI object follows the ACPI 5.0 fan object definition as
described in section 11.3 of the ACPI 5.0 Specification.
Thus we can reuse the ACPI fan driver for INT3404 ACPI object.Signed-off-by: Aaron Lu
Signed-off-by: Zhang Rui -
This patch adds support for ACPI 4.0 style fan, lacking part is: no
support for 'Low Speed Notification Support', 'Fine Grain Control' is
not used yet.It's not clear what to do on suspend/resume callback for 4.0 style ACPI
fan, so it does nothing for now.Signed-off-by: Aaron Lu
Signed-off-by: Zhang Rui -
Convert ACPI fan driver to a platform driver for the purpose of phasing
out ACPI bus.Signed-off-by: Aaron Lu
Signed-off-by: Zhang Rui -
When we have the acpi_device pointer, there is no need to pass the
device's handle to the acpi_bus_xxx_power functions to get/set/update
the device's power state, instead, use the acpi_device_xxx_power
functions directly.To make this happen for fan module, export acpi_device_update_power.
Signed-off-by: Aaron Lu
Signed-off-by: Zhang Rui -
The device pointer will not be NULL in the PM callback and ACPI driver's
add/remove callback, so checking NULL for them isn't necessary.Signed-off-by: Aaron Lu
Signed-off-by: Zhang Rui -
The _COMPONENT, ACPI_MODULE_NAME(name) and ACPI_FAN_FILE_STATE are not
used anywhere so remove them.Signed-off-by: Aaron Lu
Signed-off-by: Zhang Rui
07 Oct, 2014
1 commit
-
printk replaced with corresponding dev_err and dev_info
fixed one broken user-visible string
multiine comment edited for correct commenting style
asm/uaccess.h replaced with linux/uaccess.h
PREFIX removedSigned-off-by: Sudip Mukherjee
Signed-off-by: Rafael J. Wysocki
21 Feb, 2014
1 commit
-
We put fans to full speed in acpi_fan_suspend(), but that is only
needed in the hibernation case when we are generating hibernation
image, so this patch removes that when we are about to suspend or
poweroff.References: http://www.spinics.net/lists/linux-acpi/msg48636.html
Signed-off-by: Aaron Lu
Signed-off-by: Rafael J. Wysocki
13 Feb, 2014
1 commit
-
The ACPI fan driver defines acpi_fan_suspend() and acpi_fan_resume()
when CONFIG_PM_SLEEP is defined. This results in the following compile
errors when CONFIG_PM_SLEEP is undefined:drivers/acpi/fan.c:60:8: error: ‘acpi_fan_suspend’ undeclared here (not in a function)
drivers/acpi/fan.c:60:8: error: ‘acpi_fan_resume’ undeclared here (not in a function)Signed-off-by: Shuah Khan
Signed-off-by: Rafael J. Wysocki
07 Dec, 2013
1 commit
-
Replace direct inclusions of , and
, which are incorrect, with
inclusions and remove some inclusions of those files that aren't
necessary.First of all, , and
should not be included directly from any files that are built for
CONFIG_ACPI unset, because that generally leads to build warnings about
undefined symbols in !CONFIG_ACPI builds. For CONFIG_ACPI set,
includes those files and for CONFIG_ACPI unset it
provides stub ACPI symbols to be used in that case.Second, there are ordering dependencies between those files that always
have to be met. Namely, it is required that be included
prior to so that the acpi_pci_root declarations the
latter depends on are always there. And which provides
basic ACPICA type declarations should always be included prior to any other
ACPI headers in CONFIG_ACPI builds. That also is taken care of including
as appropriate.Signed-off-by: Lv Zheng
Cc: Greg Kroah-Hartman
Cc: Matthew Garrett
Cc: Tony Luck
Cc: "H. Peter Anvin"
Acked-by: Bjorn Helgaas (drivers/pci stuff)
Acked-by: Konrad Rzeszutek Wilk (Xen stuff)
Signed-off-by: Rafael J. Wysocki
24 Sep, 2013
1 commit
-
Remove label indentation in acpi_fan_add().
Signed-off-by: Felipe Contreras
Signed-off-by: Rafael J. Wysocki
30 Jul, 2013
1 commit
-
There are several places in the tree where ACPI_STATE_D3 is used
instead of ACPI_STATE_D3_COLD which should be used instead for
clarity. Modify them all to use ACPI_STATE_D3_COLD as appropriate.[The definition of ACPI_STATE_D3 itself cannot go away at this point
as it is part of ACPICA.]Signed-off-by: Rafael J. Wysocki
Reviewed-by: Aaron Lu
04 Jul, 2013
1 commit
-
Make the following compiler warning go away:
CC drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]by initializing the local variable acpi_state in fan_get_cur_state().
[rjw: Changelog]
Signed-off-by: Naresh Bhat
Signed-off-by: Rafael J. Wysocki
26 Mar, 2013
1 commit
-
Fix a null pointer deference by acpi_driver_data() if device is
null. We should only set cdev and check this is OK after we are
sure device is not null.Smatch analysis:
drivers/acpi/fan.c:179 acpi_fan_remove() warn: variable dereferenced
before check 'device' (see line 177)Signed-off-by: Colin Ian King
Signed-off-by: Rafael J. Wysocki
26 Jan, 2013
1 commit
-
The second argument of ACPI driver .remove() operation is only used
by the ACPI processor driver and the value passed to that driver
through it is always available from the given struct acpi_device
object's removal_type field. For this reason, the second ACPI driver
.remove() argument is in fact useless, so drop it.Signed-off-by: Rafael J. Wysocki
Reviewed-by: Jiang Liu
Acked-by: Toshi Kani
Acked-by: Yinghai Lu
22 Sep, 2012
1 commit
-
Signed-off-by: Mika Westerberg
Signed-off-by: Len Brown
10 Aug, 2012
1 commit
-
According to compiler warnings, several suspend/resume functions
in ACPI drivers are not used for CONFIG_PM_SLEEP unset, so add
#ifdefs to prevent them from being built in that case.Signed-off-by: Rafael J. Wysocki
01 Jul, 2012
2 commits
-
Make the ACPI fan driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.Signed-off-by: Rafael J. Wysocki
-
None of the drivers implementing the ACPI device suspend callback
uses the pm_message_t argument of it, so this argument may be dropped
entirely from that callback. This will simplify switching the ACPI
bus type to PM handling based on struct dev_pm_ops.Signed-off-by: Rafael J. Wysocki
17 Jul, 2011
1 commit
-
Structs battery_file, acpi_dock_ops, file_operations,
thermal_cooling_device_ops, thermal_zone_device_ops, kernel_param_ops
are not changed in runtime. It is safe to make them const.
register_hotplug_dock_device() was altered to take const "ops" argument
to respect acpi_dock_ops' const notion.Signed-off-by: Vasiliy Kulikov
Acked-by: Jeff Garzik
Signed-off-by: Len Brown
12 Jan, 2011
1 commit
-
Use the new function acpi_bus_update_power() for manipulating power
resources used by ACPI fan devices, which allows them to be put into
the right state during initialization and resume. Consequently,
remove the flags.force_power_state field from struct acpi_device,
which is not necessary any more.Signed-off-by: Rafael J. Wysocki
Signed-off-by: Len Brown
16 Oct, 2010
1 commit
-
Remove deprecated ACPI Fan driver procfs interface.
The ACPI fan driver (CONFIG_ACPI_FAN) selects
the generic thermal sysfs driver (CONFIG_THERMAL) since 2.6.26,
so new sysfs I/F is available at /sys/class/thermal/cooling_devicecX/Signed-off-by: Zhang Rui
Signed-off-by: Len Brown
30 Sep, 2010
1 commit
-
commit 934231de706d2579fae14f5857fcd8de991009ff fixes an unbalanced
CONFIG_ACPI_PROCFS code block during module initialisation. This
patch fixes similar issue but for the module exit.Signed-off-by: Luis Henriques
Signed-off-by: Len Brown
10 Jun, 2010
1 commit
-
The code block braced with CONFIG_ACPI_PROCFS is unblanced. When
CONFIG_ACPI_PROCFS=n, kernel trace will be produced like:Call Trace:
[] ? remove_proc_entry+0x20d/0x290
[] ? remove_proc_entry+0x20d/0x290
[] warn_slowpath_common+0x6c/0xc0
[] ? remove_proc_entry+0x20d/0x290
[] warn_slowpath_fmt+0x26/0x30
[] remove_proc_entry+0x20d/0x290
[] ? proc_register+0x117/0x1f0
[] ? proc_mkdir_mode+0x33/0x50
[] ? acpi_fan_init+0x0/0x2c
[] acpi_fan_init+0x23/0x2c
[] do_one_initcall+0x23/0x180
[] ? init_irq_proc+0x67/0x80
[] kernel_init+0x13c/0x20e
[] ? schedule_tail+0x20/0x90
[] ? syscall_exit+0x5/0x16
[] ? kernel_init+0x0/0x20e
[] ? kernel_init+0x0/0x20e
[] kernel_thread_helper+0x6/0x30
---[ end trace a7919e7f17c0a725 ]---Then also bracket later error checking code with ACPI_PROCFS
option to avoid mismatch problem.Signed-off-by: Liang Li
Signed-off-by: Len Brown
16 Dec, 2009
1 commit
-
This message shows up for each cpu. Print as debug messages.
[ 12.893967] processor ACPI0007:00: registered as cooling_device0
[ 12.907838] processor ACPI0007:01: registered as cooling_device1Signed-off-by: Mike Travis
Cc: Ingo Molnar
Cc: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Len Brown
29 Aug, 2009
1 commit
-
Linux/ACPI core files using internal.h all PREFIX "ACPI: ",
however, not all ACPI drivers use/want it -- and they
should not have to #undef PREFIX to define their own.Add GPL commment to internal.h while we are there.
This does not change any actual console output,
asside from a whitespace fix.Signed-off-by: Len Brown
05 Apr, 2009
1 commit
-
Conflicts:
arch/x86/kernel/cpu/cpufreq/longhaul.cSigned-off-by: Len Brown
31 Mar, 2009
1 commit
-
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
->owner, thus not pinning enything, and release it later resulting
in module refcount underflow.We can keep ->owner and supply it at registration time like ->proc_fops
and ->data.But this leaves ->owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching ->owner. ->proc_fops is declared as "const" which should give
some thoughts.->read_proc/->write_proc were just fixed to not require ->owner for
protection.rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.Removing ->owner will also make PDE smaller.
So, let's nuke it.
Kudos to Jeff Layton for reminding about this, let's say, oversight.
http://bugzilla.kernel.org/show_bug.cgi?id=12454
Signed-off-by: Alexey Dobriyan
20 Feb, 2009
1 commit
-
The thermal API currently uses strings to pass values to userspace. This
makes it difficult to use from within the kernel. Change the interface
to use integers and fix up the consumers.Signed-off-by: Matthew Garrett
Acked-by: Zhang Rui
Acked-by: Thomas Renninger
Signed-off-by: Len Brown
08 Nov, 2008
1 commit
-
Move all the component definitions for drivers to a single shared place,
include/acpi/acpi_drivers.h.Signed-off-by: Bjorn Helgaas
Signed-off-by: Len Brown
23 Oct, 2008
2 commits
-
ACPI_DB_ERROR and ACPI_DB_WARN were removed from ACPICA core.
So replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk(KERN_ERR PREFIX ...)
and ACPI_DEBUG_PRINT((ACPI_DB_WARN, ...) with printk(KERN_WARNING PREFIX ...)We do not use ACPI_ERROR/ACPI_WARNING since they're not exported, see
-------------------------------------------------------------
commit 6468463abd7051fcc29f3ee7c931f9bbbb26f5a4
Author: Len Brown
Date: Mon Jun 26 23:41:38 2006 -0400ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)
Signed-off-by: Len Brown
-------------------------------------------------------------Signed-off-by: Lin Ming
Signed-off-by: Len Brown
11 Oct, 2008
1 commit
-
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