summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/rcar_thermal.c
Commit message (Collapse)AuthorAgeFilesLines
*---. Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git ↵Zhang Rui2013-05-281-7/+1
|\ \ \ | | | | | | | | | | | | into next
| | * | drivers/thermal: don't check resource with devm_ioremap_resourceWolfram Sang2013-05-201-5/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: 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: rcar: add pm_runtime_xxx() supportKuninori Morimoto2013-04-021-0/+11
| | | | | | | | Current rcar_thermal() didn't care about own power. Without this patch, rcar_thermal doesn't work on APE6 board Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: tidyup registration failure caseKuninori Morimoto2013-04-021-7/+16
| | | | | | | | | | | Current rcar_thermal driver didn't care about rcar_theraml_irq_disable() when registration failure case on _probe(), and _remove(). And, it returns without unregistering thermal zone when registration failure case on _probe(). This patch fixes these issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar_thermal: propagate return value of thermal_zone_device_registerDevendra Naga2013-03-111-1/+3
| | | | | | | | thermal_zone_device_register returns a value contained in the pointer itself use PTR_ERR to obtain the address and return it at the end. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: rcar: Convert to devm_ioremap_resource()Sachin Kamat2013-03-111-10/+6
| | | | | | | | | | | | | Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() 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: Sachin Kamat <sachin.kamat@linaro.org> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: fix missing unlock on error in rcar_thermal_update_temp()Wei Yongjun2013-03-111-4/+5
| | | | | | | | | Add the missing unlock before return from function rcar_thermal_update_temp() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: remove __devinitconstArnd Bergmann2013-02-221-1/+1
| | | | | | | | | | commit 76cc18874 "thermal: rcar: add Device Tree support" added device tree support for this driver, but also added an instance of __devinitconst, which is no longer defined Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: add Device Tree supportKuninori Morimoto2013-02-081-0/+7
| | | | | | | Support for loading the Renesas R-Car thermal module via devicetree. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: remove machine_power_off() from rcar_thermal_notify()Kuninori Morimoto2013-02-061-1/+0
| | | | | | | | | | Machine/System power-off is run in thermal frame work if it become critical temperature. This patch removed pointless machine_power_off() from thermal_zone_device_ops :: .notify Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: add interrupt supportKuninori Morimoto2013-02-061-9/+150
| | | | | | | | | | | | | This patch adds interrupt support for R-Car thermal driver. New generation R-Car thermal sensor interrupt controller was different from old generation. This patch supports new generation sensor only, since the old generation interrupt controller had never been used before, and will never be used in the future. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: add read/write functions for common/priv dataKuninori Morimoto2013-02-061-7/+41
| | | | | | | | | | | | | | | R-Car thermal driver will use struct common in next feature (interrupt support). But the register address is different between struct priv and common. This patch adds read/write functions for struct common, and use macro technique to avoid wrong register access. This is preparation patch for next feature (interrupt support), therefore, there is no user to use this common read/write function at this point. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: multi channel supportKuninori Morimoto2013-02-061-34/+94
| | | | | | | | | | | | | | | R-Car thermal sensor will be multi channel sensor in next generation. But "IRQ controlling method" and "register mapping" are different between old/new chip. This patch adds multi sensor support. Then, this driver assumes there is common register if platform has IRQ resource. The IRQ will be supported soon. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: use mutex lock instead of spin lockKuninori Morimoto2013-02-061-23/+7
| | | | | | | | | | | | Current R-Car thermal driver is using spin lock for each registers read/write, but it is pointless lock. This lock is required while reading temperature, but it needs long wait (= 300ms). So, this patch used mutex lock while reading temperature, instead of spin lock for each registers. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: enable CPCTL to use hardware TSC decidingKuninori Morimoto2013-02-061-65/+26
| | | | | | | | | | If CPCTL was 1 on R-Car thermal, the thermal comparator offset is automatically decided by hardware. And this CPCTL is the conditions which validate interrupt. This patch enabled CPCTL. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: use parenthesis on macroKuninori Morimoto2013-02-061-1/+1
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: add .get_trip_type/temp and .notify supportkuninori.morimoto.gx@renesas.com2013-01-041-3/+65
| | | | | | | | | | This patch adds .get_trip_type(), .get_trip_temp(), and .notify() on rcar_thermal_zone_ops. Driver will try platform power OFF if it reached to critical temperature. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: add rcar_zone_to_priv() macroKuninori Morimoto2012-11-261-1/+2
| | | | | | | | This patch adds rcar_zone_to_priv() which is a helper macro for gettign private data. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar: fixup the unit of temperatureKuninori Morimoto2012-11-261-1/+3
| | | | | | | The unit of temperature is Milli-Celsius. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: rcar_thermal: remove explicitly used devm_kfree/iounap()Kuninori Morimoto2012-11-071-16/+2
| | | | | | | devm_kfree and devm_iounmap should not have to be explicitly used Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* Thermal: Pass zone parameters as argument to tzd_registerDurgadoss R2012-11-051-1/+1
| | | | | | | | | 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>
* thermal: solve compilation errors in rcar_thermalDevendra Naga2012-11-031-1/+1
| | | | | | | | | | | | | | | | | | following were the errors reported drivers/thermal/rcar_thermal.c: In function ‘rcar_thermal_probe’: drivers/thermal/rcar_thermal.c:214:10: warning: passing argument 3 of ‘thermal_zone_device_register’ makes integer from pointer without a cast [enabled by default] include/linux/thermal.h:166:29: note: expected ‘int’ but argument is of type ‘struct rcar_thermal_priv *’ drivers/thermal/rcar_thermal.c:214:10: error: too few arguments to function ‘thermal_zone_device_register’ include/linux/thermal.h:166:29: note: declared here make[1]: *** [drivers/thermal/rcar_thermal.o] Error 1 make: *** [drivers/thermal/rcar_thermal.o] Error 2 with gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) Signed-off-by: Devendra Naga <develkernel412222@gmail.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
* thermal: add Renesas R-Car thermal sensor supportKuninori Morimoto2012-09-241-0/+260
This patch add basic Renesas R-Car thermal sensor support. It was tested on R-Car H1 Marzen board. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Len Brown <len.brown@intel.com> Cc: Joe Perches <joe@perches.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
OpenPOWER on IntegriCloud