* [PATCH v3 0/3] fix the TSHUT issue on rockchip thermal
@ 2015-10-23 1:54 Caesar Wang
2015-10-23 1:54 ` [PATCH v3 1/3] dt-bindings: rockchip-thermal: Add the pinctrl states in this document Caesar Wang
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Caesar Wang @ 2015-10-23 1:54 UTC (permalink / raw)
To: linux-arm-kernel
Thank you all for providing inputs and comments on previous versions of
this patchset.
Especially thanks to the (Doug, Rob....).
We need the OTP pin is gpio state before resetting the TSADC controller,
since the tshut polarity will generate a high signal.
Says:
The TSHUT temperature is setting more than 80 degree, the default
tshut polarity is HIGH.
If T > 80C, the OTP output the High Signal.
If T < 80C, the OTP output the Low Signal.
On the moment, the TSADC controller is reset, the tshut polarity will be
Low in a short period of time.
So:
If T < 80C, the OTP output the High Signal.
If T > 80C, the OTP output the Low Signal.
In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can
accept the reset response time to avoid this issue.
In other words, the system will be always reboot if we make the OTP pin
is connected the others IC to control the power.
This series patchs are depend on Doug's patch.(https://patchwork.kernel.org/patch/7454311/)
This series patchs are based on the Linus master branch.
518cd44 ARM: dts: rockchip: Add the OTP gpio pinctrl
83e0bab dt-bindings: Add the "init" pinctrl in this document
150426c drivers/pinctrl: Add the concept of an "init" state
ce1fad2 Merge branch 'keys-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
1099f86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
911b79c KEYS: Don't permit request_key() to construct a new keyring
37850e3 net: bcmgenet: Fix early link interrupt enabling
afc050d Merge tag 'wireless-drivers-for-davem-2015-10-17' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
e277de5 tunnels: Don't require remote endpoint or ID during creation.
740dbc2 openvswitch: Scrub skb between namespaces
....
Tested on box board.
Changes in v3:
- Add the pictrl states decription in document.
- Add the pinctrl state for in the suspend/resume.
- Add the "sleep" pinctrl as the gpio state in PATCH[3/3]
Changes in v2:
- Add the 'init' pinctrl more decription in commit.
- Fix the subject to make more obvious in PATCH[1/2]
- Resend this patch v2 since fix the subject to be specific.
- Add some commits for more obvious in PATCH[2/2]
Changes in v1:
- As the Doug comments, add the 'init' property to sync document.
- As the Doug comments, drop the thermal driver patchs since
we can with pinctrl changing to work.
- As the Doug's patch to add the 'init' property.
Caesar Wang (3):
dt-bindings: rockchip-thermal: Add the pinctrl states in this document
thermal: rockchip: ensure the otp states before resetting the
controller
ARM: dts: rockchip: Add the OTP gpio pinctrl
.../devicetree/bindings/thermal/rockchip-thermal.txt | 11 +++++++++--
arch/arm/boot/dts/rk3288.dtsi | 10 ++++++++--
drivers/thermal/rockchip_thermal.c | 4 ++++
3 files changed, 21 insertions(+), 4 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/3] dt-bindings: rockchip-thermal: Add the pinctrl states in this document
2015-10-23 1:54 [PATCH v3 0/3] fix the TSHUT issue on rockchip thermal Caesar Wang
@ 2015-10-23 1:54 ` Caesar Wang
2015-10-23 1:54 ` [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller Caesar Wang
2015-10-23 1:54 ` [PATCH v3 3/3] ARM: dts: rockchip: Add the OTP gpio pinctrl Caesar Wang
2 siblings, 0 replies; 7+ messages in thread
From: Caesar Wang @ 2015-10-23 1:54 UTC (permalink / raw)
To: linux-arm-kernel
The "init" pinctrl is defined we'll set
pinctrl to this state before probe and then "default" after probe.
Add the "init" and "sleep" pinctrl as the OTP gpio state, since we need
switch the pin to gpio state before the TSADC controller is reset.
AFAIK, the TSADC controller is reset, the tshut polarity will be
a *low* signal in a short period of time for some devices.
Says:
The TSADC get the temperature on rockchip thermal.
If T(current temperature) < (setting temperature), the OTP output the
*high* signal.
If T(current temperature) > (setting temperature), the OTP output the
*low* Signal.
In some cases, the OTP pin is connected to the PMIC, maybe the
PMIC can accept the reset response time to avoid this issue.
In other words, the system will be always reboot if we make the
OTP pin is connected the others IC to control the power.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v3:
- Add the pictrl states decription in document.
Changes in v2:
- Add the 'init' pinctrl more decription in commit.
- Fix the subject to make more obvious in PATCH[1/2]
- Resend this patch v2 since fix the subject to be specific.
Changes in v1:
- As the Doug comments, add the 'init' property to sync document.
.../devicetree/bindings/thermal/rockchip-thermal.txt | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
index ef802de..b38200d 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -12,6 +12,11 @@ Required properties:
- resets : Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names : Must include the name "tsadc-apb".
+- pinctrl-names : The pin control state names;
+- pinctrl-0 : The "init" pinctrl state, it will be set before device probe.
+- pinctrl-1 : The "default" pinctrl state, it will be set after reset the
+ TSADC controller.
+- pinctrl-2 : The "sleep" pinctrl state, it will be in for suspend.
- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
- rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value.
- rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO.
@@ -27,8 +32,10 @@ tsadc: tsadc at ff280000 {
clock-names = "tsadc", "apb_pclk";
resets = <&cru SRST_TSADC>;
reset-names = "tsadc-apb";
- pinctrl-names = "default";
- pinctrl-0 = <&otp_out>;
+ pinctrl-names = "init", "default", "sleep";
+ pinctrl-0 = <&otp_gpio>;
+ pinctrl-1 = <&otp_out>;
+ pinctrl-2 = <&otp_gpio>;
#thermal-sensor-cells = <1>;
rockchip,hw-tshut-temp = <95000>;
rockchip,hw-tshut-mode = <0>;
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller
2015-10-23 1:54 [PATCH v3 0/3] fix the TSHUT issue on rockchip thermal Caesar Wang
2015-10-23 1:54 ` [PATCH v3 1/3] dt-bindings: rockchip-thermal: Add the pinctrl states in this document Caesar Wang
@ 2015-10-23 1:54 ` Caesar Wang
2015-10-23 4:04 ` Doug Anderson
2015-10-23 1:54 ` [PATCH v3 3/3] ARM: dts: rockchip: Add the OTP gpio pinctrl Caesar Wang
2 siblings, 1 reply; 7+ messages in thread
From: Caesar Wang @ 2015-10-23 1:54 UTC (permalink / raw)
To: linux-arm-kernel
We need the OTP pin is gpio state before resetting the TSADC controller,
since the tshut polarity will generate a high signal.
Says:
The TSHUT temperature is setting more than 80 degree, the
default tshut polarity is high.
If T > 80C, the OTP output the high signal.
If T < 80C, the OTP output the low signal.
On the moment, the tshut polarity will be low in a short period of time
if the TSADC controller is reset.
So:
If T < 80C, the OTP output the High Signal.
If T > 80C, the OTP output the Low Signal.
In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can
accept the reset response time to avoid this issue.
In other words, the system will be always reboot if we
make the OTP pin is connected the others IC to control the power.
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
Changes in v3:
- Add the pinctrl state for in the suspend/resume.
Changes in v2: None
Changes in v1: None
drivers/thermal/rockchip_thermal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index c89ffb2..3b8fbda 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -642,6 +642,8 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
clk_disable(thermal->pclk);
clk_disable(thermal->clk);
+ pinctrl_pm_select_sleep_state(dev);
+
return 0;
}
@@ -678,6 +680,8 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
+ pinctrl_pm_select_default_state(dev);
+
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 3/3] ARM: dts: rockchip: Add the OTP gpio pinctrl
2015-10-23 1:54 [PATCH v3 0/3] fix the TSHUT issue on rockchip thermal Caesar Wang
2015-10-23 1:54 ` [PATCH v3 1/3] dt-bindings: rockchip-thermal: Add the pinctrl states in this document Caesar Wang
2015-10-23 1:54 ` [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller Caesar Wang
@ 2015-10-23 1:54 ` Caesar Wang
2 siblings, 0 replies; 7+ messages in thread
From: Caesar Wang @ 2015-10-23 1:54 UTC (permalink / raw)
To: linux-arm-kernel
Add the "init" anf "sleep" pinctrl as the OTP gpio state.
We need the OTP pin is gpio state before resetting the TSADC controller,
since the tshut polarity will generate a high signal.
"init" pinctrl property is defined by Doug's Patch[0].
Patch[0]:
https://patchwork.kernel.org/patch/7454311/
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v3:
- Add the "sleep" pinctrl as the gpio state in PATCH[3/3]
Changes in v2:
- Add some commits for more obvious in PATCH[2/2]
Changes in v1:
- As the Doug comments, drop the thermal driver patchs since
we can with pinctrl changing to work.
- As the Doug's patch to add the 'init' property.
arch/arm/boot/dts/rk3288.dtsi | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 906e938..13ff09a 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -447,8 +447,10 @@
clock-names = "tsadc", "apb_pclk";
resets = <&cru SRST_TSADC>;
reset-names = "tsadc-apb";
- pinctrl-names = "default";
- pinctrl-0 = <&otp_out>;
+ pinctrl-names = "init", "default", "sleep";
+ pinctrl-0 = <&otp_gpio>;
+ pinctrl-1 = <&otp_out>;
+ pinctrl-2 = <&otp_gpio>;
#thermal-sensor-cells = <1>;
rockchip,hw-tshut-temp = <95000>;
status = "disabled";
@@ -1273,6 +1275,10 @@
};
tsadc {
+ otp_gpio: otp-gpio {
+ rockchip,pins = <0 10 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
otp_out: otp-out {
rockchip,pins = <0 10 RK_FUNC_1 &pcfg_pull_none>;
};
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller
2015-10-23 1:54 ` [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller Caesar Wang
@ 2015-10-23 4:04 ` Doug Anderson
2015-10-23 6:31 ` Caesar Wang
2015-10-23 6:32 ` Caesar Wang
0 siblings, 2 replies; 7+ messages in thread
From: Doug Anderson @ 2015-10-23 4:04 UTC (permalink / raw)
To: linux-arm-kernel
Caesar,
On Thu, Oct 22, 2015 at 9:54 PM, Caesar Wang <wxt@rock-chips.com> wrote:
> We need the OTP pin is gpio state before resetting the TSADC controller,
> since the tshut polarity will generate a high signal.
>
> Says:
> The TSHUT temperature is setting more than 80 degree, the
> default tshut polarity is high.
>
> If T > 80C, the OTP output the high signal.
> If T < 80C, the OTP output the low signal.
>
> On the moment, the tshut polarity will be low in a short period of time
> if the TSADC controller is reset.
>
> So:
> If T < 80C, the OTP output the High Signal.
> If T > 80C, the OTP output the Low Signal.
>
> In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can
> accept the reset response time to avoid this issue.
> In other words, the system will be always reboot if we
> make the OTP pin is connected the others IC to control the power.
>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>
> ---
>
> Changes in v3:
> - Add the pinctrl state for in the suspend/resume.
>
> Changes in v2: None
> Changes in v1: None
>
> drivers/thermal/rockchip_thermal.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
> index c89ffb2..3b8fbda 100644
> --- a/drivers/thermal/rockchip_thermal.c
> +++ b/drivers/thermal/rockchip_thermal.c
> @@ -642,6 +642,8 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
> clk_disable(thermal->pclk);
> clk_disable(thermal->clk);
>
> + pinctrl_pm_select_sleep_state(dev);
> +
> return 0;
> }
>
> @@ -678,6 +680,8 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
> for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
> rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
>
> + pinctrl_pm_select_default_state(dev);
> +
> return 0;
> }
The patch looks totally fine, but the description is a little
confusing. Reading this patch it's all about adding support for the
"sleep" state in the tsadc driver, but nothing in the description
talks about that. I'd expect something like:
thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r
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.
---
Note that although this pinctrl approach is fine IMHO, I am left
wondering whether we could just change the tsadc init sequence to
avoid the glitch. I can't easily test myself, but if we can program
the temperatures before re-enabling the tsadc would it avoid the
problem too? Like could we just swap things like:
thermal->chip->set_tshut_temp(id, thermal->regs,
thermal->hw_shut_temp);
thermal->chip->set_tshut_mode(id, thermal->regs,
thermal->tshut_mode);
Does that help?
-Doug
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller
2015-10-23 4:04 ` Doug Anderson
@ 2015-10-23 6:31 ` Caesar Wang
2015-10-23 6:32 ` Caesar Wang
1 sibling, 0 replies; 7+ messages in thread
From: Caesar Wang @ 2015-10-23 6:31 UTC (permalink / raw)
To: linux-arm-kernel
? 2015?10?23? 12:04, Doug Anderson ??:
> Caesar,
>
> On Thu, Oct 22, 2015 at 9:54 PM, Caesar Wang <wxt@rock-chips.com> wrote:
>> We need the OTP pin is gpio state before resetting the TSADC controller,
>> since the tshut polarity will generate a high signal.
>>
>> Says:
>> The TSHUT temperature is setting more than 80 degree, the
>> default tshut polarity is high.
>>
>> If T > 80C, the OTP output the high signal.
>> If T < 80C, the OTP output the low signal.
>>
>> On the moment, the tshut polarity will be low in a short period of time
>> if the TSADC controller is reset.
>>
>> So:
>> If T < 80C, the OTP output the High Signal.
>> If T > 80C, the OTP output the Low Signal.
>>
>> In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can
>> accept the reset response time to avoid this issue.
>> In other words, the system will be always reboot if we
>> make the OTP pin is connected the others IC to control the power.
>>
>> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>>
>> ---
>>
>> Changes in v3:
>> - Add the pinctrl state for in the suspend/resume.
>>
>> Changes in v2: None
>> Changes in v1: None
>>
>> drivers/thermal/rockchip_thermal.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
>> index c89ffb2..3b8fbda 100644
>> --- a/drivers/thermal/rockchip_thermal.c
>> +++ b/drivers/thermal/rockchip_thermal.c
>> @@ -642,6 +642,8 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
>> clk_disable(thermal->pclk);
>> clk_disable(thermal->clk);
>>
>> + pinctrl_pm_select_sleep_state(dev);
>> +
>> return 0;
>> }
>>
>> @@ -678,6 +680,8 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
>> for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
>> rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
>>
>> + pinctrl_pm_select_default_state(dev);
>> +
>> return 0;
>> }
> The patch looks totally fine, but the description is a little
> confusing. Reading this patch it's all about adding support for the
> "sleep" state in the tsadc driver, but nothing in the description
> talks about that. I'd expect something like:
>
> thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r
>
> 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.
Thanks Doug to take your time reviewing this series patchs.
The commit is very good for this patch.
>
> ---
>
> Note that although this pinctrl approach is fine IMHO, I am left
> wondering whether we could just change the tsadc init sequence to
> avoid the glitch. I can't easily test myself, but if we can program
> the temperatures before re-enabling the tsadc would it avoid the
> problem too?
It's the chip behaviour, the glitches is aways occured by reset controller.
The best way need change to the gpio state before reset the controller.
> Like could we just swap things like:
>
> thermal->chip->set_tshut_temp(id, thermal->regs,
> thermal->hw_shut_temp);
> thermal->chip->set_tshut_mode(id, thermal->regs,
> thermal->tshut_mode);
>
>
> Does that help?
It didn't work on box board.
>
>
> -Doug
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller
2015-10-23 4:04 ` Doug Anderson
2015-10-23 6:31 ` Caesar Wang
@ 2015-10-23 6:32 ` Caesar Wang
1 sibling, 0 replies; 7+ messages in thread
From: Caesar Wang @ 2015-10-23 6:32 UTC (permalink / raw)
To: linux-arm-kernel
? 2015?10?23? 12:04, Doug Anderson ??:
> Caesar,
>
> On Thu, Oct 22, 2015 at 9:54 PM, Caesar Wang <wxt@rock-chips.com> wrote:
>> We need the OTP pin is gpio state before resetting the TSADC controller,
>> since the tshut polarity will generate a high signal.
>>
>> Says:
>> The TSHUT temperature is setting more than 80 degree, the
>> default tshut polarity is high.
>>
>> If T > 80C, the OTP output the high signal.
>> If T < 80C, the OTP output the low signal.
>>
>> On the moment, the tshut polarity will be low in a short period of time
>> if the TSADC controller is reset.
>>
>> So:
>> If T < 80C, the OTP output the High Signal.
>> If T > 80C, the OTP output the Low Signal.
>>
>> In some cases, the OTP pin is connected to the PMIC, maybe the PMIC can
>> accept the reset response time to avoid this issue.
>> In other words, the system will be always reboot if we
>> make the OTP pin is connected the others IC to control the power.
>>
>> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
>>
>> ---
>>
>> Changes in v3:
>> - Add the pinctrl state for in the suspend/resume.
>>
>> Changes in v2: None
>> Changes in v1: None
>>
>> drivers/thermal/rockchip_thermal.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
>> index c89ffb2..3b8fbda 100644
>> --- a/drivers/thermal/rockchip_thermal.c
>> +++ b/drivers/thermal/rockchip_thermal.c
>> @@ -642,6 +642,8 @@ static int __maybe_unused rockchip_thermal_suspend(struct device *dev)
>> clk_disable(thermal->pclk);
>> clk_disable(thermal->clk);
>>
>> + pinctrl_pm_select_sleep_state(dev);
>> +
>> return 0;
>> }
>>
>> @@ -678,6 +680,8 @@ static int __maybe_unused rockchip_thermal_resume(struct device *dev)
>> for (i = 0; i < ARRAY_SIZE(thermal->sensors); i++)
>> rockchip_thermal_toggle_sensor(&thermal->sensors[i], true);
>>
>> + pinctrl_pm_select_default_state(dev);
>> +
>> return 0;
>> }
> The patch looks totally fine, but the description is a little
> confusing. Reading this patch it's all about adding support for the
> "sleep" state in the tsadc driver, but nothing in the description
> talks about that. I'd expect something like:
>
> thermal: rockchip: support the sleep pinctrl state to avoid glitches in s2r
>
> 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.
Thanks Doug to take your time reviewing this series patchs.
The commit is very good for this patch.
>
> ---
>
> Note that although this pinctrl approach is fine IMHO, I am left
> wondering whether we could just change the tsadc init sequence to
> avoid the glitch. I can't easily test myself, but if we can program
> the temperatures before re-enabling the tsadc would it avoid the
> problem too?
It's the chip behaviour, the glitches is aways occured by reset controller.
The best way need change to the gpio state before reset the controller.
> Like could we just swap things like:
>
> thermal->chip->set_tshut_temp(id, thermal->regs,
> thermal->hw_shut_temp);
> thermal->chip->set_tshut_mode(id, thermal->regs,
> thermal->tshut_mode);
>
>
> Does that help?
It didn't work on box board.
>
>
> -Doug
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
--
Thanks,
Caesar
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-23 6:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-23 1:54 [PATCH v3 0/3] fix the TSHUT issue on rockchip thermal Caesar Wang
2015-10-23 1:54 ` [PATCH v3 1/3] dt-bindings: rockchip-thermal: Add the pinctrl states in this document Caesar Wang
2015-10-23 1:54 ` [PATCH v3 2/3] thermal: rockchip: ensure the otp states before resetting the controller Caesar Wang
2015-10-23 4:04 ` Doug Anderson
2015-10-23 6:31 ` Caesar Wang
2015-10-23 6:32 ` Caesar Wang
2015-10-23 1:54 ` [PATCH v3 3/3] ARM: dts: rockchip: Add the OTP gpio pinctrl Caesar Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).