1. 07 Dec, 2018 2 commits
  2. 25 Oct, 2018 1 commit
  3. 02 Nov, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      How this work was done:
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
      All documentation files were explicitly excluded.
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
         For non */uapi/* files that summary was:
         SPDX license identifier                            # files
         GPL-2.0                                              11139
         and resulted in the first patch in this series.
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                        930
         and resulted in the second patch in this series.
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
         SPDX license identifier                            # files
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
         and that resulted in the third patch in this series.
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  4. 19 Oct, 2017 1 commit
  5. 11 Aug, 2017 1 commit
  6. 23 Apr, 2017 1 commit
  7. 07 Apr, 2017 2 commits
    • Steve Twiss's avatar
      thermal: da9062/61: Thermal junction temperature monitoring driver · 608567aa
      Steve Twiss authored
      Add junction temperature monitoring supervisor device driver, compatible
      with the DA9062 and DA9061 PMICs. A MODULE_DEVICE_TABLE() macro is added.
      If the PMIC's internal junction temperature rises above T_WARN (125 degC)
      an interrupt is issued. This T_WARN level is defined as the
      THERMAL_TRIP_HOT trip-wire inside the device driver.
      The thermal triggering mechanism is interrupt based and happens when the
      temperature rises above a given threshold level. The component cannot
      return an exact temperature, it only has knowledge if the temperature is
      above or below a given threshold value. A status bit must be polled to
      detect when the temperature falls below that threshold level again. A
      kernel work queue is configured to repeatedly poll and detect when the
      temperature falls below this trip-wire, between 1 and 10 second intervals
      (defaulting at 3 seconds).
      This scheme is provided as an example. It would be expected that any
      final implementation will also include a notify() function and any of these
      settings could be altered to match the application where appropriate.
      When over-temperature is reached, the interrupt from the DA9061/2 will be
      repeatedly triggered. The IRQ is therefore disabled when the first
      over-temperature event happens and the status bit is polled using a
      work-queue until it becomes false.
      This strategy is designed to allow the periodic transmission of uevents
      (HOT trip point) as the first level of temperature supervision method. It
      is intended for non-invasive temperature control, where the necessary
      measures for cooling the system down are left to the host software. Once
      the temperature falls again, the IRQ is re-enabled so a new critical
      over-temperature event can be detected.
      Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: default avatarSteve Twiss <stwiss.opensource@diasemi.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
    • Rafał Miłecki's avatar
      thermal: broadcom: add Northstar thermal driver · a94cb7ee
      Rafał Miłecki authored
      Northstar is a SoC family commonly used in home routers. This commit
      adds a driver for checking CPU temperature. As Northstar Plus seems to
      also have this IP block this new symbol gets ARCH_BCM_IPROC dependency.
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarJon Mason <jon.mason@broadcom.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
  8. 01 Apr, 2017 1 commit
  9. 15 Mar, 2017 1 commit
  10. 19 Feb, 2017 1 commit
  11. 20 Jan, 2017 1 commit
  12. 23 Nov, 2016 2 commits
  13. 27 Sep, 2016 3 commits
  14. 05 Sep, 2016 1 commit
  15. 17 May, 2016 3 commits
  16. 18 Feb, 2016 1 commit
  17. 30 Oct, 2015 1 commit
  18. 04 Aug, 2015 1 commit
  19. 03 Jun, 2015 1 commit
  20. 05 May, 2015 2 commits
    • Javi Merino's avatar
      thermal: introduce the Power Allocator governor · 6b775e87
      Javi Merino authored
      The power allocator governor is a thermal governor that controls system
      and device power allocation to control temperature.  Conceptually, the
      implementation divides the sustainable power of a thermal zone among
      all the heat sources in that zone.
      This governor relies on "power actors", entities that represent heat
      sources.  They can report current and maximum power consumption and
      can set a given maximum power consumption, usually via a cooling
      The governor uses a Proportional Integral Derivative (PID) controller
      driven by the temperature of the thermal zone.  The output of the
      controller is a power budget that is then allocated to each power
      actor that can have bearing on the temperature we are trying to
      control.  It decides how much power to give each cooling device based
      on the performance they are requesting.  The PID controller ensures
      that the total power budget does not exceed the control temperature.
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: default avatarPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: default avatarJavi Merino <javi.merino@arm.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
    • Ivan T. Ivanov's avatar
      thermal: Add QPNP PMIC temperature alarm driver · c610afaa
      Ivan T. Ivanov authored
      Add support for the temperature alarm peripheral found inside
      Qualcomm plug-and-play (QPNP) PMIC chips. The temperature alarm
      peripheral outputs a pulse on an interrupt line whenever the
      thermal over temperature stage value changes.
      Register a thermal sensor. The temperature reported by this thermal
      sensor device should reflect the actual PMIC die temperature if an
      ADC is present on the given PMIC. If no ADC is present, then the
      reported temperature should be estimated from the over temperature
      stage value.
      Cc: David Collins <collinsd@codeaurora.org>
      Signed-off-by: default avatarIvan T. Ivanov <iivanov@mm-sol.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
  21. 01 May, 2015 2 commits
    • Ong, Boon Leong's avatar
      thermal: intel Quark SoC X1000 DTS thermal driver · 8c187693
      Ong, Boon Leong authored
      In Intel Quark SoC X1000, there is one on-die digital temperature sensor(DTS).
      The DTS offers both hot & critical trip points.
      However, in current distribution of UEFI BIOS for Quark platform, only
      critical trip point is configured to be 105 degree Celsius (based on Quark
      SW ver1.0.1 and hot trip point is not used due to lack of IRQ.
      There is no active cooling device for Quark SoC, so Quark SoC thermal
      management logic expects Linux distro to orderly power-off when temperature
      of the DTS exceeds the configured critical trip point.
      Kernel param "polling_delay" in milliseconds is used to control the frequency
      the DTS temperature is read by thermal framework. It defaults to 2-second.
      To change it, use kernel boot param "intel_quark_dts_thermal.polling_delay=X".
      User interacts with Quark SoC DTS thermal driver through sysfs via:
      For example:
       - to read DTS temperature
         $ cat temp
       - to read critical trip point
         $ cat trip_point_0_temp
       - to read trip point type
         $ cat trip_point_0_type
       - to emulate temperature raise to test orderly shutdown by Linux distro
         $ echo 105 > emul_temp
      Tested-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
      Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
      Reviewed-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
      Reviewed-by: default avatarKweh, Hock Leong <hock.leong.kweh@intel.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
    • Srinivas Pandruvada's avatar
      Thermal: Intel SoC: DTS thermal IOSF core · ee073604
      Srinivas Pandruvada authored
      This is becoming a common feature for Intel SoCs to expose the additional
      digital temperature sensors (DTSs) using side band interface (IOSF). This
      change remove common IOSF DTS handler function from the existing driver
      intel_soc_dts_thermal.c and creates a stand alone module, which can
      be selected from the SoC specific drivers. In this way there is less
      code duplication.
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
  22. 24 Nov, 2014 1 commit
  23. 20 Nov, 2014 2 commits
    • Mikko Perttunen's avatar
      thermal: Add Tegra SOCTHERM thermal management driver · 66fb8480
      Mikko Perttunen authored
      This adds support for the Tegra SOCTHERM thermal sensing and management
      system found in the Tegra124 system-on-chip. This initial driver supports
      temperature polling for four thermal zones.
      Signed-off-by: default avatarMikko Perttunen <mperttunen@nvidia.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
    • Eduardo Valentin's avatar
      thermal: introduce clock cooling device · f9df89d8
      Eduardo Valentin authored
      This patch introduces a new thermal cooling device based on common clock
      framework. The original motivation to write this cooling device is to be
      able to cool down thermal zones using clocks that feed co-processors, such
      as GPUs, DSPs, Image Processing Co-processors, etc. But it is written
      in a way that it can be used on top of any clock.
      The implementation is pretty straight forward. The code creates
      a thermal cooling device based on a pair of a struct device and a clock name.
      The struct device is assumed to be usable by the OPP layer. The OPP layer
      is used as source of the list of possible frequencies. The (cpufreq) frequency
      table is then used as a map from frequencies to cooling states. Cooling
      states are indexes to the frequency table.
      The logic sits on top of common clock framework, specifically on clock
      pre notifications. Any PRE_RATE_CHANGE is hijacked, and the transition is
      only allowed when the new rate is within the thermal limit (cooling state -> freq).
      When a thermal cooling device state transition is requested, the clock
      is also checked to verify if the current clock rate is within the new
      thermal limit.
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Mike Turquette <mturquette@linaro.org>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
  24. 11 Oct, 2014 1 commit
  25. 10 Oct, 2014 1 commit
  26. 27 Aug, 2014 1 commit
    • Peter Feuerer's avatar
      thermal: Added Bang-bang thermal governor · e4dbf98f
      Peter Feuerer authored
      The bang-bang thermal governor uses a hysteresis to switch abruptly on
      or off a cooling device.  It is intended to control fans, which can
      not be throttled but just switched on or off.
      Bang-bang cannot be set as default governor as it is intended for
      special devices only.  For those special devices the driver needs to
      explicitely request it.
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Andreas Mohr <andi@lisas.de>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Javi Merino <javi.merino@arm.com>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: default avatarPeter Feuerer <peter@piie.net>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
  27. 15 Jul, 2014 1 commit
  28. 15 May, 2014 1 commit
    • Srinivas Pandruvada's avatar
      thermal: Intel SoC DTS thermal · bc40b5e3
      Srinivas Pandruvada authored
      In the Intel SoCs like Bay Trail, there are 2 additional digital temperature
      sensors(DTS), in addition to the standard DTSs in the core. Also they support
      4 programmable thresholds, out of which two can be used by OSPM. These
      thresholds can be used by OSPM thermal control. Out of these two thresholds,
      one is used by driver and one user mode can change via thermal sysfs to get
      notifications on threshold violations.
      The driver defines one critical trip points, which is set to TJ MAX - offset.
      The offset can be changed via module parameter (default 5C). Also it uses
      one of the thresholds to get notification for this temperature violation.
      This is very important for orderly shutdown as the many of these devices don't
      have ACPI thermal zone, and expects that there is some other thermal control
      mechanism present in OSPM. When a Linux distro is used without additional
      specialized thermal control program, BIOS can do force shutdown when thermals
      are not under control. When temperature reaches critical, the Linux thermal
      core will initiate an orderly shutdown.
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
  29. 02 Jan, 2014 1 commit
  30. 04 Dec, 2013 1 commit
    • Eduardo Valentin's avatar
      thermal: introduce device tree parser · 4e5e4705
      Eduardo Valentin authored
      This patch introduces a device tree bindings for
      describing the hardware thermal behavior and limits.
      Also a parser to read and interpret the data and feed
      it in the thermal framework is presented.
      This patch introduces a thermal data parser for device
      tree. The parsed data is used to build thermal zones
      and thermal binding parameters. The output data
      can then be used to deploy thermal policies.
      This patch adds also documentation regarding this
      API and how to define tree nodes to use
      this infrastructure.
      Note that, in order to be able to have control
      on the sensor registration on the DT thermal zone,
      it was required to allow changing the thermal zone
      .get_temp callback. For this reason, this patch
      also removes the 'const' modifier from the .ops
      field of thermal zone devices.
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>