03 Sep, 2013

5 commits

  • This patch avoids NULL pointer accesses while unregistering
    cpu cooling devices, in case a NULL pointer is received.

    Cc: Zhang Rui
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Eduardo Valentin

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

    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
    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
    Suggested-by: Wei Ni
    Signed-off-by: Eduardo Valentin

    Eduardo Valentin
     
  • When creating virtual hwmon devices based out of thermal
    zone devices, the virtual devices won't have parents.

    This patch changes the code so that the parent of virtual
    hwmon devices is the thermal zone device that they are
    based of.

    Cc: Zhang Rui
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Eduardo Valentin

    Eduardo Valentin
     
  • In order to improve code organization, this patch
    moves the hwmon sysfs support to a file named
    thermal_hwmon. This helps to add extra support
    for hwmon without scrambling the code.

    In order to do this move, the hwmon list head is now
    using its own locking. Before, the list used
    the global thermal locking. Also, some minor changes
    in the code were required, as recommended by checkpatch.pl.

    Cc: Zhang Rui
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Durgadoss R
    Signed-off-by: Eduardo Valentin

    Eduardo Valentin
     

29 Aug, 2013

6 commits


15 Aug, 2013

8 commits

  • Zhang Rui
     
  • In case the trend is not changing or when there is no
    request for throttling, it is expected that the instance
    would not change its requested target. This patch improves
    the code implementation to cover for this expected behavior.

    With current implementation, the instance will always
    reset to cdev.cur_state, even in not expected cases,
    like those mentioned above.

    This patch changes the step_wise governor implementation
    of get_target so that we accomplish:
    (a) - default value will be current instance->target, so
    we do not change the thermal instance target unnecessarily.
    (b) - the code now it is clear about what is the intention.
    There is a clear statement of what are the expected outcomes
    (c) - removal of hardcoded constants, now it is put in use
    the THERMAL_NO_TARGET macro.
    (d) - variable names are also improved so that reader can
    clearly understand the difference between instance cur target,
    next target and cdev cur_state.

    Cc: Zhang Rui
    Cc: Durgadoss R
    Cc: linux-pm@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Reported-by: Ruslan Ruslichenko
    Signed-of-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Eduardo Valentin
     
  • The cooling device only needs update on a new target state. Since we
    already check old target in thermal_zone_trip_update(), we can do one
    more check to see if it's a new target state. If not, we can reasonably
    save some uncecesary code execution.

    Signed-off-by: Shawn Guo
    Acked-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Shawn Guo
     
  • Zhang Rui
     
  • …req_thermal_notifier()

    cpufreq_thermal_notifier() is to change the cpu's cpufreq in the allowed_cpus mask
    when associated thermal-cpufreq cdev's cooling state is changed. It's a cpufreq policy
    notifier handler and it will be triggered even if those cpus out of allowed_cpus has
    changed freq policy.

    cpufreq_thermal_notifier() checks the policy->cpu. If it belongs to allowed_cpus,
    change max_freq(default to 0) to the desire cpufreq value and pass 0 and max_freq
    to cpufreq_verify_within_limits() as cpufreq scope. But if not, do nothing and
    max_freq will remain 0. This will cause the cpufreq scope to become 0~0. This
    is not right. This patch is to return directly after finding cpu not belonging
    to allowed_cpus.

    Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
    Signed-off-by: Zhang Rui <rui.zhang@intel.com>

    Lan Tianyu
     
  • The error check is checking for a "base" mapped memory base
    instead of "base_common". Fixing the same.

    Signed-off-by: Naveen Krishna Chatradhi
    Signed-off-by: Zhang Rui

    Naveen Krishna Chatradhi
     
  • Enable automatic measurements at 10 Hz and use the alarm interrupt to react
    more quickly to sudden temperature changes above the passive or critical
    temperature trip points.

    Signed-off-by: Philipp Zabel
    Acked-by: Shawn Guo
    Signed-off-by: Zhang Rui

    Philipp Zabel
     
  • Set passive and critical trip point values depending on the maximum die
    temperature stored in the OCOTP fuses. This allows higher trip points
    for industrial and automotive rated i.MX6 SoCs.
    Also allow to configure the passive trip point from userspace.

    Signed-off-by: Philipp Zabel
    Acked-by: Shawn Guo
    Signed-off-by: Zhang Rui

    Philipp Zabel
     

13 Aug, 2013

21 commits