05 May, 2015

1 commit

  • Add a basic power model to the cpu cooling device to implement the
    power cooling device API. The power model uses the current frequency,
    current load and OPPs for the power calculations. The cpus must have
    registered their OPPs using the OPP library.

    Cc: Zhang Rui
    Cc: Eduardo Valentin
    Signed-off-by: Kapileshwar Singh
    Signed-off-by: Punit Agrawal
    Signed-off-by: Javi Merino
    Signed-off-by: Eduardo Valentin

    Javi Merino
     

17 Dec, 2014

1 commit

  • The documentation of of_cpufreq_cooling_register() and
    cpufreq_cooling_register() say that they return ERR_PTR() on error.
    Accordingly, callers only check for IS_ERR(). Therefore, make them
    return ERR_PTR(-ENOSYS) as is customary in the kernel when config
    options are missing.

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

    Javi Merino
     

04 Dec, 2013

1 commit

  • This patch introduces an API to register cpufreq cooling device
    based on device tree node.

    The registration via device tree node differs from normal
    registration due to the fact that it is needed to fill
    the device_node structure in order to be able to match
    the cooling devices with trip points.

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

    Eduardo Valentin
     

08 Jul, 2013

1 commit

  • The function stub for cpufreq_cooling_get_level introduced
    in 57df81069 "Thermal: exynos: fix cooling state translation"
    is not syntactically correct C and needs to be fixed to avoid
    this error:

    In file included from drivers/thermal/db8500_thermal.c:20:0:
    include/linux/cpu_cooling.h: In function 'cpufreq_cooling_get_level':
    include/linux/cpu_cooling.h:57:1:
    error: parameter name omitted unsigned long cpufreq_cooling_get_level(unsigned int, unsigned int) ^
    include/linux/cpu_cooling.h:57:1: error: parameter name omitted

    Signed-off-by: Arnd Bergmann
    Acked-by: Eduardo Valentin
    Cc: Zhang Rui
    Cc: Amit Daniel kachhap
    Cc: stable@vger.kernel.org
    Signed-off-by: Eduardo Valentin

    Arnd Bergmann
     

27 Apr, 2013

1 commit


25 Apr, 2013

2 commits


14 Apr, 2013

1 commit


26 Mar, 2013

1 commit


22 Nov, 2012

2 commits

  • As thermal drivers can be built as modules and also
    the thermal framework itself, building cpu cooling
    only as built-in can cause linking errors. For instance:
    * Generic Thermal sysfs driver
    *
    Generic Thermal sysfs driver (THERMAL) [M/n/y/?] m
    generic cpu cooling support (CPU_THERMAL) [N/y/?] (NEW) y

    with the following drive:
    CONFIG_OMAP_BANDGAP=m

    generates:
    ERROR: "cpufreq_cooling_unregister" [drivers/staging/omap-thermal/omap-thermal.ko] undefined!
    ERROR: "cpufreq_cooling_register" [drivers/staging/omap-thermal/omap-thermal.ko] undefined!

    This patch changes cpu cooling driver to allow it
    to be built as module.

    Reported-by: Enric Balletbo i Serra
    Signed-off-by: Eduardo Valentin
    Reviewed-by: Durgadoss R
    Signed-off-by: Zhang Rui

    Eduardo Valentin
     
  • There are predefined cpu_masks that are const data structures.
    This patch changes the cpu cooling register function so that
    those const cpu_masks can be used, without compilation warnings.

    include/linux/cpumask.h

    * The following particular system cpumasks and operations manage
    * possible, present, active and online cpus.
    *
    * cpu_possible_mask- has bit 'cpu' set iff cpu is populatable
    * cpu_present_mask - has bit 'cpu' set iff cpu is populated
    * cpu_online_mask - has bit 'cpu' set iff cpu available to scheduler
    * cpu_active_mask - has bit 'cpu' set iff cpu available to migration
    *

    Signed-off-by: Eduardo Valentin
    Signed-off-by: Zhang Rui

    Eduardo Valentin
     

24 Sep, 2012

1 commit

  • This patchset introduces a new generic cooling device based on cpufreq
    that can be used on non-ACPI platforms. As a proof of concept, we have
    drivers for the following platforms using this mechanism now:

    * Samsung Exynos (Exynos4 and Exynos5) in the current patchset.
    * Freescale i.MX (git://git.linaro.org/people/amitdanielk/linux.git imx6q_thermal)

    There is a small change in cpufreq cooling registration APIs, so a minor
    change is needed for Freescale platforms.

    Brief Description:

    1) The generic cooling devices code is placed inside driver/thermal/*
    as placing inside acpi folder will need un-necessary enabling of acpi
    code. This code is architecture independent.

    2) This patchset adds generic cpu cooling low level implementation
    through frequency clipping. In future, other cpu related cooling
    devices may be added here. An ACPI version of this already exists
    (drivers/acpi/processor_thermal.c) .But this will be useful for
    platforms like ARM using the generic thermal interface along with the
    generic cpu cooling devices. The cooling device registration API's
    return cooling device pointers which can be easily binded with the
    thermal zone trip points. The important APIs exposed are,

    a) struct thermal_cooling_device *cpufreq_cooling_register(
    struct cpumask *clip_cpus)
    b) void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)

    3) Samsung exynos platform thermal implementation is done using the
    generic cpu cooling APIs and the new trip type. The temperature sensor
    driver present in the hwmon folder(registered as hwmon driver) is moved
    to thermal folder and registered as a thermal driver.

    A simple data/control flow diagrams is shown below,

    Core Linux thermal Exynos thermal interface
    Cc: Guenter Roeck
    Cc: SangWook Ju
    Cc: Durgadoss
    Cc: Len Brown
    Cc: Jean Delvare
    Cc: Kyungmin Park
    Cc: Kukjin Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Amit Daniel Kachhap
    Signed-off-by: Zhang Rui

    Amit Daniel Kachhap