1. 05 May, 2015 1 commit
  2. 17 Dec, 2014 1 commit
  3. 04 Dec, 2013 1 commit
    • Eduardo Valentin's avatar
      thermal: cpu_cooling: introduce of_cpufreq_cooling_register · 39d99cff
      Eduardo Valentin authored
      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 <rui.zhang@intel.com>
      Cc: linux-pm@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      39d99cff
  4. 08 Jul, 2013 1 commit
    • Arnd Bergmann's avatar
      thermal: cpu_cooling: fix stub function · e8d39240
      Arnd Bergmann authored
      The function stub for cpufreq_cooling_get_level introduced
      in 57df8106 "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: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Amit Daniel kachhap <amit.daniel@samsung.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      e8d39240
  5. 27 Apr, 2013 1 commit
  6. 24 Apr, 2013 2 commits
  7. 14 Apr, 2013 1 commit
  8. 26 Mar, 2013 1 commit
  9. 22 Nov, 2012 2 commits
    • Eduardo Valentin's avatar
      thermal: cpu cooling: allow module builds · 4ba115b1
      Eduardo Valentin authored
      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: default avatarEnric Balletbo i Serra <eballetbo@gmail.com>
      Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Reviewed-by: default avatarDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      4ba115b1
    • Eduardo Valentin's avatar
      thermal: cpu cooling: use const parameter while registering · 3778ff5c
      Eduardo Valentin authored
      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: default avatarEduardo Valentin <eduardo.valentin@ti.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      3778ff5c
  10. 24 Sep, 2012 1 commit
    • Amit Daniel Kachhap's avatar
      thermal: add generic cpufreq cooling implementation · 02361418
      Amit Daniel Kachhap authored
      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 <----- Temperature Sensor
                |                             |
               \|/                            |
        Cpufreq cooling device <---------------
      
      TODO:
      *Will send the DT enablement patches later after the driver is merged.
      
      This patch:
      
      Add support for generic cpu thermal cooling low level implementations
      using frequency scaling up/down based on the registration parameters.
      Different cpu related cooling devices can be registered by the user and
      the binding of these cooling devices to the corresponding trip points can
      be easily done as the registration APIs return the cooling device pointer.
      The user of these APIs are responsible for passing clipping frequency .
      The drivers can also register to recieve notification about any cooling
      action called.
      
      [akpm@linux-foundation.org: fix comment layout]
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.kachhap@linaro.org>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Cc: SangWook Ju <sw.ju@samsung.com>
      Cc: Durgadoss <durgadoss.r@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Kyungmin Park <kmpark@infradead.org>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAmit Daniel Kachhap <amit.daniel@samsung.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      02361418