summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
Commit message (Collapse)AuthorAgeFilesLines
* Thermal: Fix lockup of cpu_down()Steven Rostedt2013-07-221-1/+0
| | | | | | | | | | | | | | | | | | | | | Commit f1a18a105 "Thermal: CPU Package temperature thermal" had code that did a get_online_cpus(), run a loop and then do a put_online_cpus(). The problem is that the loop had an error exit that would skip the put_online_cpus() part. In the error exit part of the function, it also did a get_online_cpus(), run a loop and then put_online_cpus(). The only way to get to the error exit part is with get_online_cpus() already performed. If this error condition is hit, the system will be prevented from taking CPUs offline. The process taking the CPU offline will lock up hard. Removing the get_online_cpus() removes the lockup as the hotplug CPU refcount is back to zero. This was bisected with ktest. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: x86_pkg_temp: Limit number of pkg temp zonesSrinivas Pandruvada2013-07-161-0/+5
| | | | | | | | | | Although it is unlikley that physical package id is set to some arbitary number, it is better to prevent in anycase. Since package temp zones use this in thermal zone type and for allocation, added a limit. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: x86_pkg_temp: fix krealloc() misuse in in pkg_temp_thermal_device_add()Wei Yongjun2013-07-151-3/+5
| | | | | | | | If krealloc() returns NULL, it doesn't free the original. So any code of the form 'foo = krealloc(foo, ...);' is almost certainly a bug. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: x86 package temp thermal crashSrinivas Pandruvada2013-07-151-2/+2
| | | | | | | | | | | | | On systems with no package MSR support this caused crash as there is a bug in the logic to check presence of DTHERM and PTS feature together. Added a change so that when there is no PTS support, module doesn't get loaded. Even if some CPU comes online with the PTS feature disabled, and other CPUs has this support, this patch will still prevent such MSR accesses. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reported-by: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Merge branch 'next' of ↵Linus Torvalds2013-07-1124-48/+4981
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: "There are not too many changes this time, except two new platform thermal drivers, ti-soc-thermal driver and x86_pkg_temp_thermal driver, and a couple of small fixes. Highlights: - move the ti-soc-thermal driver out of the staging tree to the thermal tree. - introduce the x86_pkg_temp_thermal driver. This driver registers CPU digital temperature package level sensor as a thermal zone. - small fixes/cleanups including removing redundant use of platform_set_drvdata() and of_match_ptr for all platform thermal drivers" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (34 commits) thermal: cpu_cooling: fix stub function thermal: ti-soc-thermal: use standard GPIO DT bindings thermal: MAINTAINERS: Add git tree path for SoC specific updates thermal: fix x86_pkg_temp_thermal.c build and Kconfig Thermal: Documentation for x86 package temperature thermal driver Thermal: CPU Package temperature thermal thermal: consider emul_temperature while computing trend thermal: ti-soc-thermal: add DT example for DRA752 chip thermal: ti-soc-thermal: add dra752 chip to device table thermal: ti-soc-thermal: add thermal data for DRA752 chips thermal: ti-soc-thermal: remove usage of IS_ERR_OR_NULL thermal: ti-soc-thermal: freeze FSM while computing trend thermal: ti-soc-thermal: remove external heat while extrapolating hotspot thermal: ti-soc-thermal: update DT reference for OMAP5430 x86, mcheck, therm_throt: Process package thresholds thermal: cpu_cooling: fix 'descend' check in get_property() Thermal: spear: Remove redundant use of of_match_ptr Thermal: kirkwood: Remove redundant use of of_match_ptr Thermal: dove: Remove redundant use of of_match_ptr Thermal: armada: Remove redundant use of of_match_ptr ...
| * thermal: ti-soc-thermal: use standard GPIO DT bindingsEduardo Valentin2013-07-081-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates the ti-soc-thermal driver to use standard GPIO DT bindings to read the GPIO number associated to thermal shutdown IRQ, in case the device features it. Previously, the code was using a specific DT bindings. As now OMAP supports the standard way to model GPIOs, there is no point in having a ti specific binding. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
| * Merge branch 'cpu-package-thermal' of .git into nextZhang Rui2013-06-181-2/+1
| |\
| | * thermal: fix x86_pkg_temp_thermal.c build and KconfigRandy Dunlap2013-06-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix build error in x86_pkg_temp_thermal.c. It requires that X86_MCE & X86_THERMAL_VECTOR be enabled, so depend on the latter symbol, since it depends on X86_MCE (indirectly). Also, X86_PKG_TEMP_THERMAL is already inside an "if THERMAL" block, so remove that duplicated dependency. ERROR: "platform_thermal_package_rate_control" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined! ERROR: "platform_thermal_package_notify" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Borislav Petkov <bp@suse.de> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Merge branch 'cpu-package-thermal' of .git into nextZhang Rui2013-06-183-0/+656
| |\ \ | | |/ | | | | | | | | | | | | Conflicts: drivers/thermal/Kconfig drivers/thermal/Makefile
| | * Thermal: CPU Package temperature thermalSrinivas Pandruvada2013-06-183-1/+655
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver register CPU digital temperature sensor as a thermal zone at package level. Each package will show up as one zone with at max two trip points. These trip points can be both read and updated. Once a non zero value is set in the trip point, if the package package temperature goes above or below this setting, a thermal notification is generated. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | |
| | \
| *-. \ Merge branches 'for-rc' and 'ti-soc' of .git into nextZhang Rui2013-06-1310-25/+831
| |\ \ \
| | | * | thermal: ti-soc-thermal: add dra752 chip to device tableEduardo Valentin2013-06-132-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to TI dra752 chips by adapting the driver device table. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | thermal: ti-soc-thermal: add thermal data for DRA752 chipsEduardo Valentin2013-06-135-0/+775
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the thermal data for TI DRA752 chips. In this change it includes (autogen): . Register offset definitions . Bitfields and masks for all registers . Conversion table Also, the thermal limits, thresholds and extrapolation rules are included. The extrapolation rule is simply add +2C as margin. All 5 sensors, MPU, GPU, CORE, DSPEVE and IVA, are defined and exposed. Only MPU has cooling device. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | thermal: ti-soc-thermal: remove usage of IS_ERR_OR_NULLEduardo Valentin2013-06-132-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro. This macro can lead to dangerous results, like returning success (0) during a failure scenario (NULL pointer handling). For this reason this patch is changing the driver after revisiting the code. These are the cases: i. For cases in which IS_ERR_OR_NULL() is used for checking return values of functions that returns either PTR_ERR() or a valid pointer, it has been translated to IS_ERR() check only. ii. For cases that a NULL check is still needed, it has been translated to if (!ptr || IS_ERR(ptr)). Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | thermal: ti-soc-thermal: freeze FSM while computing trendEduardo Valentin2013-06-131-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to read the history buffer, it is required to freeze BG FSM. This patch adds the missing piece of code to freeze the FSM and also a contention area to avoid other parts of the code to access the DTEMPs. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | thermal: ti-soc-thermal: remove external heat while extrapolating hotspotEduardo Valentin2013-06-131-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For boards that provide a PCB sensor close to SoC junction temperature, it is possible to remove the cumulative heat reported by the SoC temperature sensor. This patch changes the extrapolation computation to consider an external sensor in the extrapolation equations. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | | thermal: consider emul_temperature while computing trendEduardo Valentin2013-06-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case emulated temperature is in use, using the trend provided by driver layer can lead to bogus situation. In this case, debugger user would set a temperature value, but the trend would be from driver computation. To avoid this situation, this patch changes the get_tz_trend() to consider the emulated temperature whenever that is in use. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Cc: Durgadoss R <durgadoss.r@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | | thermal: cpu_cooling: fix 'descend' check in get_property()Shawn Guo2013-05-281-1/+1
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable 'descend' is initialized as -1 in function get_property(), and will never get any chance to be updated by the following code. if (freq != CPUFREQ_ENTRY_INVALID && descend != -1) descend = !!(freq > table[i].frequency); This makes function get_property() return the wrong frequency for given cooling level if the frequency table is sorted in ascending. Fix it by correcting the 'descend' check in if-condition to 'descend == -1'. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | |
| | \ \
| | \ \
| | \ \
| *---. \ \ Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git ↵Zhang Rui2013-05-2819-58/+3511
| |\ \ \ \ \ | | | | | |/ | | | | |/| | | | | | | into next
| | | | * | thermal: introduce TI SoC thermal driverEduardo Valentin2013-05-2813-1/+3503
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the ti-soc-thermal driver out of the staging tree to the thermal tree. Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Rob Landley <rob@landley.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Cc: J Keerthy <j-keerthy@ti.com> Cc: Radhesh Fadnis <radhesh.fadnis@ti.com> Cc: Cyril Roelandt <tipecaml@gmail.com> Cc: devicetree-discuss@lists.ozlabs.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: linux-pm@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | Thermal: don't check resource with devm_ioremap_resourceZhang Rui2013-05-282-20/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. CC: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> CC: Vincenzo Frascino <vincenzo.frascino@st.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
| | | * | Thermal: spear_thermal: convert to devm_ioremap_resourceZhang Rui2013-05-201-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the newly introduced devm_ioremap_resource(). devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. CC: Vincenzo Frascino <vincenzo.frascino@st.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | | * | drivers/thermal: don't check resource with devm_ioremap_resourceWolfram Sang2013-05-204-26/+3
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: spear: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Vincenzo Frascino <vincenzo.frascino@st.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: rcar: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: kirkwood: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: exynos: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: dove_thermal: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Andrew Lunn <andrew@lunn.ch> Acked-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| | * | Thermal: armada_thermal: Remove redundant platform_set_drvdata()Sachin Kamat2013-05-061-1/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Thermal: spear: Remove redundant use of of_match_ptrSachin Kamat2013-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'spear_thermal_id_table' is always compiled in and the driver is dependent on OF. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Vincenzo Frascino <vincenzo.frascino@st.com> Cc: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Thermal: kirkwood: Remove redundant use of of_match_ptrSachin Kamat2013-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'kirkwood_thermal_id_table' is always compiled in and the driver is dependent on OF. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Thermal: dove: Remove redundant use of of_match_ptrSachin Kamat2013-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dove_thermal_id_table' is always compiled in and the driver is dependent on OF. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Andrew Lunn <andrew@lunn.ch> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Thermal: armada: Remove redundant use of of_match_ptrSachin Kamat2013-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'armada_thermal_id_table' is always compiled in and the driver is dependent on OF. Hence use of of_match_ptr is unnecessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | Thermal: core: Ask .get_trip_temp() to register thermal zone device.Jonghwa Lee2013-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a requirement needing .get_trip_temp() callback function for registering thermal zone device. This function is used when thermal zone is updated and essential where thermal core handles thermal trip based only polling way not hw interrupt. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | thermal: cut the spaces when user sets policyAndy Shevchenko2013-05-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting policy results in invalid value error. % echo "step_wise" > policy % echo: write error: Invalid argument Need clean up of the buffer which "echo" may add based on the arguments, before comparing aganist list of governor names. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Tested-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * | thermal: rcar: Fix typo in probe information messageLaurent Pinchart2013-05-281-1/+1
| |/ | | | | | | | | | | Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: exynos: Support both EXYNOS4X12 SoCsTomasz Figa2013-06-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | EXYNOS4212 and EXYNOS4412 have the same thermal block, so there is no reason to include support only for EXYNOS4412 in this driver. Cc: linux-pm@vger.kernel.org Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* | drivers/thermal: don't check resource with devm_ioremap_resourceWolfram Sang2013-05-183-19/+0
|/ | | | | | | devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* Merge branch 'cpu_cooling-doc-comments-update' of .git into nextZhang Rui2013-04-271-21/+29
|\
| * thermal: cpu_cooling: alignment improvementsEduardo Valentin2013-04-271-10/+9
| | | | | | | | | | | | | | | | | | Improve code readiness by changing alignments so that they match open parenthesis, like checkpatch.pl --strict suggests. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * thermal: cpu_cooling: remove checkpatch.pl warningEduardo Valentin2013-04-271-1/+1
| | | | | | | | | | | | | | Simple code style fix. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * thermal: cpu_cooling: remove trailing blank lineEduardo Valentin2013-04-271-1/+0
| | | | | | | | | | | | | | Remove unnecessary blank line. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * thermal: cpu_cooling: align on open parenthesisEduardo Valentin2013-04-271-1/+2
| | | | | | | | | | | | | | | | Improve code readiness by remove checkpatch.pl warnings on get_property function. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * thermal: cpu_cooling: standardize comment styleEduardo Valentin2013-04-271-6/+4
| | | | | | | | | | | | | | | | There are at least three patterns for oneline comments in this file. This patch changes them to one single pattern Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * thermal: cpu_cooling: standardize end of functionEduardo Valentin2013-04-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | Just for code readiness, this patch makes all functions on this file to have a blank line before their returns. Now, some functions follow this pattern, and others will not have a blank line. So, this patch makes it a single pattern. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
| * thermal: cpu_cooling: remove trailing white spacesEduardo Valentin2013-04-271-2/+1
| | | | | | | | | | | | | | Remove unnecessary white spaces. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: db8500_cpufreq_cooling: remove usage of IS_ERR_OR_NULL()Eduardo Valentin2013-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro. This macro can lead to dangerous results, like returning success (0) during a failure scenario (NULL pointer handling). The case present in this driver can be translated to a simple check for IS_ERR(), as the cpufreq_cooling_register() returns either a valid pointer or an ERR_PTR(). Cc: Zhang Rui <rui.zhang@intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Hongbo Zhang <hongbo.zhang@stericsson.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | thermal: thermal_core: remove usage of IS_ERR_OR_NULLEduardo Valentin2013-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the driver to avoid the usage of IS_ERR_OR_NULL() macro. This macro can lead to dangerous results, like returning success (0) during a failure scenario (NULL pointer handling). The case present in this patch has simply be translated to normal check for NULL and if the pointer has an error code. The later case is needed because functions like thermal_zone_get_zone_by_name() could return an ERR_PTR(). Cc: Zhang Rui <rui.zhang@intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* | Merge branch 'cpu_cooling-doc-comments-update' of .git into nextZhang Rui2013-04-252-25/+87
|\ \ | |/
| * thermal: cpu_cooling: remove unused symbolsEduardo Valentin2013-04-251-5/+1
| | | | | | | | | | | | | | | | The list is not needed so far. Thus removing it. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
OpenPOWER on IntegriCloud