An error occurred fetching the project authors.
  1. 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>
      e4dbf98f
  2. 29 Jul, 2014 3 commits
  3. 03 Mar, 2014 2 commits
    • Zhang Rui's avatar
      Thermal: thermal zone governor fix · f2234bcd
      Zhang Rui authored
      This patch does a cleanup about the thermal zone govenor,
      setting and make the following rule.
      1. For thermal zone devices that are registered w/o tz->tzp,
         they can use the default thermal governor only.
      2. For thermal zone devices w/ governor name specified in
         tz->tzp->governor_name, we will use the default govenor
         if the governor specified is not available at the moment,
         and update tz->governor when the matched governor is registered.
      
      This also fixes a problem that OF registered thermal zones
      are running with no governor.
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Acked-by: default avatarJavi Merino <javi.merino@arm.com>
      f2234bcd
    • Ni Wade's avatar
      Thermal: Allow first update of cooling device state · 5ca0cce5
      Ni Wade authored
      In initialization, if the cooling device is initialized at
      max cooling state, and the thermal zone temperature is below
      the first trip point, then the cooling state can't be updated
      to the right state, untill the first trip point be triggered.
      
      To fix this issue, allow first update of cooling device state
      during registration, initialized "updated" device field as
      "false" (instead of "true").
      Signed-off-by: default avatarWei Ni <wni@nvidia.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      5ca0cce5
  4. 03 Jan, 2014 1 commit
  5. 02 Jan, 2014 1 commit
    • Aaron Lu's avatar
      thermal: debug: add debug statement for core and step_wise · 06475b55
      Aaron Lu authored
      To ease debugging thermal problem, add these dynamic debug statements
      so that user do not need rebuild kernel to see these info.
      
      Based on a patch from Zhang Rui for debugging on bugzilla:
      https://bugzilla.kernel.org/attachment.cgi?id=98671
      
      A sample output after we turn on dynamic debug with the following cmd:
      # echo 'module thermal_sys +fp' > /sys/kernel/debug/dynamic_debug/control
      is like:
      
      [  355.147627] update_temperature: thermal thermal_zone0: last_temperature=52000, current_temperature=55000
      [  355.147636] thermal_zone_trip_update: thermal thermal_zone0: Trip1[type=1,temp=79000]:trend=2,throttle=0
      [  355.147644] get_target_state: thermal cooling_device8: cur_state=0
      [  355.147647] thermal_zone_trip_update: thermal cooling_device8: old_target=-1, target=-1
      [  355.147652] get_target_state: thermal cooling_device7: cur_state=0
      [  355.147655] thermal_zone_trip_update: thermal cooling_device7: old_target=-1, target=-1
      [  355.147660] get_target_state: thermal cooling_device6: cur_state=0
      [  355.147663] thermal_zone_trip_update: thermal cooling_device6: old_target=-1, target=-1
      [  355.147668] get_target_state: thermal cooling_device5: cur_state=0
      [  355.147671] thermal_zone_trip_update: thermal cooling_device5: old_target=-1, target=-1
      [  355.147678] thermal_zone_trip_update: thermal thermal_zone0: Trip2[type=0,temp=90000]:trend=1,throttle=0
      [  355.147776] get_target_state: thermal cooling_device0: cur_state=0
      [  355.147783] thermal_zone_trip_update: thermal cooling_device0: old_target=-1, target=-1
      [  355.147792] thermal_zone_trip_update: thermal thermal_zone0: Trip3[type=0,temp=80000]:trend=1,throttle=0
      [  355.147845] get_target_state: thermal cooling_device1: cur_state=0
      [  355.147849] thermal_zone_trip_update: thermal cooling_device1: old_target=-1, target=-1
      [  355.147856] thermal_zone_trip_update: thermal thermal_zone0: Trip4[type=0,temp=70000]:trend=1,throttle=0
      [  355.147904] get_target_state: thermal cooling_device2: cur_state=0
      [  355.147908] thermal_zone_trip_update: thermal cooling_device2: old_target=-1, target=-1
      [  355.147915] thermal_zone_trip_update: thermal thermal_zone0: Trip5[type=0,temp=60000]:trend=1,throttle=0
      [  355.147963] get_target_state: thermal cooling_device3: cur_state=0
      [  355.147967] thermal_zone_trip_update: thermal cooling_device3: old_target=-1, target=-1
      [  355.147973] thermal_zone_trip_update: thermal thermal_zone0: Trip6[type=0,temp=55000]:trend=1,throttle=1
      [  355.148022] get_target_state: thermal cooling_device4: cur_state=0
      [  355.148025] thermal_zone_trip_update: thermal cooling_device4: old_target=-1, target=1
      [  355.148036] thermal_cdev_update: thermal cooling_device4: zone0->target=1
      [  355.169279] thermal_cdev_update: thermal cooling_device4: set to state 1
      Signed-off-by: default avatarAaron Lu <aaron.lu@intel.com>
      Acked-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      06475b55
  6. 04 Dec, 2013 3 commits
    • Eduardo Valentin's avatar
      thermal: core: introduce thermal_of_cooling_device_register · a116b5d4
      Eduardo Valentin authored
      This patch adds a new API to allow registering cooling devices
      in the thermal framework derived from device tree nodes.
      
      This API links the cooling device with the device tree node
      so that binding with thermal zones is possible, given
      that thermal zones are pointing to cooling device
      device tree nodes.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      a116b5d4
    • 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>
      4e5e4705
    • Eduardo Valentin's avatar
      thermal: allow registering without .get_temp · 81bd4e1c
      Eduardo Valentin authored
      This patch changes the thermal core driver to allow
      registration of thermal zones without the .get_temp callback.
      
      The idea behind this change is to allow lazy registration
      of sensor callbacks.
      
      The thermal zone will be disabled whenever the ops
      does not contain a .get_temp callback. The sysfs interface
      will be returning -EINVAL on any temperature read operation.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      81bd4e1c
  7. 19 Nov, 2013 2 commits
  8. 06 Nov, 2013 1 commit
  9. 14 Oct, 2013 1 commit
    • durgadoss.r@intel.com's avatar
      Thermal: Check for validity before doing kfree · 732e4c8d
      durgadoss.r@intel.com authored
      The thermal_release function is called whenever
      any device belonging to 'thermal' class unregisters.
      This function performs kfree(cdev) without any check.
      In cases where there are more device registrations
      other than just 'thermal_zone' and 'cooling_device'
      this might accidently free memory allocated them
      silently; and cause memory errors.
      
      This patch changes this behavior by doing
      kfree(cdev) only when the device pointer belongs
      to a real cdev i.e. cooling_device.
      Signed-off-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      732e4c8d
  10. 03 Sep, 2013 3 commits
    • Eduardo Valentin's avatar
      thermal: thermal_core: allow binding with limits on bind_params · a8892d83
      Eduardo Valentin authored
      When registering a thermal zone device using platform information
      via bind_params, the thermal framework will always perform the
      cdev binding using the lowest and highest limits (THERMAL_NO_LIMIT).
      
      This patch changes the data structures so that it is possible
      to inform what are the desired limits for each trip point
      inside a bind_param. The way the binding is performed is also
      changed so that it uses the new data structure.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      a8892d83
    • Eduardo Valentin's avatar
      drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional · ccba4ffd
      Eduardo Valentin authored
      When registering a new thermal_device, the thermal framework
      will always add a hwmon sysfs interface.
      
      This patch adds a flag to make this behavior optional. Now
      when registering a new thermal device, the caller can
      optionally inform if hwmon interface is desirable. This can
      be done by means of passing a thermal_zone_params.no_hwmon == true.
      
      In order to keep same behavior as of today, all current
      calls will by default create the hwmon interface.
      
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: linux-acpi@vger.kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: Zhang Rui <rui.zhang@intel.com>
      Suggested-by: default avatarWei Ni <wni@nvidia.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      ccba4ffd
    • Eduardo Valentin's avatar
      thermal: hwmon: move hwmon support to single file · 0dd88793
      Eduardo Valentin authored
      In order to improve code organization, this patch
      moves the hwmon sysfs support to a file named
      thermal_hwmon. This helps to add extra support
      for hwmon without scrambling the code.
      
      In order to do this move, the hwmon list head is now
      using its own locking. Before, the list used
      the global thermal locking. Also, some minor changes
      in the code were required, as recommended by checkpatch.pl.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Acked-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      0dd88793
  11. 13 Jun, 2013 1 commit
    • Eduardo Valentin's avatar
      thermal: consider emul_temperature while computing trend · 0c872507
      Eduardo Valentin authored
      In case emulated temperature is in use, using the trend
      provided by driver layer can lead to bogus situation.
      In this case, debugger user would set a temperature value,
      but the trend would be from driver computation.
      
      To avoid this situation, this patch changes the get_tz_trend()
      to consider the emulated temperature whenever that is in use.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      0c872507
  12. 28 May, 2013 2 commits
  13. 27 Apr, 2013 1 commit
    • Eduardo Valentin's avatar
      thermal: thermal_core: remove usage of IS_ERR_OR_NULL · 9b19ec39
      Eduardo Valentin authored
      This patch changes the driver to avoid the usage of IS_ERR_OR_NULL()
      macro. This macro can lead to dangerous results, like returning
      success (0) during a failure scenario (NULL pointer handling).
      
      The case present in this patch has simply be translated to
      normal check for NULL and if the pointer has an error code.
      The later case is needed because functions like
      thermal_zone_get_zone_by_name() could return an ERR_PTR().
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      9b19ec39
  14. 24 Apr, 2013 9 commits
  15. 15 Apr, 2013 2 commits
  16. 14 Apr, 2013 1 commit
  17. 13 Apr, 2013 1 commit
  18. 28 Feb, 2013 1 commit
  19. 22 Feb, 2013 1 commit
  20. 06 Feb, 2013 2 commits
  21. 17 Jan, 2013 1 commit