From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: "Johnson CH Chen (陳昭勳)" <JohnsonCH.Chen@moxa.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Alessandro Zummo <a.zummo@towertech.it>
Subject: Re: [PATCH v2] rtc: rtc-ds1374: wdt: Use watchdog core for watchdog part
Date: Mon, 6 Jul 2020 08:34:38 +0200 [thread overview]
Message-ID: <20200706063438.GF6538@piout.net> (raw)
In-Reply-To: <HK2PR01MB328121F60A378124D2C83698FA690@HK2PR01MB3281.apcprd01.prod.exchangelabs.com>
On 06/07/2020 05:18:39+0000, Johnson CH Chen (陳昭勳) wrote:
> > > #endif /*CONFIG_RTC_DRV_DS1374_WDT*/
> > > /*
> > > @@ -653,15 +514,25 @@ static int ds1374_probe(struct i2c_client
> > > *client,
> > >
> > > #ifdef CONFIG_RTC_DRV_DS1374_WDT
> > > save_client = client;
> > > - ret = misc_register(&ds1374_miscdev);
> > > - if (ret)
> > > - return ret;
> > > - ret = register_reboot_notifier(&ds1374_wdt_notifier);
> > > + ds1374->wdt.info = &ds1374_wdt_info;
> > > + ds1374->wdt.ops = &ds1374_wdt_ops;
> > > + ds1374->wdt.timeout = TIMER_MARGIN_DEFAULT;
> > > + ds1374->wdt.min_timeout = TIMER_MARGIN_MIN;
> > > + ds1374->wdt.max_timeout = TIMER_MARGIN_MAX;
> > > +
> > > + watchdog_init_timeout(&ds1374->wdt, wdt_margin, &client->dev);
> > > + watchdog_set_nowayout(&ds1374->wdt, nowayout);
> > > + watchdog_stop_on_reboot(&ds1374->wdt);
> > > + watchdog_stop_on_unregister(&ds1374->wdt);
> > > + ds1374_wdt_settimeout(&ds1374->wdt, wdt_margin);
> > > +
> > > + ret = devm_watchdog_register_device(&client->dev, &ds1374->wdt);
> > > if (ret) {
> > > - misc_deregister(&ds1374_miscdev);
> > > + dev_err(&client->dev, "failed to register DS1374 watchdog
> > > +device\n");
There was no error message before, I don't think this one is necessary.
> > > return ret;
> > > }
> > > - ds1374_wdt_settimeout(131072);
> > > +
> > > + dev_info(&client->dev, "DS1374 watchdog device enabled\n");
> >
> > Is that necessary ?
> >
>
> I think it's good to show watchdog initial timeout. I'll include above suggestions in v3, thanks!
>
No, please avoid adding more strings in that driver.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-07-06 6:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 11:48 [PATCH v2] rtc: rtc-ds1374: wdt: Use watchdog core for watchdog part Johnson CH Chen (陳昭勳)
2020-07-04 18:41 ` kernel test robot
2020-07-05 15:24 ` Guenter Roeck
2020-07-06 5:18 ` Johnson CH Chen (陳昭勳)
2020-07-06 6:34 ` Alexandre Belloni [this message]
2020-07-06 6:58 ` Johnson CH Chen (陳昭勳)
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=20200706063438.GF6538@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=JohnsonCH.Chen@moxa.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@linux-watchdog.org \
/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;
as well as URLs for NNTP newsgroup(s).