16 Nov, 2020

1 commit

  • The following warning is reported if lock debugging is enabled.

    DEBUG_LOCKS_WARN_ON(1)
    WARNING: CPU: 1 PID: 1 at kernel/locking/lockdep.c:4617 lockdep_init_map_waits+0x141/0x222
    ...
    Call Trace:
    __kernfs_create_file+0x7a/0xd8
    sysfs_add_file_mode_ns+0x135/0x189
    sysfs_create_file_ns+0x70/0xa0
    acpi_fan_probe+0x547/0x621
    platform_drv_probe+0x67/0x8b
    ...

    Dynamically allocated sysfs attributes need to be initialized to avoid
    the warning.

    Fixes: d19e470b6605 ("ACPI: fan: Expose fan performance state information")
    Signed-off-by: Guenter Roeck
    Cc: 5.6+ # 5.6+
    Signed-off-by: Rafael J. Wysocki

    Guenter Roeck
     

11 Nov, 2020

1 commit


01 Jul, 2020

1 commit

  • Tiger Lake's new unique ACPI device ID for Fan is not valid
    because of missing 'C' in the ID. Use correct fan device ID.

    Fixes: c248dfe7e0ca ("ACPI: fan: Add Tiger Lake ACPI device ID")
    Signed-off-by: Sumeet Pawnikar
    Cc: 5.6+ # 5.6+
    [ rjw: Subject and changelog edits ]
    Signed-off-by: Rafael J. Wysocki

    Sumeet Pawnikar
     

14 Mar, 2020

1 commit


27 Jan, 2020

1 commit

  • * acpi-battery:
    ACPI / battery: Deal better with neither design nor full capacity not being reported
    ACPI / battery: Use design-cap for capacity calculations if full-cap is not available
    ACPI / battery: Deal with design or full capacity being reported as -1

    * acpi-video:
    ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards
    ACPI: video: Use native backlight on Lenovo E41-25/45
    ACPI: video: fix typo in comment

    * acpi-fan:
    ACPI: fan: Expose fan performance state information

    * acpi-drivers:
    thermal: int340x_thermal: Add Tiger Lake ACPI device IDs
    platform/x86: intel-hid: Add Tiger Lake ACPI device ID
    ACPI: fan: Add Tiger Lake ACPI device ID
    ACPI: DPTF: Add Tiger Lake ACPI device IDs

    Rafael J. Wysocki
     

20 Dec, 2019

2 commits

  • Tiger Lake has a new unique ACPI device ID for the ACPI fan that
    needs to be added to the fan driver and to the blacklist in
    acpi_dev_pm_attach() to support it.

    Signed-off-by: Gayatri Kammela
    [ rjw: Subject & changelog, fold in another patch ]
    Signed-off-by: Rafael J. Wysocki

    Gayatri Kammela
     
  • When _FPS indicates variable speed fan support, the thermal cooling
    device for fan shows max performance state count as "max_state"
    (greater than or equal to 1).

    But the thermal cooling device doesn't expose the properties of each
    performance state. This is not enough for smart fan control user
    space software, which also considers speed, power and noise level.

    This change exposes the properties of the fan performance states
    in the sysfs directory of the ACPI device representing the fan,
    that is

    /sys/bus/acpi/devices/devices/INT3404:00

    or

    /sys/bus/platform/devices/PNP0C0B:00.

    For example:

    $ ls /sys/bus/acpi/devices/INT3404\:00
    description path state0 state11 state4 state7 status
    hid physical_node state1 state2 state5 state8 subsystem
    modalias power state10 state3 state6 state9 uevent
    uid wakeup

    where each state* attribute lists the properties of a fan performance
    state in the following format:

    control_percent:trip_point:speed_rpm:noise_level_mdb:power_mw

    $ cat /sys/bus/acpi/devices/INT3404\:00/state10
    95:0:11600:47500:4500

    as documented in

    Documentation/admin-guide/acpi/fan_performance_states.rst

    While at it, return the correct error code from acpi_fan_probe()
    when acpi_fan_get_fps() or acpi_fan_get_fif() fails.

    Suggested-by: Rafael J. Wysocki
    Signed-off-by: Srinivas Pandruvada
    [ rjw: Subject, changelog, documentation ]
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada
     

31 May, 2019

1 commit

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

13 Jun, 2018

1 commit

  • The devm_kzalloc() function has a 2-factor argument form, devm_kcalloc().
    This patch replaces cases of:

    devm_kzalloc(handle, a * b, gfp)

    with:
    devm_kcalloc(handle, a * b, gfp)

    as well as handling cases of:

    devm_kzalloc(handle, a * b * c, gfp)

    with:

    devm_kzalloc(handle, array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    devm_kcalloc(handle, array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    devm_kzalloc(handle, 4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    Some manual whitespace fixes were needed in this patch, as Coccinelle
    really liked to write "=devm_kcalloc..." instead of "= devm_kcalloc...".

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    expression HANDLE;
    type TYPE;
    expression THING, E;
    @@

    (
    devm_kzalloc(HANDLE,
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression HANDLE;
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    expression HANDLE;
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    expression HANDLE;
    identifier SIZE, COUNT;
    @@

    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression HANDLE;
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression HANDLE;
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    devm_kzalloc(HANDLE,
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    expression HANDLE;
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    devm_kzalloc(HANDLE,
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression HANDLE;
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    devm_kzalloc(HANDLE,
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression HANDLE;
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    devm_kzalloc(HANDLE, sizeof(THING) * C2, ...)
    |
    devm_kzalloc(HANDLE, sizeof(TYPE) * C2, ...)
    |
    devm_kzalloc(HANDLE, C1 * C2 * C3, ...)
    |
    devm_kzalloc(HANDLE, C1 * C2, ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - devm_kzalloc
    + devm_kcalloc
    (HANDLE,
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

26 Mar, 2018

1 commit

  • Some functions definitions have either the initial open brace and/or
    the closing brace outside of column 1.

    Move those braces to column 1.

    This allows various function analyzers like gnu complexity to work
    properly for these modified functions.

    Signed-off-by: Joe Perches
    Acked-by: Andy Shevchenko
    Acked-by: Paul Moore
    Acked-by: Alex Deucher
    Acked-by: Dave Chinner
    Reviewed-by: Darrick J. Wong
    Acked-by: Alexandre Belloni
    Acked-by: Martin K. Petersen
    Acked-by: Takashi Iwai
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Rafael J. Wysocki
    Acked-by: Nicolin Chen
    Acked-by: Martin K. Petersen
    Acked-by: Steven Rostedt (VMware)
    Signed-off-by: Jiri Kosina

    Joe Perches
     

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

    Srinivas Pandruvada
     

10 Mar, 2016

1 commit


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

    Andy Lutomirski
     

08 Jul, 2015

1 commit


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

    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

    Srinivas Pandruvada
     

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
    ...

    Linus Torvalds
     

10 Oct, 2014

6 commits


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 removed

    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Rafael J. Wysocki

    Sudip Mukherjee
     

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

    Aaron Lu
     

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

    Shuah Khan
     

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

    Lv Zheng
     

24 Sep, 2013

1 commit


30 Jul, 2013

1 commit


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

    Naresh Bhat
     

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

    Colin Ian King
     

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

    Rafael J. Wysocki
     

22 Sep, 2012

1 commit


10 Aug, 2012

1 commit


01 Jul, 2012

2 commits


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

    Vasiliy Kulikov
     

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

    Rafael J. Wysocki
     

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

    Zhang Rui
     

30 Sep, 2010

1 commit