aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/thermal/ti-soc-thermal (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-01thermal: ti-soc-thermal: ti-bandgap.c: Cleaning up wrong address is checkedRickard Strandqvist1-1/+1
Wrong address is checked after memory allocation. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2014-05-06thermal: ti-soc-thermal: clk_round_rate() can return a zero upon errorPaul Walmsley1-1/+1
Treat both negative and zero return values from clk_round_rate() as errors. This is needed since subsequent patches will convert clk_round_rate()'s return value to be an unsigned type, rather than a signed type, since some clock sources can generate rates higher than (2^31)-1 Hz. Eventually, when calling clk_round_rate(), only a return value of zero will be considered a error. All other values will be considered valid rates. The comparison against values less than 0 is kept to preserve the correct behavior in the meantime. This patch also gets rid of a comparison between unsigned and signed values; a side-benefit. Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Cc: Eduardo Valentin <eduardo.valentin@ti.com> Cc: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
2014-04-08thermal: ti-soc-thermal: Use SIMPLE_DEV_PM_OPS macroJingoo Han1-4/+2
Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
2013-12-04thermal: ti-soc-thermal: use thermal DT infrastructureEduardo Valentin1-15/+62
This patch improves the ti-soc-thermal driver by adding the support to build the thermal zones based on DT nodes. The driver will have two options now to build the thermal zones. The first option is the zones originally coded in this driver. So, the driver behavior will be same if there is no DT node describing the zones. The second option, when it is found a DT node with thermal data, will used the common infrastructure to build the thermal zone and bind its cooling devices. In case the driver loads thermal data using the legacy mode, this driver still adds to the system a cpufreq cooling device. Loading the thermal data from DT, the driver assumes someone else will add the cpufreq cooling device, like the cpufreq driver. 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>
2013-10-15drivers: thermal: allow ti-soc-thermal run without pcb zoneEduardo Valentin1-0/+1
This patch changes the behavior of TI SoC thermal driver when there is a PCB thermal zone. Instead of reporting an error code when reading from PCB temperature sensor fails, this patch will make the driver attempt to compose the hotspot extrapolation based on bandgap readings only. 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>
2013-08-29thermal: ti-soc-thermal: Ensure to compute thermal trendRanganath Krishnan1-1/+5
Workaround to compute thermal trend even when update interval is not set. This patch will ensure to compute the thermal trend when bandgap counter delay is not set. Signed-off-by: Ranganath Krishnan <ranganath@ti.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
2013-08-29thermal: ti-soc-thermal: Set the bandgap mask counter delay valueRanganath Krishnan1-0/+7
Set the bandgap mask counter_delay with the polling_delay value on registering the thermal zone. This patch will ensure to get the correct update interval for computing the thermal trend. Signed-off-by: Ranganath Krishnan <ranganath@ti.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
2013-08-29thermal: ti-soc-thermal: Initialize counter_delay field for TI DRA752 sensorsRanganath Krishnan1-0/+5
Initialize MPU, GPU, CORE, DSPEVE and IVA thermal sensors of DRA752 bandgap with the counter delay mask. Signed-off-by: Ranganath Krishnan <ranganath@ti.com> Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
2013-07-08thermal: ti-soc-thermal: use standard GPIO DT bindingsEduardo Valentin1-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>
2013-06-13thermal: ti-soc-thermal: add dra752 chip to device tableEduardo Valentin2-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>
2013-06-13thermal: ti-soc-thermal: add thermal data for DRA752 chipsEduardo Valentin5-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>
2013-06-13thermal: ti-soc-thermal: remove usage of IS_ERR_OR_NULLEduardo Valentin2-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>
2013-06-13thermal: ti-soc-thermal: freeze FSM while computing trendEduardo Valentin1-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>
2013-06-13thermal: ti-soc-thermal: remove external heat while extrapolating hotspotEduardo Valentin1-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>
2013-05-28thermal: introduce TI SoC thermal driverEduardo Valentin11-0/+3499
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>