1. 18 3月, 2016 1 次提交
  2. 10 3月, 2016 1 次提交
  3. 29 12月, 2015 2 次提交
  4. 24 11月, 2015 1 次提交
    • A
      thermal: fix thermal_zone_bind_cooling_device prototype · c86b3de8
      Arnd Bergmann 提交于
      When the prototype for thermal_zone_bind_cooling_device
      changed, the static inline wrapper function was left alone,
      which in theory can cause build warnings:
      
      I have seen this error in the past:
      drivers/thermal/db8500_thermal.c: In function 'db8500_cdev_bind':
      drivers/thermal/db8500_thermal.c:78:9: error: too many arguments to function 'thermal_zone_bind_cooling_device'
         ret = thermal_zone_bind_cooling_device(thermal, i, cdev,
      
      while this one no longer shows up, there is no doubt that
      the prototype is still wrong, so let's just fix it anyway.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 6cd9e9f6 ("thermal: of: fix cooling device weights in device tree")
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      c86b3de8
  5. 10 10月, 2015 1 次提交
  6. 14 9月, 2015 2 次提交
  7. 03 8月, 2015 1 次提交
    • S
      thermal: consistently use int for temperatures · 17e8351a
      Sascha Hauer 提交于
      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: NSascha Hauer <s.hauer@pengutronix.de>
      Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Reviewed-by: NJean Delvare <jdelvare@suse.de>
      Reviewed-by: NLukasz Majewski <l.majewski@samsung.com>
      Reviewed-by: NDarren Hart <dvhart@linux.intel.com>
      Reviewed-by: NHeiko Stuebner <heiko@sntech.de>
      Reviewed-by: NPeter Feuerer <peter@piie.net>
      Cc: Punit Agrawal <punit.agrawal@arm.com>
      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
      Cc: Jean Delvare <jdelvare@suse.de>
      Cc: Peter Feuerer <peter@piie.net>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      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 <linux@roeck-us.net>
      Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: lm-sensors@lm-sensors.org
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      17e8351a
  8. 12 5月, 2015 1 次提交
    • E
      thermal: support slope and offset coefficients · 9d0be7f4
      Eduardo Valentin 提交于
      It is common to have a linear extrapolation from
      the current sensor readings and the actual temperature
      value. This is specially the case when the sensor
      is in use to extrapolate hotspots.
      
      This patch adds slope and offset constants for
      single sensor linear extrapolation equation. Because
      the same sensor can be use in different locations,
      from board to board, these constants are added
      as part of thermal_zone_params.
      
      The constants are available through sysfs.
      
      It is up to the device driver to determine
      the usage of these values.
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      9d0be7f4
  9. 05 5月, 2015 5 次提交
    • J
      thermal: introduce the Power Allocator governor · 6b775e87
      Javi Merino 提交于
      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
      device.
      
      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: NPunit Agrawal <punit.agrawal@arm.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      6b775e87
    • J
      thermal: extend the cooling device API to include power information · 35b11d2e
      Javi Merino 提交于
      Add three optional callbacks to the cooling device interface to allow
      them to express power.  In addition to the callbacks, add helpers to
      identify cooling devices that implement the power cooling device API.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      35b11d2e
    • J
      thermal: let governors have private data for each thermal zone · e33df1d2
      Javi Merino 提交于
      A governor may need to store its current state between calls to
      throttle().  That state depends on the thermal zone, so store it as
      private data in struct thermal_zone_device.
      
      The governors may have two new ops: bind_to_tz() and unbind_from_tz().
      When provided, these functions let governors do some initialization
      and teardown when they are bound/unbound to a tz and possibly store that
      information in the governor_data field of the struct
      thermal_zone_device.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      e33df1d2
    • J
      thermal: fair_share: generalize the weight concept · bcdcbbc7
      Javi Merino 提交于
      The fair share governor has the concept of weights, which is the
      influence of each cooling device in a thermal zone.  The current
      implementation forces the weights of all cooling devices in a thermal
      zone to add up to a 100.  This complicates setups, as you need to know
      in advance how many cooling devices you are going to have.  If you bind a
      new cooling device, you have to modify all the other cooling devices
      weights, which is error prone.  Furthermore, you can't specify a
      "default" weight for platforms since that default value depends on the
      number of cooling devices in the platform.
      
      This patch generalizes the concept of weight by allowing any number to
      be a "weight".  Weights are now relative to each other.  Platforms that
      don't specify weights get the same default value for all their cooling
      devices, so all their cdevs are considered to be equally influential.
      
      It's important to note that previous users of the weights don't need to
      alter the code: percentages continue to work as they used to.  This
      patch just removes the constraint of all the weights in a thermal zone
      having to add up to a 100.  If they do, you get the same behavior as
      before.  If they don't, fair share now works for that platform.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Acked-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      bcdcbbc7
    • K
      thermal: of: fix cooling device weights in device tree · 6cd9e9f6
      Kapileshwar Singh 提交于
      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 <rui.zhang@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Peter Feuerer <peter@piie.net>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NKapileshwar Singh <kapileshwar.singh@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      6cd9e9f6
  10. 25 2月, 2015 1 次提交
  11. 10 12月, 2014 1 次提交
  12. 09 12月, 2014 3 次提交
  13. 20 11月, 2014 1 次提交
    • E
      thermal: of: improve of-thermal sensor registration API · 2251aef6
      Eduardo Valentin 提交于
      Different drivers request API extensions in of-thermal. For this reason,
      additional callbacks are required to fit the new drivers needs.
      
      The current API implementation expects the registering sensor driver
      to provide a get_temp and get_trend callbacks as function parameters.
      As the amount of callbacks is growing, this patch changes the existing
      implementation to use a .ops field to hold all the of thermal callbacks
      to sensor drivers.
      
      This patch also changes the existing of-thermal users to fit the new
      API design. No functional change is introduced in this patch.
      
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: devicetree@vger.kernel.org
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Jean Delvare <jdelvare@suse.de>
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-pm@vger.kernel.org
      Cc: linux-tegra@vger.kernel.org
      Cc: lm-sensors@lm-sensors.org
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      Tested-by: NMikko Perttunen <mikko.perttunen@kapsi.fi>
      Reviewed-by: NMikko Perttunen <mikko.perttunen@kapsi.fi>
      Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
      Reviewed-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      2251aef6
  14. 10 10月, 2014 2 次提交
  15. 22 7月, 2014 1 次提交
  16. 04 12月, 2013 2 次提交
    • E
      thermal: core: introduce thermal_of_cooling_device_register · a116b5d4
      Eduardo Valentin 提交于
      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: NEduardo Valentin <eduardo.valentin@ti.com>
      a116b5d4
    • E
      thermal: introduce device tree parser · 4e5e4705
      Eduardo Valentin 提交于
      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: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
      4e5e4705
  17. 03 9月, 2013 2 次提交
    • E
      thermal: thermal_core: allow binding with limits on bind_params · a8892d83
      Eduardo Valentin 提交于
      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: NEduardo Valentin <eduardo.valentin@ti.com>
      a8892d83
    • E
      drivers: thermal: make usage of CONFIG_THERMAL_HWMON optional · ccba4ffd
      Eduardo Valentin 提交于
      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: NWei Ni <wni@nvidia.com>
      Signed-off-by: NEduardo Valentin <eduardo.valentin@ti.com>
      ccba4ffd
  18. 25 4月, 2013 1 次提交
  19. 15 4月, 2013 2 次提交
  20. 14 4月, 2013 1 次提交
  21. 26 3月, 2013 2 次提交
  22. 21 3月, 2013 1 次提交
  23. 06 2月, 2013 1 次提交
  24. 16 1月, 2013 1 次提交
  25. 04 1月, 2013 1 次提交
  26. 12 12月, 2012 1 次提交
  27. 05 11月, 2012 1 次提交