1. 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
  2. 25 2月, 2015 1 次提交
  3. 10 12月, 2014 1 次提交
  4. 09 12月, 2014 3 次提交
  5. 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
  6. 10 10月, 2014 2 次提交
  7. 22 7月, 2014 1 次提交
  8. 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
  9. 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
  10. 25 4月, 2013 1 次提交
  11. 15 4月, 2013 2 次提交
  12. 14 4月, 2013 1 次提交
  13. 26 3月, 2013 2 次提交
  14. 21 3月, 2013 1 次提交
  15. 06 2月, 2013 1 次提交
  16. 16 1月, 2013 1 次提交
  17. 04 1月, 2013 1 次提交
  18. 12 12月, 2012 1 次提交
  19. 05 11月, 2012 7 次提交
  20. 24 9月, 2012 4 次提交