Linux Watchdog driver development
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: Andrew Morton <akpm@google.com>
Cc: linux-watchdog@vger.kernel.org, Wim Van Sebroeck <wim@iguana.be>,
	Alessandro Zummo <alessandro.zummo@towertech.it>,
	rtc-linux@googlegroups.com,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/4] rtc: stmp3xxx: add wdt-accessor function
Date: Fri, 30 Sep 2011 19:26:52 +0200	[thread overview]
Message-ID: <20110930172652.GA13242@pengutronix.de> (raw)
In-Reply-To: <20110928122849.42f903a2.akpm@google.com>

[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]

Hi Andrew,

> > Andrew, Wim: Alessandro was not around in the last weeks, so I'd suggest this
> > patch goes via the watchdog-tree together with the rest of this series if it
> > passes the review of the watchdog-list? All changes here are in preparation for
> > the watchdog driver and do not affect the general RTC. Is that okay?
> 
> OK by me.  Be careful about the Kconfig setup when doing
> cross-subsystem dependencies like this.  Otherwise you get sad emails
> from Randy when his build breaks.

Yes, the watchdog driver depends on the RTC.

> > +	.name = "stmp3xxx_rtc_wdt",
> > +	.id = -1,
> > +};
> > +
> > +void stmp3xxx_wdt_setup(struct device *dev, u32 timeout)
> 
> I'd suggest documenting `timeout' at least.  Why would one want to set
> it to zero and what effect does that have?  What are its units?

See below.

> The patch adds a global symbol but fails to declare that symbol in a
> header file.  This is always wrong.

I admit the aproach was quite wrong. I exported the function but wanted the
watchdog driver to be the only user (and so the parameters of the function were
quite specific to the watchdog driver). Thus, I kind of tried to hide its
interface for other users. I will try to come up with something better,
probably passing the function via the platform_device created at runtime. I
also played with sharing resources, yet that would require a top-level driver
managing the resources and two sub-level drivers (RTC and watchdog) which feels
unneccessary complex to me.

Thanks,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-09-30 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 12:29 [PATCH 0/4] watchdog: new driver for STMP3xxx/MX23/MX28 Wolfram Sang
2011-09-28 12:29 ` [PATCH 1/4] rtc: stmp3xxx: add wdt-accessor function Wolfram Sang
2011-09-28 19:28   ` Andrew Morton
2011-09-30 17:26     ` Wolfram Sang [this message]
2011-09-28 12:29 ` [PATCH 2/4] watchdog: add define to setup nowayout feature in the status-variable Wolfram Sang
2011-09-28 12:29 ` [PATCH 3/4] watchdog: add new driver for STMP3xxx and i.MX23/28 Wolfram Sang
2011-09-28 12:35 ` [PATCH 4/4] watchdog: remove old STMP driver Wolfram Sang

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=20110930172652.GA13242@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=akpm@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=alessandro.zummo@towertech.it \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=wim@iguana.be \
    /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