devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	linux-watchdog@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Wim Van Sebroeck <wim@iguana.be>,
	Andrew Victor <linux@maxim.org.za>,
	linux-arm-kernel@lists.infradead.org,
	Jason Cooper <jason@lakedaemon.net>
Subject: Re: [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support
Date: Wed, 3 Oct 2012 19:47:12 +0200	[thread overview]
Message-ID: <20121003174712.GE5117@game.jcrosoft.org> (raw)
In-Reply-To: <CAHkwnC_uS1Q_oxr61w8k-7MJWyNfHx=maF_jMZ97tyGxPOn1kg@mail.gmail.com>

On 18:32 Wed 03 Oct     , Fabio Porcedda wrote:
> On Tue, Oct 2, 2012 at 9:00 PM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > On 17:04 Tue 02 Oct     , Fabio Porcedda wrote:
> >> On Mon, Oct 1, 2012 at 3:06 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> >> > On Mon, Oct 01, 2012 at 02:54:55PM +0200, Fabio Porcedda wrote:
> >> >> On Mon, Oct 1, 2012 at 2:48 PM, Fabio Porcedda <fabio.porcedda@gmail.com> wrote:
> >> >> > On Mon, Oct 1, 2012 at 2:45 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> >> >> >> On Mon, Oct 01, 2012 at 02:24:39PM +0200, Fabio Porcedda wrote:
> >> >> >>> Tested on an at91sam9260 board (evk-pro3)
> >> >> >>>
> >> >> >>> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
> >> >> >>> ---
> >> >> >>>  .../devicetree/bindings/watchdog/atmel-wdt.txt      | 19 +++++++++++++++++++
> >> >> >>>  drivers/watchdog/at91sam9_wdt.c                     | 21 +++++++++++++++++++++
> >> >> >>>  2 files changed, 40 insertions(+)
> >> >> >>> ...
> >> >> >>
> >> >> >> In patch #1 you add a function to do this, and then you don't make use
> >> >> >> of it here ?
> >> >> >>
> >> >> >> Or am i missing something?
> >> >> >
> >> >> > I'm using it on the patch #2 for the orion_wdt driver.
> >> >> > Do you think it's better to join the #1 and the #2 patch?
> >> >> >
> >> >> > Best regards
> >> >> > --
> >> >> > Fabio Porcedda
> >> >>
> >> >> I'm sorry, only now i understand your question.
> >> >> The at91sam9_wdt driver don't use the watchdog core framework si i
> >> >> can't use that function cleanly.
> >> >
> >> >> The patch #1 and #2 are for introducing the same property as the
> >> >> at91sam9_wdt driver.
> >> >
> >> > So maybe split this up into two different patchsets. One patchset to
> >> > add the helper function, and the use of this helper to all watchdog
> >> > divers that can use it. I think the following drivers should be
> >> > modified:
> >> >
> >> > orion_wdt.c
> >> > pnx4008_wdt.c
> >> > s3c2410_wdt.c
> >> >
> >> > In a second patchset, convert the AT91SAM9 driver over to the watchdog
> >> > core framework, and then use the helper function.
> >>
> >> I was thinking to add a more generic helper function like this:
> >>
> >> static inline void watchdog_get_dttimeout(struct device_node *node,
> >> u32 *timeout)
> >> {
> >>       if (node)
> >>               of_property_read_u32(node, "timeout", &wdd->timeout);
> >> }
> >>
> >> This way i can use this helper function in the at91sam9_wdt driver too.
> >> What do you think?
> > timeout_sec and this can be move at of.h level
> >
> > as this is not watchdog framework secific
> 
> I can not find any property with the "_sec" suffix, you think it's
> still fine to use that suffix?
> 
> You are speaking about a of_watchdog.h header with a
> of_watchdog_get_timeout function?
no a global helper not watchdog specific for timeout binding

that why I said of.h not of_watchdog.h

Best Regards,
J.

  reply	other threads:[~2012-10-03 17:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 12:24 [PATCH v6 0/5] watchdog: orion_wdt & at91sam9_wdt: improve dt support Fabio Porcedda
     [not found] ` <1349094281-28889-1-git-send-email-fabio.porcedda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-01 12:24   ` [PATCH v6 1/5] watchdog: core: dt: add support for the timeout device tree property Fabio Porcedda
2012-10-01 12:24   ` [PATCH v6 2/5] watchdog: orion_wdt: dt: add the timeout property binding Fabio Porcedda
2012-10-01 12:24   ` [PATCH v6 3/5] watchdog: at91sam9_wdt: add device tree support Fabio Porcedda
2012-10-01 12:45     ` Andrew Lunn
     [not found]       ` <20121001124546.GE11837-g2DYL2Zd6BY@public.gmane.org>
2012-10-01 12:48         ` Fabio Porcedda
     [not found]           ` <CAHkwnC_u+bMX7REU5G3u=cm3VGmOUn+AShruw+ERkPJWtZpxUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-01 12:54             ` Fabio Porcedda
     [not found]               ` <CAHkwnC_5wRgf-DGnUfzkrreT_E1v8i=G8U0qo_5t1DY6+L7c+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-01 13:06                 ` Andrew Lunn
     [not found]                   ` <20121001130658.GG11837-g2DYL2Zd6BY@public.gmane.org>
2012-10-02 15:04                     ` Fabio Porcedda
2012-10-02 19:00                       ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]                         ` <20121002190020.GD5117-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
2012-10-03 16:32                           ` Fabio Porcedda
2012-10-03 17:47                             ` Jean-Christophe PLAGNIOL-VILLARD [this message]
     [not found]                       ` <CAHkwnC83DcKXZOtLse_xnYe7zOZ5qwGJVimLkBzDwSJ7Y5vL_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-02 19:59                         ` Andrew Lunn
     [not found]                           ` <20121002195914.GG21046-g2DYL2Zd6BY@public.gmane.org>
2012-10-03 16:32                             ` Fabio Porcedda
2012-10-01 12:56             ` Andrew Lunn
2012-10-01 12:24   ` [PATCH v6 4/5] ARM: at91/dts: add at91sam9_wdt driver to at91sam926x, at91sam9g45 Fabio Porcedda
2012-10-01 12:24   ` [PATCH v6 5/5] ARM: at91/dts: evk-pro3: enable watchdog Fabio Porcedda

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=20121003174712.GE5117@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=andrew@lunn.ch \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=fabio.porcedda@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@maxim.org.za \
    --cc=nicolas.ferre@atmel.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;
as well as URLs for NNTP newsgroup(s).