- 01 3月, 2016 2 次提交
-
-
由 Elaine Zhang 提交于
the calculation use a global table, not their own table. so adapt the table to the correct one. Signed-off-by: NElaine Zhang <zhangqing@rock-chips.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
As the Dan report the smatch check the thermal driver warning: drivers/thermal/rockchip_thermal.c:551 rockchip_configure_from_dt() warn: impossible condition '(thermal->tshut_temp > ((~0 >> 1))) => (s32min-s32max > s32max)' Although The shut_temp read from DT is u32,the temperature is currently represented as int not long in the thermal driver. Let's change to make shut_temp instead of the thermal->tshut_temp for the condition. Fixes: commit 437df217 ("thermal: rockchip: consistently use int for temperatures") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 07 1月, 2016 3 次提交
-
-
由 Caesar Wang 提交于
The RK3399 SoCs have two Temperature Sensors, channel 0 is for CPU. channel 1 is for GPU. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
The RK3228 SoCs has one Temperature Sensor, channel 0 is for CPU. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
This patchset trys to dictate unified format for driver. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 13 11月, 2015 6 次提交
-
-
由 Caesar Wang 提交于
The RK3368 SoCs support to 2 channel TS-ADC, the temperature criteria of each channel can be configurable. The system has two Temperature Sensors, channel 0 is for CPU, and channel 1 is for GPU. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
As Temperature is currently represented as int not long in the thermal framework since use int intead of unsigned long/long to represent temperature to avoid bogus overheat detection when negative temperature reported. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
The conversion table has the adc value and temperature. In fact, the adc value only has the increment or decrement mode in conversion table. Moment, we can add the sort mode to be better support the *code_to_temp* for differenr SoCs. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
We should make the conversion table in as a parameter since the different SoCs have the different conversionion table. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Caesar Wang 提交于
The current driver is default to register the two thermal sensors in probe since some SoCs maybe only have one sensor for thermal. In some cases, the channel 0 is not always the cpu or gpu sensor. So add the channel can be configured for sensors. Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 12 11月, 2015 1 次提交
-
-
由 Caesar Wang 提交于
Missing a include file caused compile error. drivers/thermal/rockchip_thermal.c: In function 'rockchip_thermal_suspend': drivers/thermal/rockchip_thermal.c:720:2: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration] ... Fixes: 7e38a5b1 ("thermal: rockchip: support the sleep pinctrl state to avoid glitches") Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Reported-by: Nkbuild test robot <lkp@intel.com> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 04 11月, 2015 1 次提交
-
-
由 Caesar Wang 提交于
When we come out of system suspend state (S3) the tsadc will have been reset and back at its default state. While reprogramming the tsadc it's possible that we'll glitch the output and unintentionally cause the "over temperature" GPIO to be asserted. Since the over temperature GPIO is often hooked up to something that will cause a reboot or shutdown in hardware, this glitch can be catastrophic on some boards. We'll add support for selecting the "sleep" pinctrl state at suspend time. Boards can use this to effectively disable the tsadc at suspend time and avoid glitches when the system is resumed. Reviewed-by: NDouglas Anderson <dianders@chromium.org> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 31 10月, 2015 2 次提交
-
-
由 Dmitry Torokhov 提交于
When requested thermal shutdown signal polarity is low we need to make sure that the bit representing high level of signal is reset, and not set all other bits in that register. Also rename TSADCV2_INT_PD_CLEAR to TSADCV2_INT_PD_CLEAR_MASK to better reflect its nature. Acked-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NDmitry Torokhov <dtor@chromium.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
由 Dmitry Torokhov 提交于
We attempted to signal invalid code by returning -EAGAIN from rk_tsadcv2_code_to_temp(), unfortunately the return value was stuffed directly into the temperature pointer, potentially confusing upper layers with temperature of -EINVAL. Let's split temperature from error/success indicator to avoid such confusion. Also change the way we scan the temperature table to start with the 2nd element so that we do not need to worry that we may reference out of bounds element while doing binary search and keep checking that we end up with 'mid' equal to 0 (since we are looking for the temperature that would fall into interval between the 'mid' and 'mid - 1') . Tested-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NDmitry Torokhov <dtor@chromium.org> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 03 8月, 2015 1 次提交
-
-
由 Sascha Hauer 提交于
The thermal code uses int, long and unsigned long for temperatures in different places. Using an unsigned type limits the thermal framework to positive temperatures without need. Also several drivers currently will report temperatures near UINT_MAX for temperatures below 0°C. This will probably immediately shut the machine down due to overtemperature if started below 0°C. 'long' is 64bit on several architectures. This is not needed since INT_MAX °mC is above the melting point of all known materials. Consistently use a plain 'int' for temperatures throughout the thermal code and the drivers. This only changes the places in the drivers where the temperature is passed around as pointer, when drivers internally use another type this is not changed. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NJean Delvare <jdelvare@suse.de> Reviewed-by: NLukasz Majewski <l.majewski@samsung.com> Reviewed-by: NDarren Hart <dvhart@linux.intel.com> Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Reviewed-by: NPeter Feuerer <peter@piie.net> Cc: Punit Agrawal <punit.agrawal@arm.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Jean Delvare <jdelvare@suse.de> Cc: Peter Feuerer <peter@piie.net> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: linux-acpi@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-omap@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org Cc: Guenter Roeck <linux@roeck-us.net> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Darren Hart <dvhart@infradead.org> Cc: lm-sensors@lm-sensors.org Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 09 5月, 2015 1 次提交
-
-
由 Dan Carpenter 提交于
There is a copy and paste bug, "->clk" vs "->pclk", so we return the wrong error code here. Fixes: cbac8f63 ('thermal: rockchip: add driver for thermal') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NCaesar Wang <wxt@rock-chips.com> Reviewed-by: NDoug Anderson <dianders@chromium.org> Tested-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NZhang Rui <rui.zhang@intel.com>
-
- 25 1月, 2015 1 次提交
-
-
由 Caesar Wang 提交于
In general, the kernel should report temperature readings exactly as reported by the hardware. The cpu / gpu thermal driver works in 5 degree increments,but we ought to do more accurate. The temperature will do linear interpolation between the entries in the table. Test= $md5sum /dev/zero & $while true; do grep "" /sys/class/thermal/thermal_zone[1-2]/temp; sleep .5; done e.g. We can get the result as follows: /sys/class/thermal/thermal_zone1/temp:39994 /sys/class/thermal/thermal_zone2/temp:39086 /sys/class/thermal/thermal_zone1/temp:39994 /sys/class/thermal/thermal_zone2/temp:39540 /sys/class/thermal/thermal_zone1/temp:39540 /sys/class/thermal/thermal_zone2/temp:39540 /sys/class/thermal/thermal_zone1/temp:39540 /sys/class/thermal/thermal_zone2/temp:39994 Reviewed-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: NDaniel Kurtz <djkurtz@chromium.org> Signed-off-by: NCaesar Wang <wxt@rock-chips.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-
- 22 12月, 2014 1 次提交
-
-
由 Wolfram Sang 提交于
This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 25 11月, 2014 1 次提交
-
-
由 Caesar Wang 提交于
Thermal is TS-ADC Controller module supports user-defined mode and automatic mode. User-defined mode refers,TSADC all the control signals entirely by software writing to register for direct control. Automaic mode refers to the module automatically poll TSADC output, and the results were checked.If you find that the temperature High in a period of time,an interrupt is generated to the processor down-measures taken;If the temperature over a period of time High, the resulting TSHUT gave CRU module,let it reset the entire chip, or via GPIO give PMIC. Signed-off-by: Nzhaoyifeng <zyf@rock-chips.com> Signed-off-by: NCaesar Wang <caesar.wang@rock-chips.com> Reviewed-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
-