[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1408008998.4035.43.camel@paszta.hi.pengutronix.de>
Date: Thu, 14 Aug 2014 11:36:38 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Houcheng Lin <houcheng@...il.com>,
Alexandre Courbot <gnurou@...il.com>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Stephen Gallimore <stephen.gallimore@...com>,
Srinivas KANDAGATLA <srinivas.kandagatla@...com>,
Ulf Hansson <ulf.hansson@...aro.org>, sre@...nel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
Vikas Sajjan <vikas.sajjan@...sung.com>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RFC PATCH v3] reset: Add a defer reset object to send board
specific reset
Hi Maxime,
Am Montag, den 11.08.2014, 19:33 +0200 schrieb Maxime Ripard:
> > Mostly because Maxime and I seem to have a completely different opinion
> > and nobody else argued one way or the other.
>
> Yep, mostly because I don't see how a generic approach can work.
>
> The existing reset-gpios property only provide the gpio to use, but
> some informations are encoded in the driver, such as the reset
> duration, or a reset sequence if any.
The driver should provide the duration. I'd really like to see an
example where sequencing is necessary.
I agree that as soon as things get significantly more complicated than
pulsing a single GPIO, the reset-gpios binding is too limited.
Still, I'm not happy to mandate a separate gpio reset device for each
reset line if most devices are simple enough for it to work without.
What about using reset-gpios for the majority of simple cases and have a
separate gpio-reset-sequencer driver when multiple GPIO resets have to
be timed?
> How do you plan on giving that information to your generic driver?
>
> The only solution I can think of would be to add an extra property
> that your code would parse. But then, you break the existing DT
> bindings.
>
> And if we're going to break those bindings, at least do it in a way
> consistent with reset bindings.
For the backwards compatibility case, the driver already has to provide
the duration. I don't want to break the existing bindings at all.
> Plus, your approach doesn't cover the weird corner cases such as:
> - reset-gpio
> - wlf,reset-gpios
> - phy-reset-gpios
> - snps,reset-gpio
> - the drivers that need several gpio and expect the reset one as a
> positional argument.
> - etc.
Those are just an issue of the implementation I posted earlier because
gpiod_get doesn't support custom names other than %s-gpios. This could
be extended and handled just as well if deemed necessary.
regards
Philipp
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists