From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: linux-rtc@vger.kernel.org, a.zummo@towertech.it,
bth@kamstrup.com, u.kleine-koenig@pengutronix.de
Subject: Re: [PATCH 4/4] rtc: pcf2127: add watchdog feature support
Date: Wed, 24 Jul 2019 15:00:58 +0200 [thread overview]
Message-ID: <20190724130058.GQ24911@piout.net> (raw)
In-Reply-To: <CAH+2xPAjafxayxFStQOFqiEKZKMtiNaNrYWfy5YbJVdmxYXq7g@mail.gmail.com>
On 24/07/2019 09:18:05+0200, Bruno Thomsen wrote:
> Den tir. 23. jul. 2019 kl. 20.48 skrev Alexandre Belloni
> <alexandre.belloni@bootlin.com>:
> >
> > > +config RTC_DRV_PCF2127_WDT
> > > + bool "NXP PCF2127 watchdog timer"
> > > + depends on RTC_DRV_PCF2127
> > > + help
> > > + If you say Y here you will get support for the watchdog timer
> > > + in the NXP PCF2127 and PCF2129 real-time clock chips.
> > > +
> > > + The watchdog is usually used together with systemd or the
> > > + watchdog daemon. Watchdog trigger cause system reset.
> > > +
> >
> > I wouldn't add a new Kconfig entry for that. How much bigger will it be?
>
> Delta size on rtc-pcf2127.ko is 3244 bytes when compiled for armv7a.
>
> I only added Kconfig option to allow driver load on arm platforms where
> you need to use internal watchdog to restart board. But I will remove it
> for next version, should I extend help text on exiting Kconfig option to
> also include information about other chip features? As this is not a
> simple RTC chip.
You can extend the Kconfig help if you want.
>
> > > +static const struct file_operations pcf2127_wdt_fops = {
> > > + .owner = THIS_MODULE,
> > > + .write = pcf2127_wdt_write,
> > > + .unlocked_ioctl = pcf2127_wdt_ioctl,
> > > +};
> > > +
> > > +static struct miscdevice pcf2127_miscdev = {
> > > + .minor = WATCHDOG_MINOR,
> > > + .name = "watchdog",
> > > + .fops = &pcf2127_wdt_fops,
> > > +};
> >
> > Wow, that is old school, please use the watchdog subsysteů.
>
> Okay, I was not aware that this was an old API. So I should convert
> to struct watchdog_ops and devm_watchdog_register_device?
>
Yes, that is what I was asking for.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-07-24 13:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 15:58 [PATCH 0/4] rtc: pcf2127: tamper timestamp and watchdog feature support Bruno Thomsen
2019-07-22 15:58 ` [PATCH 1/4] rtc: pcf2127: convert to devm_rtc_allocate_device Bruno Thomsen
2019-07-22 15:58 ` [PATCH 2/4] rtc: pcf2127: cleanup register and bit defines Bruno Thomsen
2019-07-23 18:42 ` Alexandre Belloni
2019-07-22 15:58 ` [PATCH 3/4] rtc: pcf2127: add tamper detection support Bruno Thomsen
2019-07-22 15:58 ` [PATCH 4/4] rtc: pcf2127: add watchdog feature support Bruno Thomsen
2019-07-23 18:48 ` Alexandre Belloni
2019-07-24 7:18 ` Bruno Thomsen
2019-07-24 13:00 ` Alexandre Belloni [this message]
2019-07-23 14:13 ` [PATCH 0/4] rtc: pcf2127: tamper timestamp and " Bruno Thomsen
2019-07-23 18:40 ` Alexandre Belloni
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=20190724130058.GQ24911@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=bruno.thomsen@gmail.com \
--cc=bth@kamstrup.com \
--cc=linux-rtc@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.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;
as well as URLs for NNTP newsgroup(s).