* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset [not found] <1403098673-3058-1-git-send-email-houcheng@gmail.com> @ 2014-07-08 7:52 ` Linus Walleij 2014-07-08 8:05 ` Maxime Ripard 0 siblings, 1 reply; 7+ messages in thread From: Linus Walleij @ 2014-07-08 7:52 UTC (permalink / raw) To: linux-arm-kernel On Wed, Jun 18, 2014 at 3:37 PM, Houcheng Lin <houcheng@gmail.com> wrote: > The Problem > ----------- > The reset signal on a hardware board is send either: > - during machine initialization > - during bus master's initialization I just thought about this a bit, since there isn't already a generic GPIO reset driver, just call this drivers/reset/reset-gpio.c and make the ability to deferral just a configuration detail of the GPIO reset driver. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset 2014-07-08 7:52 ` [RFC PATCH v3] reset: Add a defer reset object to send board specific reset Linus Walleij @ 2014-07-08 8:05 ` Maxime Ripard 2014-07-08 9:38 ` Linus Walleij 0 siblings, 1 reply; 7+ messages in thread From: Maxime Ripard @ 2014-07-08 8:05 UTC (permalink / raw) To: linux-arm-kernel On Tue, Jul 08, 2014 at 09:52:03AM +0200, Linus Walleij wrote: > On Wed, Jun 18, 2014 at 3:37 PM, Houcheng Lin <houcheng@gmail.com> wrote: > > > The Problem > > ----------- > > The reset signal on a hardware board is send either: > > - during machine initialization > > - during bus master's initialization > > I just thought about this a bit, since there isn't already a generic GPIO > reset driver, just call this drivers/reset/reset-gpio.c and make the > ability to deferral just a configuration detail of the GPIO reset driver. Philipp has been working on one for quite some time. See http://www.spinics.net/lists/arm-kernel/msg321927.html However, it seems to progress slowly, and we don't seem to be able to reach a consensus here. If you ask me, having to set a few extra properties like this just advocates for a regular reset driver and DT node for the reset GPIO, but I'm pretty sure Philipp will feel otherwise :) Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140708/0509ca19/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset 2014-07-08 8:05 ` Maxime Ripard @ 2014-07-08 9:38 ` Linus Walleij 2014-08-08 14:23 ` Philipp Zabel 0 siblings, 1 reply; 7+ messages in thread From: Linus Walleij @ 2014-07-08 9:38 UTC (permalink / raw) To: linux-arm-kernel On Tue, Jul 8, 2014 at 10:05 AM, Maxime Ripard <maxime.ripard@free-electrons.com> wrote: > On Tue, Jul 08, 2014 at 09:52:03AM +0200, Linus Walleij wrote: >> On Wed, Jun 18, 2014 at 3:37 PM, Houcheng Lin <houcheng@gmail.com> wrote: >> >> > The Problem >> > ----------- >> > The reset signal on a hardware board is send either: >> > - during machine initialization >> > - during bus master's initialization >> >> I just thought about this a bit, since there isn't already a generic GPIO >> reset driver, just call this drivers/reset/reset-gpio.c and make the >> ability to deferral just a configuration detail of the GPIO reset driver. > > Philipp has been working on one for quite some time. See > http://www.spinics.net/lists/arm-kernel/msg321927.html > > However, it seems to progress slowly, and we don't seem to be able to > reach a consensus here. > > If you ask me, having to set a few extra properties like this just > advocates for a regular reset driver and DT node for the reset GPIO, > but I'm pretty sure Philipp will feel otherwise :) Hm haha yeah let's fight it out :-) This is not my subsystem so I'm getting some popcorn. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset 2014-07-08 9:38 ` Linus Walleij @ 2014-08-08 14:23 ` Philipp Zabel 2014-08-11 17:33 ` Maxime Ripard 0 siblings, 1 reply; 7+ messages in thread From: Philipp Zabel @ 2014-08-08 14:23 UTC (permalink / raw) To: linux-arm-kernel Am Dienstag, den 08.07.2014, 11:38 +0200 schrieb Linus Walleij: > On Tue, Jul 8, 2014 at 10:05 AM, Maxime Ripard > <maxime.ripard@free-electrons.com> wrote: > > On Tue, Jul 08, 2014 at 09:52:03AM +0200, Linus Walleij wrote: > >> On Wed, Jun 18, 2014 at 3:37 PM, Houcheng Lin <houcheng@gmail.com> wrote: > >> > >> > The Problem > >> > ----------- > >> > The reset signal on a hardware board is send either: > >> > - during machine initialization > >> > - during bus master's initialization > >> > >> I just thought about this a bit, since there isn't already a generic GPIO > >> reset driver, just call this drivers/reset/reset-gpio.c and make the > >> ability to deferral just a configuration detail of the GPIO reset driver. > > > > Philipp has been working on one for quite some time. See > > http://www.spinics.net/lists/arm-kernel/msg321927.html > > > > However, it seems to progress slowly, and we don't seem to be able to > > reach a consensus here. Mostly because Maxime and I seem to have a completely different opinion and nobody else argued one way or the other. > > If you ask me, having to set a few extra properties like this just > > advocates for a regular reset driver and DT node for the reset GPIO, > > but I'm pretty sure Philipp will feel otherwise :) > > Hm haha yeah let's fight it out :-) > > This is not my subsystem so I'm getting some popcorn. Sorry about missing this earlier, I hope the popcorn is not stale. I think a reset that needs to be released before a fixed device appears on the bus, should be handled by the bus driver. The reset framework could be made to help with that, but I don't think a separate entity that scans the whole device tree itself is the right solution. regards Philipp ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset 2014-08-08 14:23 ` Philipp Zabel @ 2014-08-11 17:33 ` Maxime Ripard 2014-08-14 9:36 ` Philipp Zabel 0 siblings, 1 reply; 7+ messages in thread From: Maxime Ripard @ 2014-08-11 17:33 UTC (permalink / raw) To: linux-arm-kernel On Fri, Aug 08, 2014 at 04:23:09PM +0200, Philipp Zabel wrote: > Am Dienstag, den 08.07.2014, 11:38 +0200 schrieb Linus Walleij: > > On Tue, Jul 8, 2014 at 10:05 AM, Maxime Ripard > > <maxime.ripard@free-electrons.com> wrote: > > > On Tue, Jul 08, 2014 at 09:52:03AM +0200, Linus Walleij wrote: > > >> On Wed, Jun 18, 2014 at 3:37 PM, Houcheng Lin <houcheng@gmail.com> wrote: > > >> > > >> > The Problem > > >> > ----------- > > >> > The reset signal on a hardware board is send either: > > >> > - during machine initialization > > >> > - during bus master's initialization > > >> > > >> I just thought about this a bit, since there isn't already a generic GPIO > > >> reset driver, just call this drivers/reset/reset-gpio.c and make the > > >> ability to deferral just a configuration detail of the GPIO reset driver. > > > > > > Philipp has been working on one for quite some time. See > > > http://www.spinics.net/lists/arm-kernel/msg321927.html > > > > > > However, it seems to progress slowly, and we don't seem to be able to > > > reach a consensus here. > > 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. 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. 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. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140811/8b38b659/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset 2014-08-11 17:33 ` Maxime Ripard @ 2014-08-14 9:36 ` Philipp Zabel 2014-08-14 10:47 ` Maxime Ripard 0 siblings, 1 reply; 7+ messages in thread From: Philipp Zabel @ 2014-08-14 9:36 UTC (permalink / raw) To: linux-arm-kernel 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC PATCH v3] reset: Add a defer reset object to send board specific reset 2014-08-14 9:36 ` Philipp Zabel @ 2014-08-14 10:47 ` Maxime Ripard 0 siblings, 0 replies; 7+ messages in thread From: Maxime Ripard @ 2014-08-14 10:47 UTC (permalink / raw) To: linux-arm-kernel On Thu, Aug 14, 2014 at 11:36:38AM +0200, Philipp Zabel wrote: > 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. How? This used to be in the code, and reset_control_reset doesn't take such argument. > I'd really like to see an example where sequencing is necessary. Well, if you have several reset lines, the sequencing between each might be important. > I agree that as soon as things get significantly more complicated than > pulsing a single GPIO, the reset-gpios binding is too limited. While the generic reset bindings are perfect for that. > 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. Well, it's pretty much already the case for other subsystems, such as regulator. I guess we can treat this as a legacy option, but allow the reset-gpio code to be a full driver of its own, if we need more advanced use cases? > 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? I don't know. I feel like it should be in the driver itself, rather than in a generic layer. Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140814/36248234/attachment.sig> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-08-14 10:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1403098673-3058-1-git-send-email-houcheng@gmail.com>
2014-07-08 7:52 ` [RFC PATCH v3] reset: Add a defer reset object to send board specific reset Linus Walleij
2014-07-08 8:05 ` Maxime Ripard
2014-07-08 9:38 ` Linus Walleij
2014-08-08 14:23 ` Philipp Zabel
2014-08-11 17:33 ` Maxime Ripard
2014-08-14 9:36 ` Philipp Zabel
2014-08-14 10:47 ` Maxime Ripard
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).