From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8] reset: Add driver for gpio-controlled reset pins
Date: Wed, 17 Jul 2013 09:17:04 +0200 [thread overview]
Message-ID: <1374045424.4350.5.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <51E56AF6.30506@wwwdotorg.org>
Am Dienstag, den 16.07.2013, 09:47 -0600 schrieb Stephen Warren:
> On 07/16/2013 12:51 AM, Shawn Guo wrote:
> > On Tue, Jul 16, 2013 at 09:50:42AM +0800, Shawn Guo wrote:
> >> Hi Philipp,
> >>
> >> On Thu, May 30, 2013 at 11:09:00AM +0200, Philipp Zabel wrote:
> >>> This driver implements a reset controller device that toggle a gpio
> >>> connected to a reset pin of a peripheral IC. The delay between assertion
> >>> and de-assertion of the reset signal can be configured via device tree.
> >>>
> >>> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> >>> Reviewed-by: Stephen Warren <swarren@nvidia.com>
> >>
> >> I see this patch is very useful, as GPIOs are widely used to reset
> >> components/devices on board. But I do not find the patch in v3.11-rc1.
> >> What's your plan about it?
> >>
> >> Also, I'm wondering if we should register the driver a little bit
> >> early. Please see the following patch. If it makes sense to you,
> >> I can send the patch to you, or you can just quash it into yours.
> >
> > And here is another change request.
>
> > diff --git a/drivers/reset/gpio-reset.c b/drivers/reset/gpio-reset.c
>
> > - gpio_set_value(drvdata->gpio, value);
> > + if (gpio_cansleep(drvdata->gpio))
> > + gpio_set_value_cansleep(drvdata->gpio, value);
> > + else
> > + gpio_set_value(drvdata->gpio, value);
>
> That's not right. Calling gpio_set_value() v.s.
> gpio_set_value_cansleep() should be based on the properties of the
> calling context, not the GPIO being controlled. In other words, if it's
> permissible to call gpio_set_value_cansleep() at this point in the code,
> simply always call that, and remove the conditional logic.
In which case I'd say let's just call the _cansleep variant here
unconditionally and declare that reset_control_assert/deassert() may
sleep, just as reset_control_reset() has to anyway.
regards
Philipp
prev parent reply other threads:[~2013-07-17 7:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 9:09 [PATCH v8] reset: Add driver for gpio-controlled reset pins Philipp Zabel
2013-05-30 10:37 ` Pavel Machek
2013-07-16 1:50 ` Shawn Guo
2013-07-16 3:35 ` Stephen Warren
2013-07-16 4:10 ` Shawn Guo
2013-07-16 9:49 ` Philipp Zabel
2013-07-16 12:56 ` Shawn Guo
2013-07-16 15:45 ` Stephen Warren
2013-07-17 3:02 ` Shawn Guo
2013-07-17 16:57 ` Stephen Warren
2013-07-17 21:38 ` Pavel Machek
2013-07-17 22:24 ` Stephen Warren
2013-07-18 11:25 ` Pavel Machek
2013-07-18 18:45 ` Olof Johansson
2013-07-19 3:23 ` Shawn Guo
2013-07-19 15:45 ` Stephen Warren
2013-07-22 7:47 ` Shawn Guo
2013-07-26 10:26 ` Philipp Zabel
2013-07-18 22:55 ` Grant Likely
2013-07-18 22:50 ` Grant Likely
2013-07-16 9:59 ` Philipp Zabel
2013-07-16 15:48 ` Stephen Warren
2013-07-16 6:51 ` Shawn Guo
2013-07-16 9:51 ` Philipp Zabel
2013-07-16 12:15 ` Shawn Guo
2013-07-16 15:47 ` Stephen Warren
2013-07-17 3:43 ` Shawn Guo
2013-07-17 7:17 ` Philipp Zabel [this message]
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=1374045424.4350.5.camel@pizza.hi.pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).