aboutsummaryrefslogtreecommitdiff
path: root/drivers/thermal/exynos_thermal.c
AgeCommit message (Collapse)Author
2013-05-18drivers/thermal: don't check resource with devm_ioremap_resourceWolfram Sang
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>
2013-04-25Merge branch 'exynos-fix' of .git into nextZhang Rui
2013-04-24Thermal: exynos: Add compatible string for exynos4412Sachin Kamat
Added compatible string for Exynos4412 SoC. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-24Thermal: exynos: Add clk_{un}prepare APIsSachin Kamat
clk_{un}prepare APIs are required to migrate to common clock framework. While at it convert to use devm_clk_get as it removes some cleanup code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-12Thermal: exynos: remove unnecessary header inclusionsArnd Bergmann
In multiplatform configurations, we cannot include headers provided by only the exynos platform. Fortunately a number of drivers that include those headers do not actually need them, so we can just remove the inclusions. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: linux-pm@vger.kernel.org Acked-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-04-02thermal: exynos: Adapt to temperature emulation core thermal frameworkAmit Daniel Kachhap
This removes the driver specific sysfs support of the temperature emulation and uses the newly added core thermal framework for thermal emulation. An exynos platform specific handler is added to support this. In this patch, the exynos senor(tmu) related code and exynos framework related (thermal zone, cooling devices) code are intentionally kept separate. So an emulated function pointer is passed from sensor to framework. This is beneficial in adding more sensor support using the same framework code which is an ongoing work. The goal is to finally split them totally. Even the existing read_temperature also follows the same execution method. Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-03-26Thermal: exynos: fix cooling state translationZhang Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: Amit Daniel kachhap <amit.daniel@samsung.com>
2013-03-11thermal: exynos_thermal: return a proper error code while ↵Devendra Naga
thermal_zone_device_register fail. we are returning EINVAL while the thermal_zone_device_register function fail. instead we can use the return value from the thermal_zone_device_register by using PTR_ERR. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-28Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: "Highlights: - introduction of Dove thermal sensor driver. - introduction of Kirkwood thermal sensor driver. - introduction of intel_powerclamp thermal cooling device driver. - add interrupt and DT support for rcar thermal driver. - add thermal emulation support which allows platform thermal driver to do software/hardware emulation for thermal issues." * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (36 commits) thermal: rcar: remove __devinitconst thermal: return an error on failure to register thermal class Thermal: rename thermal governor Kconfig option to avoid generic naming thermal: exynos: Use the new thermal trend type for quick cooling action. Thermal: exynos: Add support for temperature falling interrupt. Thermal: Dove: Add Themal sensor support for Dove. thermal: Add support for the thermal sensor on Kirkwood SoCs thermal: rcar: add Device Tree support thermal: rcar: remove machine_power_off() from rcar_thermal_notify() thermal: rcar: add interrupt support thermal: rcar: add read/write functions for common/priv data thermal: rcar: multi channel support thermal: rcar: use mutex lock instead of spin lock thermal: rcar: enable CPCTL to use hardware TSC deciding thermal: rcar: use parenthesis on macro Thermal: fix a build warning when CONFIG_THERMAL_EMULATION cleared Thermal: fix a wrong comment thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation PM: intel_powerclamp: off by one in start_power_clamp() thermal: exynos: Miscellaneous fixes to support falling threshold interrupt ...
2013-02-08thermal: exynos: Use the new thermal trend type for quick cooling action.Amit Daniel Kachhap
This patch uses the quick thermal cooling trend type macros. This is needed as exynos5 and other thermal sensors now supports only interrupt method for thresold temperature check. Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-08Thermal: exynos: Add support for temperature falling interrupt.Jonghwa Lee
This patch introduces using temperature falling interrupt in exynos thermal driver. Former patch, it only use polling way to check whether if system themperature is fallen. However, exynos SOC also provides temperature falling interrupt way to do same things by hw. This feature is not supported in exynos4210. Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-02-06thermal: exynos: Miscellaneous fixes to support falling threshold interruptAmit Daniel Kachhap
Below fixes are done to support falling threshold interrupt, * Falling interrupt status macro corrected according to exynos5 data sheet. * The get trend function modified to calculate trip temperature correctly. * The clearing of interrupt status in the isr is now done after handling the event that caused the interrupt. Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-25thermal: Convert to devm_ioremap_resource()Thierry Reding
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-04thermal: exynos: Use of_match_ptr() macroSachin Kamat
This eliminates having an #ifdef returning NULL for the case when OF is disabled. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-04Thermal: exynos: Add sysfs node supporting exynos's emulation mode.Jonghwa Lee
This patch supports exynos's emulation mode with newly created sysfs node. Exynos 4x12 (4212, 4412) and 5 series provide emulation mode for thermal management unit. Thermal emulation mode supports software debug for TMU's operation. User can set temperature manually with software code and TMU will read current temperature from user value not from sensor's value. This patch includes also documentary placed under Documentation/thermal/. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-01-03Drivers: thermal: remove __dev* attributes.Greg Kroah-Hartman
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-05Thermal: Pass zone parameters as argument to tzd_registerDurgadoss R
This patch adds the thermal zone parameter as an argument to the tzd_register() function call; and updates other drivers using this function. Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-11-03exynos4_tmu_driver_ids should be exynos_tmu_driver_ids.Jonghwan Choi
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Reviewed-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-28thermal: Exynos: Fix NULL pointer dereference in exynos_unregister_thermal()Sachin Kamat
exynos_unregister_thermal() is functional only when 'th_zone' is not NULL (ensured by the NULL checks). However, in the event it is NULL, it gets dereferenced in the for loop. This patch fixes this issue. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
2012-09-24thermal: exynos: Use devm_* functionsAmit Daniel Kachhap
devm_* functions are used to replace kzalloc, request_mem_region, ioremap and request_irq functions in probe call. With the usage of devm_* functions explicit freeing and unmapping is not required. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-24ARM: exynos: add thermal sensor driver platform data supportAmit Daniel Kachhap
Add necessary default platform data support needed for TMU driver. The supplied dt/non-dt values are tested for origen exynos4210 and smdk exynos5250 platforms and only compile tested for exynos4412. Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Acked-by: 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: jonghwa lee <jonghwa3.lee@samsung.com> Cc: Kyungmin Park <kmpark@infradead.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-24thermal: exynos: register the tmu sensor with the kernel thermal layerAmit Daniel Kachhap
This code added creates a link between temperature sensors, linux thermal framework and cooling devices for samsung exynos platform. This layer monitors the temperature from the sensor and informs the generic thermal layer to take the necessary cooling action. [akpm@linux-foundation.org: fix comment layout] Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Acked-by: 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-24thermal: exynos5: add exynos5250 thermal sensor driver supportAmit Daniel Kachhap
Insert exynos5 TMU sensor changes into the thermal driver. Some exynos4 changes are made generic for exynos series. [akpm@linux-foundation.org: fix comment layout] Signed-off-by: SangWook Ju <sw.ju@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2012-09-24hwmon: exynos4: move thermal sensor driver to driver/thermal directoryAmit Daniel Kachhap
This movement is needed because the hwmon entries and corresponding sysfs interface is a duplicate of utilities already provided by driver/thermal/thermal_sys.c. The goal is to place it in thermal folder and add necessary functions to use the in-kernel thermal interfaces. Signed-off-by: Amit Daniel Kachhap <amit.kachhap@linaro.org> Acked-by: 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>