mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old
@ 2017-07-20  2:45 yanjiang.jin
  2017-07-20  3:18 ` Guenter Roeck
  0 siblings, 1 reply; 3+ messages in thread
From: yanjiang.jin @ 2017-07-20  2:45 UTC (permalink / raw)
  To: wim, linux; +Cc: jinyanjiang, yanjiang.jin, linux-watchdog, linux-kernel

From: Yanjiang Jin <yanjiang.jin@windriver.com>

Without this patch we couldn't change the timeout value of imx2_wdt.

Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
---
 drivers/watchdog/imx2_wdt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index 4874b0f..6cfeee6 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -178,6 +178,9 @@ static int imx2_wdt_set_timeout(struct watchdog_device *wdog,
 
 	regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
 			   WDOG_SEC_TO_COUNT(new_timeout));
+
+	wdog->timeout = new_timeout;
+
 	return 0;
 }
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old
  2017-07-20  2:45 [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old yanjiang.jin
@ 2017-07-20  3:18 ` Guenter Roeck
  2017-07-20  3:22   ` yjin
  0 siblings, 1 reply; 3+ messages in thread
From: Guenter Roeck @ 2017-07-20  3:18 UTC (permalink / raw)
  To: yanjiang.jin, wim; +Cc: jinyanjiang, linux-watchdog, linux-kernel

On 07/19/2017 07:45 PM, yanjiang.jin@windriver.com wrote:
> From: Yanjiang Jin <yanjiang.jin@windriver.com>
> 
> Without this patch we couldn't change the timeout value of imx2_wdt.
> 
> Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
> ---
>   drivers/watchdog/imx2_wdt.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 4874b0f..6cfeee6 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -178,6 +178,9 @@ static int imx2_wdt_set_timeout(struct watchdog_device *wdog,
>   
>   	regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
>   			   WDOG_SEC_TO_COUNT(new_timeout));
> +
> +	wdog->timeout = new_timeout;
> +

I must be missing something. That very same code is already in line 177,
added with commit 30dd4a8f08b57 ("watchdog: imx2_wdt: also set wdog->timeout
to new_timeout") back in 2015.

Did you see this in an older kernel, maybe ?

Guenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old
  2017-07-20  3:18 ` Guenter Roeck
@ 2017-07-20  3:22   ` yjin
  0 siblings, 0 replies; 3+ messages in thread
From: yjin @ 2017-07-20  3:22 UTC (permalink / raw)
  To: Guenter Roeck, wim; +Cc: jinyanjiang, linux-watchdog, linux-kernel



On 2017年07月20日 11:18, Guenter Roeck wrote:
> On 07/19/2017 07:45 PM, yanjiang.jin@windriver.com wrote:
>> From: Yanjiang Jin <yanjiang.jin@windriver.com>
>>
>> Without this patch we couldn't change the timeout value of imx2_wdt.
>>
>> Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
>> ---
>>   drivers/watchdog/imx2_wdt.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
>> index 4874b0f..6cfeee6 100644
>> --- a/drivers/watchdog/imx2_wdt.c
>> +++ b/drivers/watchdog/imx2_wdt.c
>> @@ -178,6 +178,9 @@ static int imx2_wdt_set_timeout(struct 
>> watchdog_device *wdog,
>>         regmap_update_bits(wdev->regmap, IMX2_WDT_WCR, IMX2_WDT_WCR_WT,
>>                  WDOG_SEC_TO_COUNT(new_timeout));
>> +
>> +    wdog->timeout = new_timeout;
>> +
>
> I must be missing something. That very same code is already in line 177,
> added with commit 30dd4a8f08b57 ("watchdog: imx2_wdt: also set 
> wdog->timeout
> to new_timeout") back in 2015.
>
> Did you see this in an older kernel, maybe ?

Oh, I missed this. I did use the older kernel to validate it. Thanks for 
your reminder, please ignore my patch.
Thanks again!

Regards!
Yanjiang
>
> Guenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-20  3:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20  2:45 [PATCH] watchdog: imx2_wdt: use new_timeout value to override the old yanjiang.jin
2017-07-20  3:18 ` Guenter Roeck
2017-07-20  3:22   ` yjin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®