Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570081
| From | Hartley Sweeten <HartleyS@visionengravers.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 2/2] watchdog: ts72xx_wdt: convert driver to watchdog core |
| Date | 2017-01-30 21:00 +0100 |
| Message-ID | <t5qhk-857-29@gated-at.bofh.it> (permalink) |
| References | <t5oIx-7eY-7@gated-at.bofh.it> <t5oIx-7eY-5@gated-at.bofh.it> <t5pOi-7RS-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Monday, January 30, 2017 12:02 PM, Guenter Roeck wrote:
> On Mon, Jan 30, 2017 at 09:55:48AM -0700, H Hartley Sweeten wrote:
>> Cleanup this driver and convert it to use the watchdog framework API.
>>
>> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
>> Cc: Mika Westerberg <mika.westerberg@iki.fi>
>> Cc: Wim Van Sebroeck <wim@iguana.be>
>> Cc: Guenter Roeck <linux@roeck-us.net>
>> ---
>> drivers/watchdog/ts72xx_wdt.c | 447 +++++++++---------------------------------
>> 1 file changed, 93 insertions(+), 354 deletions(-)
<snip>
>> -#define TS72XX_WDT_DEFAULT_TIMEOUT 8
>> -
>> -static int timeout = TS72XX_WDT_DEFAULT_TIMEOUT;
>> -module_param(timeout, int, 0);
>> -MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. "
>> - "(1 <= timeout <= 8, default="
>> - __MODULE_STRING(TS72XX_WDT_DEFAULT_TIMEOUT)
>> - ")");
>
> Same question as with patch #1 - are you sure you want to take this away ?
Again, not a problem leaving it in.
> You might just drop the limits instead (also see below).
<snip>
>> + wdd->min_timeout = 1;
>> + wdd->max_timeout = 8;
>
> With such a low maximum timeout, it might make sense to use the core
> to be able to support larger timeouts.
Agree. I'll update and test this for the next version.
>> + wdd->timeout = 8;
>> + wdd->parent = &pdev->dev;
>>
>> - /* make sure that the watchdog is disabled */
>> - ts72xx_wdt_stop(wdt);
>
> Are you sure this is no longer needed ? If there is a means to detect if the
> watchdog is running, it might make sense to set the WDOG_HW_RUNNING flag instead
> if it is running and let the core handle the ping until the watchdog device
> is opened.
A patch to make sure this watchdog is disabled early during the kernel uncompress
will soon be applied. Arnd Bergmann has it in his todo folder:
[PATCH] ARM: ep93xx: Disable TS-72xx watchdog before uncompressing
The bootloader currently enables the watchdog for 8 seconds and it needs to be
disabled just in case the uncompress takes longer.
I don't have a problem leaving it in here it's just not necessary.
>> + watchdog_set_nowayout(wdd, nowayout);
>>
>> - error = misc_register(&ts72xx_wdt_miscdev);
>> - if (error) {
>> - dev_err(&pdev->dev, "failed to register miscdev\n");
>> - return error;
>> - }
>> + watchdog_set_drvdata(wdd, priv);
>> +
>> + ret = watchdog_register_device(wdd);
>
> devm_watchdog_register_device() ?
I'll update this.
Thanks,
Hartley
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] watchdog: ts72xx_wdt: convert driver to watchdog core H Hartley Sweeten <hsweeten@visionengravers.com> - 2017-01-30 19:20 +0100
Re: [PATCH 2/2] watchdog: ts72xx_wdt: convert driver to watchdog core Guenter Roeck <linux@roeck-us.net> - 2017-01-30 20:30 +0100
RE: [PATCH 2/2] watchdog: ts72xx_wdt: convert driver to watchdog core Hartley Sweeten <HartleyS@visionengravers.com> - 2017-01-30 21:00 +0100
csiph-web