29 Dec, 2015

1 commit

  • After thermal zone device registered, as we have not read any
    temperature before, thus tz->temperature should not be 0,
    which actually means 0C, and thermal trend is not available.
    In this case, we need specially handling for the first
    thermal_zone_device_update().

    Both thermal core framework and step_wise governor is
    enhanced to handle this. And since the step_wise governor
    is the only one that uses trends, so it's the only thermal
    governor that needs to be updated.

    CC: #3.18+
    Tested-by: Manuel Krause
    Tested-by: szegad
    Tested-by: prash
    Tested-by: amish
    Tested-by: Matthias
    Reviewed-by: Javi Merino
    Signed-off-by: Zhang Rui
    Signed-off-by: Chen Yu

    Zhang Rui
     

11 Jun, 2015

1 commit


05 May, 2015

3 commits

  • 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
    Cc: Eduardo Valentin
    Signed-off-by: Punit Agrawal
    Signed-off-by: Javi Merino
    Signed-off-by: Eduardo Valentin

    Javi Merino
     
  • It's useful to have access to the weights for the cooling devices for
    thermal zones and change them if needed. Export them to sysfs.

    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Signed-off-by: Javi Merino
    Signed-off-by: Eduardo Valentin

    Javi Merino
     
  • 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
    Cc: "Rafael J. Wysocki"
    Cc: Len Brown
    Cc: Peter Feuerer
    Cc: Darren Hart
    Cc: Eduardo Valentin
    Cc: Kukjin Kim
    Cc: Durgadoss R
    Signed-off-by: Kapileshwar Singh
    Signed-off-by: Eduardo Valentin

    Kapileshwar Singh
     

01 May, 2015

1 commit


06 Jan, 2015

1 commit


09 Dec, 2014

3 commits


27 Aug, 2014

1 commit

  • 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
    Cc: Zhang Rui
    Cc: Andreas Mohr
    Cc: Borislav Petkov
    Cc: Javi Merino
    Cc: linux-pm@vger.kernel.org
    Signed-off-by: Peter Feuerer
    Signed-off-by: Zhang Rui

    Peter Feuerer
     

04 Dec, 2013

1 commit

  • 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
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Mark Rutland
    Signed-off-by: Eduardo Valentin

    Eduardo Valentin
     

14 Apr, 2013

1 commit

  • The thermal governors are part of the thermal framework,
    rather than a seperate feature/module.
    Because the generic thermal layer can not work without
    thermal governors, and it must load the thermal governors
    during its initialization.

    Build them into one module in this patch.

    This also fix a problem that the generic thermal layer does not
    work when CONFIG_THERMAL=m and CONFIG_THERMAL_GOV_XXX=y.

    Signed-off-by: Zhang Rui
    Acked-by: Eduardo Valentin
    Acked-by: Durgadoss R

    Zhang Rui
     

05 Nov, 2012

1 commit

  • This patch creates a thermal_core.h file which can contain
    all defines used by the core thermal framework files. For
    now, move the thermal_instance structure to thermal_core.h
    This structure is used by files under drivers/thermal/.

    Signed-off-by: Durgadoss R
    Signed-off-by: Zhang Rui

    Durgadoss R