1. 07 4月, 2017 2 次提交
    • S
      thermal: da9062/61: Thermal junction temperature monitoring driver · 608567aa
      Steve Twiss 提交于
      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: NLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      608567aa
    • R
      thermal: broadcom: add Northstar thermal driver · a94cb7ee
      Rafał Miłecki 提交于
      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: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NJon Mason <jon.mason@broadcom.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      a94cb7ee
  2. 02 4月, 2017 1 次提交
  3. 31 3月, 2017 7 次提交
  4. 30 3月, 2017 3 次提交
  5. 02 3月, 2017 1 次提交
  6. 19 2月, 2017 7 次提交
  7. 10 2月, 2017 1 次提交
    • A
      thermal: use cpumask_var_t for on-stack cpu masks · d9cc34a6
      Arnd Bergmann 提交于
      Putting a bare cpumask structure on the stack produces a warning on
      large SMP configurations:
      
      drivers/thermal/cpu_cooling.c: In function 'cpufreq_state2power':
      drivers/thermal/cpu_cooling.c:644:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      drivers/thermal/cpu_cooling.c: In function '__cpufreq_cooling_register':
      drivers/thermal/cpu_cooling.c:898:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
      
      The recommended workaround is to use cpumask_var_t, which behaves just like
      a normal cpu mask in most cases, but turns into a dynamic allocation
      when CONFIG_CPUMASK_OFFSTACK is set.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      d9cc34a6
  8. 07 2月, 2017 1 次提交
  9. 30 1月, 2017 1 次提交
    • V
      PM / OPP: Update OPP users to put reference · 8a31d9d9
      Viresh Kumar 提交于
      This patch updates dev_pm_opp_find_freq_*() routines to get a reference
      to the OPPs returned by them.
      
      Also updates the users of dev_pm_opp_find_freq_*() routines to call
      dev_pm_opp_put() after they are done using the OPPs.
      
      As it is guaranteed the that OPPs wouldn't get freed while being used,
      the RCU read side locking present with the users isn't required anymore.
      Drop it as well.
      
      This patch also updates all users of devfreq_recommended_opp() which was
      returning an OPP received from the OPP core.
      
      Note that some of the OPP core routines have gained
      rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
      within them.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> [Devfreq]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8a31d9d9
  10. 25 1月, 2017 1 次提交
  11. 20 1月, 2017 1 次提交
  12. 17 1月, 2017 1 次提交
    • C
      thermal: rockchip: fixes the conversion table · db831886
      Caesar Wang 提交于
      As Ayaka reported the thermal was abormal on rk3288 at booting time.
      thermal thermal_zone1: critical temperature reached(125 C),shutting down
      thermal thermal_zone2: critical temperature reached(125 C),shutting down
      thermal thermal_zone1: critical temperature reached(125 C),shutting down
      thermal thermal_zone2: critical temperature reached(125 C),shutting down
      ...
      The root caused by reading the invald analogic value, the value is zero
      will convert the 125 degree to trigger the critical temperature.
      Fixes it with insteading of the incorrect reading now.
      
      Fixes commit cadf29dc
      ("thermal: rockchip: optimize the conversion table")
      Reported-by: Nayaka <ayaka@soulik.info>
      Signed-off-by: NCaesar Wang <wxt@rock-chips.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      db831886
  13. 06 1月, 2017 1 次提交
    • J
      thermal: core: move tz->device.groups cleanup to thermal_release · f53345e8
      Jacob von Chorus 提交于
      The device_unregister call in thermal_zone_device_unregister causes the
      thermal_zone_device structure to be freed before the call to free the
      dynamically allocated attribute groups. This leads to a kernel panic.
      
      Furthermore, the 4 calls to free the trip point attribute structures
      occur before the call to unregister the device, leading to a kernel
      panic when sysfs attempts to access the attributes to remove them.
      
      Here is an example of a kernel panic when the cpu thermal zones are
      removed upon cpu offline:
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: strlen+0x0/0x20
      <snip>
      Call Trace:
         ? kernfs_name_hash+0x17/0x80
         kernfs_find_ns+0x3f/0xd0
         kernfs_remove_by_name_ns+0x36/0xa0
         remove_files.isra.1+0x36/0x70
         sysfs_remove_group+0x44/0x90
         sysfs_remove_groups+0x2e/0x50
         device_remove_attrs+0x5e/0x90
         device_del+0x1ea/0x350
         device_unregister+0x1a/0x60
         thermal_zone_device_unregister+0x1f2/0x210
         pkg_thermal_cpu_offline+0x14f/0x1a0 [x86_pkg_temp_thermal]
         ? kzalloc.constprop.2+0x10/0x10 [x86_pkg_temp_thermal]
         cpuhp_invoke_callback+0x8d/0x3f0
         cpuhp_down_callbacks+0x42/0x80
         cpuhp_thread_fun+0x8b/0xf0
         smpboot_thread_fn+0x110/0x160
         kthread+0x101/0x140
         ? sort_range+0x30/0x30
         ? kthread_park+0x90/0x90
         ret_from_fork+0x25/0x30
      
      This patch moves the kfree calls to clean up the dynamic attributes to
      the thermal_class's thermal_zone_device release function.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Tested-by: NYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Signed-off-by: NJacob von Chorus <jacobvonchorus@cwphoto.ca>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      f53345e8
  14. 04 1月, 2017 5 次提交
  15. 14 12月, 2016 5 次提交
  16. 10 12月, 2016 1 次提交
  17. 30 11月, 2016 1 次提交