mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Oleksij Rempel <linux@rempel-privat.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 1/3] watchdog: remove wrong uses of timeout_cur
Date: Mon, 28 Oct 2019 18:29:06 +0100	[thread overview]
Message-ID: <2368de75-64d9-a2a5-1ab7-c13eadde2604@pengutronix.de> (raw)
In-Reply-To: <c76b10ed-ebe1-3e94-e7d0-9cffbabd0469@rempel-privat.de>

Hello Oleksij,

On 10/24/19 6:30 PM, Oleksij Rempel wrote:
> Hi,
> 
> How about using this variable to start watchdog(s) on kernel boot?

I originally thought that that is what the parameter is doing.
I think it'd be a good idea to add these semantic. Then it can
be made a generic parameter again.

Cheers

> 
> 
> Am 24.10.19 um 17:24 schrieb Ahmad Fatoum:
>> The barebox watchdog poller uses the struct watchdog.timeout_cur as
>> the timeout value to configure the watchdog with.
>>
>> There's no need for the device driver to set this. I didn't know that
>> when I wrote the drivers, but I do now, hence this commit.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---
>>  drivers/watchdog/stm32_iwdg.c  | 1 -
>>  drivers/watchdog/stpmic1_wdt.c | 1 -
>>  2 files changed, 2 deletions(-)
>>
>> diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
>> index 20536cb4ab2d..4d252e558c32 100644
>> --- a/drivers/watchdog/stm32_iwdg.c
>> +++ b/drivers/watchdog/stm32_iwdg.c
>> @@ -256,7 +256,6 @@ static int stm32_iwdg_probe(struct device_d *dev)
>>  	wdd->set_timeout = stm32_iwdg_set_timeout;
>>  	wdd->timeout_max = (RLR_MAX + 1) * data->max_prescaler * 1000;
>>  	wdd->timeout_max /= wd->rate * 1000;
>> -	wdd->timeout_cur = wdd->timeout_max;
>>
>>  	ret = watchdog_register(wdd);
>>  	if (ret) {
>> diff --git a/drivers/watchdog/stpmic1_wdt.c b/drivers/watchdog/stpmic1_wdt.c
>> index eb8c43f716a8..f79b7e8c2768 100644
>> --- a/drivers/watchdog/stpmic1_wdt.c
>> +++ b/drivers/watchdog/stpmic1_wdt.c
>> @@ -175,7 +175,6 @@ static int stpmic1_wdt_probe(struct device_d *dev)
>>  	wdd->hwdev = dev;
>>  	wdd->set_timeout = stpmic1_wdt_set_timeout;
>>  	wdd->timeout_max = PMIC_WDT_MAX_TIMEOUT;
>> -	wdd->timeout_cur = PMIC_WDT_DEFAULT_TIMEOUT;
>>
>>  	/* have the watchdog reset, not power-off the system */
>>  	regmap_write_bits(wdt->regmap, MAIN_CR, RREQ_EN, RREQ_EN);
>>
> 
> 
> --
> Regards,
> Oleksij
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-10-28 17:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 15:24 Ahmad Fatoum
2019-10-24 15:24 ` [PATCH 2/3] watchdog: rename timeout_curr to poller_timeout_curr internally Ahmad Fatoum
2019-10-24 15:24 ` [PATCH 3/3] watchdog: add timeout_cur parameter only when poller is enabled Ahmad Fatoum
2019-10-24 16:30 ` [PATCH 1/3] watchdog: remove wrong uses of timeout_cur Oleksij Rempel
2019-10-28 17:29   ` Ahmad Fatoum [this message]
2019-10-28 11:41 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2368de75-64d9-a2a5-1ab7-c13eadde2604@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=linux@rempel-privat.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox