1. 23 11月, 2016 38 次提交
  2. 27 9月, 2016 2 次提交
    • S
      thermal: Enhance thermal_zone_device_update for events · 0e70f466
      Srinivas Pandruvada 提交于
      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: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      0e70f466
    • S
      thermal: Add support for hardware-tracked trip points · 060c034a
      Sascha Hauer 提交于
      This adds support for hardware-tracked trip points to the device tree
      thermal sensor framework.
      
      The framework supports an arbitrary number of trip points. Whenever
      the current temperature is updated, the trip points immediately
      below and above the current temperature are found. A .set_trips
      callback is then called with the temperatures. If there is no trip
      point above or below the current temperature, the passed trip
      temperature will be -INT_MAX or INT_MAX respectively. In this callback,
      the driver should program the hardware such that it is notified
      when either of these trip points are triggered. When a trip point
      is triggered, the driver should call `thermal_zone_device_update'
      for the respective thermal zone. This will cause the trip points
      to be updated again.
      
      If .set_trips is not implemented, the framework behaves as before.
      
      This patch is based on an earlier version from Mikko Perttunen
      <mikko.perttunen@kapsi.fi>
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NCaesar Wang <wxt@rock-chips.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: linux-pm@vger.kernel.org
      Reviewed-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      060c034a