03 Sep, 2019

1 commit


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
     

14 Sep, 2017

1 commit


25 Dec, 2016

1 commit


27 Sep, 2016

1 commit

  • Added one additional parameter to thermal_zone_device_update() to provide
    caller with an optional capability to specify reason.
    Currently this event is used by user space governor to trigger different
    processing based on event code. Also it saves an additional call to read
    temperature when the event is received.
    The following events are cuurently defined:
    - Unspecified event
    - New temperature sample
    - Trip point violated
    - Trip point changed
    - thermal device up and down
    - thermal device power capability changed

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Zhang Rui

    Srinivas Pandruvada
     

22 Jun, 2016

1 commit

  • alloc_workqueue replaces deprecated create_workqueue().

    A dedicated workqueue has been used since the workqueue
    acpi_thermal_pm_queue with workitem &tz->thermal_check_work
    (maps to acpi_thermal_check_fn), is involved in thermal zone polling.
    Wallclock time is actually important and getting delayed in handling
    critical temperature event can actually lead to unnecessary hardware
    damage. So while this is not used during memory reclaim, we still want
    forward progress guarantee and be generally snappy in servicing it.
    Hence, WQ_MEM_RECLAIM and WQ_HIGHPRI have been used here.

    Since there are only a fixed number of work items, explicit concurrency
    limit is unnecessary here.

    Signed-off-by: Bhaktipriya Shridhar
    Acked-by: Tejun Heo
    Signed-off-by: Rafael J. Wysocki

    Bhaktipriya Shridhar
     

10 Oct, 2015

1 commit


12 Sep, 2015

1 commit

  • Pull thermal updates from Zhang Rui:

    - use int instead of unsigned long to represent temperature to avoid
    bogus overheat detection when negative temperature reported. From
    Sascha Hauer.

    - export available thermal governors information to user space via
    sysfs. From Wei Ni.

    - introduce new thermal driver for Wildcat Point platform controller
    hub, which uses PCH thermal sensor and associated critical and hot
    trip points. From Tushar Dave.

    - add suuport for Intel Skylake and Denlow platforms in powerclamp
    driver.

    - some small cleanups in thermal core.

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    thermal: Add Intel PCH thermal driver
    thermal: Add comment explaining test for critical temperature
    thermal: Use IS_ENABLED instead of #ifdef
    thermal: remove unnecessary call to thermal_zone_device_set_polling
    thermal: trivial: fix typo in comment
    thermal: consistently use int for temperatures
    thermal: add available policies sysfs attribute
    thermal/powerclamp: add cpu id for denlow platform
    thermal/powerclamp: add cpu id for Skylake u/y
    thermal/powerclamp: add cpu id for skylake h/s

    Linus Torvalds
     

03 Aug, 2015

1 commit

  • The thermal code uses int, long and unsigned long for temperatures
    in different places.

    Using an unsigned type limits the thermal framework to positive
    temperatures without need. Also several drivers currently will report
    temperatures near UINT_MAX for temperatures below 0°C. This will probably
    immediately shut the machine down due to overtemperature if started below
    0°C.

    'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
    is above the melting point of all known materials.

    Consistently use a plain 'int' for temperatures throughout the thermal code and
    the drivers. This only changes the places in the drivers where the temperature
    is passed around as pointer, when drivers internally use another type this is
    not changed.

    Signed-off-by: Sascha Hauer
    Acked-by: Geert Uytterhoeven
    Reviewed-by: Jean Delvare
    Reviewed-by: Lukasz Majewski
    Reviewed-by: Darren Hart
    Reviewed-by: Heiko Stuebner
    Reviewed-by: Peter Feuerer
    Cc: Punit Agrawal
    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: Jean Delvare
    Cc: Peter Feuerer
    Cc: Heiko Stuebner
    Cc: Lukasz Majewski
    Cc: Stephen Warren
    Cc: Thierry Reding
    Cc: linux-acpi@vger.kernel.org
    Cc: platform-driver-x86@vger.kernel.org
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-omap@vger.kernel.org
    Cc: linux-samsung-soc@vger.kernel.org
    Cc: Guenter Roeck
    Cc: Rafael J. Wysocki
    Cc: Maxime Ripard
    Cc: Darren Hart
    Cc: lm-sensors@lm-sensors.org
    Signed-off-by: Zhang Rui

    Sascha Hauer
     

08 Jul, 2015

1 commit


05 May, 2015

1 commit

  • Currently you can specify the weight of the cooling device in the device
    tree but that information is not populated to the
    thermal_bind_params where the fair share governor expects it to
    be. The of thermal zone device doesn't have a thermal_bind_params
    structure and arguably it's better to pass the weight inside the
    thermal_instance as it is specific to the bind of a cooling device to a
    thermal zone parameter.

    Core thermal code is fixed to populate the weight in the instance from
    the thermal_bind_params, so platform code that was passing the weight
    inside the thermal_bind_params continue to work seamlessly.

    While we are at it, create a default value for the weight parameter for
    those thermal zones that currently don't define it and remove the
    hardcoded default in of-thermal.

    Cc: Zhang Rui
    Cc: "Rafael J. Wysocki"
    Cc: Len Brown
    Cc: Peter Feuerer
    Cc: Darren Hart
    Cc: Eduardo Valentin
    Cc: Kukjin Kim
    Cc: Durgadoss R
    Signed-off-by: Kapileshwar Singh
    Signed-off-by: Eduardo Valentin

    Kapileshwar Singh
     

10 Oct, 2014

1 commit


29 May, 2014

1 commit


27 May, 2014

1 commit


26 May, 2014

1 commit

  • When the thermal module is to be removed, we should destroy the wq
    acpi_thermal_pm_queue after the ACPI driver's remove callback is
    executed as we will need to flush the workqueue there, or a NULL pointer
    access will be hit.

    Reported-and-tested-by: Kui Zhang
    References: http://www.spinics.net/lists/kernel/msg1747251.html
    Cc: All applicable
    Signed-off-by: Aaron Lu
    Signed-off-by: Rafael J. Wysocki

    Aaron Lu
     

07 Apr, 2014

1 commit


05 Mar, 2014

1 commit


13 Feb, 2014

1 commit


13 Jan, 2014

1 commit

  • * acpi-gpe:
    ACPI / EC: disable GPE before removing GPE handler
    ACPI / Button: Fix enabling button GPEs twice

    * acpi-video:
    ACPI: Blacklist Win8 OSI for some HP laptop 2013 models
    ACPI / video: Fix typo in video_detect.c

    * acpi-thermal:
    ACPI / thermal: remove const from thermal_zone_device_ops declaration

    * acpi-processor:
    ACPI / scan: bail out early if failed to parse APIC ID for CPU

    * acpi-sleep:
    ACPI / sleep: remove panic in case hardware has changed after S4

    Rafael J. Wysocki
     

08 Jan, 2014

1 commit

  • The following commit introduced the requirement to not declare
    thermal_zone_device_ops structs as const in order to allow
    changing the .get_temp callback.

    commit 4e5e4705bf69ea450f58fc709ac5888f321a9299
    Author: Eduardo Valentin
    Date: Wed Jul 3 15:35:39 2013 -0400

    thermal: introduce device tree parser

    Modify acpi_thermal_zone_ops to follow the new requirement.

    Signed-off-by: Emil Goode
    Acked-by: Eduardo Valentin
    [rjw: Changelog]
    Signed-off-by: Rafael J. Wysocki

    Emil Goode
     

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
     

14 Nov, 2013

1 commit

  • Pull thermal management updates from Zhang Rui:
    "This time we only have a few changes as there are no soc thermal
    changes from Eduardo. The only big change is the introduction of
    TMON, a tool to help visualize, tune, and test the thermal subsystem.
    The rest is mostly cleanups and fixes all over.

    Specifics:

    - introduce TMON, a tool base on thermal sysfs I/F. It can be used
    to visualize, tune and test the thermal subsystem.

    - fix a zone/cooling device binding problem, when both thermal zone
    bind parameters and .bind() callback are available"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    tools/thermal: Introduce tmon, a tool for thermal subsystem
    thermal: Fix binding problem when there is thermal zone params
    thermal: cpu_cooling: fix return value check in cpufreq_cooling_register()
    Thermal: Check for validity before doing kfree
    thermal/intel_powerclamp: Add newer CPU models
    Thermal: Tidy up error handling in powerclamp_init
    thermal: Kconfig: cosmetic fixes
    ACPI/thermal : Remove zone disabled warning
    typo in drivers/thermal/Kconfig: lpatform instead of platform

    Linus Torvalds
     

01 Oct, 2013

1 commit


30 Sep, 2013

1 commit

  • Once thermal zone is disabled to move thermal control to user space,
    too many warnings printed in logs. Remove pr_warn from this path,
    instead warn when user mode issues request to disable thermal zone.

    Signed-off-by: Srinivas Pandruvada
    Acked-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Srinivas Pandruvada
     

30 Aug, 2013

1 commit


29 Aug, 2013

1 commit


27 Aug, 2013

1 commit

  • * acpi-assorted:
    ACPI / osl: Kill macro INVALID_TABLE().
    earlycpio.c: Fix the confusing comment of find_cpio_data().
    ACPI / x86: Print Hot-Pluggable Field in SRAT.
    ACPI / thermal: Use THERMAL_TRIPS_NONE macro to replace number
    ACPI / thermal: Remove unused macros in the driver/acpi/thermal.c
    ACPI / thermal: Remove the unused lock of struct acpi_thermal
    ACPI / osl: Fix osi_setup_entries[] __initdata attribute location
    ACPI / numa: Fix __init attribute location in slit_valid()
    ACPI / dock: Fix __init attribute location in find_dock_and_bay()
    ACPI / Sleep: Fix incorrect placement of __initdata
    ACPI / processor: Fix incorrect placement of __initdata
    ACPI / EC: Fix incorrect placement of __initdata
    ACPI / scan: Drop unnecessary label from acpi_create_platform_device()
    ACPI: Move acpi_bus_get_device() from bus.c to scan.c
    ACPI / scan: Allow platform device creation without any IO resources
    ACPI: Cleanup sparse warning on acpi_os_initialize1()
    platform / thinkpad: Remove deprecated hotkey_report_mode parameter
    ACPI: Remove the old /proc/acpi/event interface

    Rafael J. Wysocki
     

15 Aug, 2013

3 commits


15 Jul, 2013

2 commits


26 Apr, 2013

1 commit

  • Commit 4ae46be "Thermal: Introduce thermal_zone_trip_update()"
    introduced a regression causing the fan to be always on even when
    the system is idle.

    My original idea in that commit is that:
    - when the current temperature is above the trip point,
    keep the fan on, even if the temperature is dropping.
    - when the current temperature is below the trip point,
    turn on the fan when the temperature is raising,
    turn off the fan when the temperature is dropping.

    But this is what the code actually does:
    - when the current temperature is above the trip point,
    the fan keeps on.
    - when the current temperature is below the trip point,
    the fan is always on because thermal_get_trend()
    in driver/acpi/thermal.c returns THERMAL_TREND_RAISING.
    Thus the fan keeps running even if the system is idle.

    Fix this in drivers/acpi/thermal.c.

    [rjw: Changelog]
    References: https://bugzilla.kernel.org/show_bug.cgi?id=56591
    References: https://bugzilla.kernel.org/show_bug.cgi?id=56601
    References: https://bugzilla.kernel.org/show_bug.cgi?id=50041#c45
    Signed-off-by: Zhang Rui
    Tested-by: Matthias
    Tested-by: Ville Syrjälä
    Cc: 3.7+
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

15 Feb, 2013

1 commit

  • * acpi-assorted:
    ACPI: Add DMI entry for Sony VGN-FW41E_H
    ACPI: fix obsolete comment in custom_method.c
    ACPI / thermal: Use mode to enable/disable kernel thermal processing
    ACPI thermal: remove unnecessary newline from exception message
    ACPI sysfs: remove unnecessary newline from exception
    ACPI video: remove unnecessary newline from error messages
    ACPI: SRAT: report non-volatile memory in debug
    ACPI: Rework acpi_get_child() to be more efficient

    Rafael J. Wysocki
     

26 Jan, 2013

3 commits


12 Dec, 2012

1 commit

  • Pull thermal management update from Zhang Rui:
    "Highlights:

    - Introduction of thermal policy support, together with three new
    thermal governors, including step_wise, user_space, fire_share.

    - Introduction of ST-Ericsson db8500_thermal driver and ST-Ericsson
    db8500_cpufreq_cooling driver.

    - Thermal Kconfig file and Makefile refactor.

    - Fixes for generic thermal layer, generic cpucooling, rcar thermal
    driver and Exynos thermal driver."

    * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (36 commits)
    Thermal: Fix DEFAULT_THERMAL_GOVERNOR
    Thermal: fix a NULL pointer dereference when generic thermal layer is built as a module
    thermal: rcar: add rcar_zone_to_priv() macro
    thermal: rcar: fixup the unit of temperature
    thermal: cpu cooling: allow module builds
    thermal: cpu cooling: use const parameter while registering
    Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
    Thermal: Add ST-Ericsson DB8500 thermal driver.
    drivers/thermal/Makefile refactor
    Exynos: Add missing dependency
    Refactor drivers/thermal/Kconfig
    thermal: cpu_cooling: Make 'notify_device' static
    Thermal: Remove the cooling_cpufreq_list.
    Thermal: fix bug of counting cpu frequencies.
    Thermal: add indent for code alignment.
    thermal: rcar_thermal: remove explicitly used devm_kfree/iounap()
    thermal: user_space: Add missing static storage class specifiers
    thermal: fair_share: Add missing static storage class specifiers
    thermal: step_wise: Add missing static storage class specifiers
    Thermal: Fix oops and unlocking in thermal_sys.c
    ...

    Linus Torvalds
     

28 Nov, 2012

1 commit

  • On some platforms, _TMP and _CRT/_HOT/_PSV/_ACx have dependency.
    And there is no way for OS to detect this dependency.

    commit 9bcb8118965ab4631a65ee0726e6518f75cda6c5 shows us a problem
    that _TMP must be evaluate after _CRT/_HOT/_PSV/_ACx, or else
    firmware will shutdown the system.

    But the machine in https://bugzilla.kernel.org/show_bug.cgi?id=43284
    shows us that _PSV would return valid value only if _TMP has been
    evaluated once.

    With this patch, all of the control methods will be evaluated once,
    in the _CRT/_HOT/_PSV/_CRT/_TMP order, before they are actually used.

    [rjw: Added a local variable for the handle and modified the loop
    slightly.]
    Signed-off-by: Zhang Rui
    Tested-by: katabami
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

05 Nov, 2012

1 commit