From: Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>,
Fabio Estevam
<fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
"Rafael J. Wysocki" <rjw-KKrjLPT3xs0@public.gmane.org>,
Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
Subject: Re: [PATCH v8] reset: Add driver for gpio-controlled reset pins
Date: Tue, 16 Jul 2013 11:51:19 +0200 [thread overview]
Message-ID: <1373968279.4327.13.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <20130716065130.GB30067-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
Am Dienstag, den 16.07.2013, 14:51 +0800 schrieb Shawn Guo:
> 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-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > > Reviewed-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >
> > 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.
Looks good to me. I can squash it into the original patch and resend if
you like.
regards
Philipp
> Shawn
>
> ----8<---------------
>
> From 822a0c4fb7c99b371844ba7e957affcaa8cb1cfe Mon Sep 17 00:00:00 2001
> From: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Date: Sun, 14 Jul 2013 20:28:05 +0800
> Subject: [PATCH] ENGR00269945: reset: handle cansleep case in gpio-reset
>
> Some gpio reset may be backed by a gpio that can sleep, e.g. pca953x
> gpio output. For such gpio, gpio_set_value_cansleep() should be
> called. Otherwise, the WARN_ON(chip->can_sleep) in gpiod_set_value()
> will be hit. Add a gpio_cansleep() check to handle cansleep gpio.
>
> Signed-off-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> drivers/reset/gpio-reset.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/reset/gpio-reset.c b/drivers/reset/gpio-reset.c
> index 5d2515a..4f372f9 100644
> --- a/drivers/reset/gpio-reset.c
> +++ b/drivers/reset/gpio-reset.c
> @@ -32,7 +32,10 @@ static void gpio_reset_set(struct reset_controller_dev *rcdev, int asserted)
> if (drvdata->active_low)
> value = !value;
>
> - 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);
> }
>
> static int gpio_reset(struct reset_controller_dev *rcdev, unsigned long id)
next prev parent reply other threads:[~2013-07-16 9:51 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
[not found] ` <1369904940-716-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-07-16 1:50 ` Shawn Guo
[not found] ` <20130716015038.GD28375-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-07-16 3:35 ` Stephen Warren
[not found] ` <51E4BF98.8030604-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-16 4:10 ` Shawn Guo
2013-07-16 9:49 ` Philipp Zabel
[not found] ` <1373968166.4327.11.camel-/rZezPiN1rtR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2013-07-16 12:56 ` Shawn Guo
[not found] ` <20130716041056.GA30067-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-07-16 15:45 ` Stephen Warren
[not found] ` <51E56AA7.7020103-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-17 3:02 ` Shawn Guo
[not found] ` <20130717030246.GA4541-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-07-17 16:57 ` Stephen Warren
2013-07-17 21:38 ` Pavel Machek
[not found] ` <20130717213836.GA13324-tWAi6jLit6GreWDznjuHag@public.gmane.org>
2013-07-17 22:24 ` Stephen Warren
2013-07-18 11:25 ` Pavel Machek
[not found] ` <20130718112555.GB1021-tWAi6jLit6GreWDznjuHag@public.gmane.org>
2013-07-18 18:45 ` Olof Johansson
[not found] ` <CAOesGMgi0j_mPyeBLVHb_QW+DwtAPoFY697eQO3-yp9tnP1vmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-19 3:23 ` Shawn Guo
[not found] ` <20130719032328.GB20889-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
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
[not found] ` <51E6CCE4.20705-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-18 22:50 ` Grant Likely
2013-07-16 9:59 ` Philipp Zabel
[not found] ` <1373968758.4327.17.camel-/rZezPiN1rtR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2013-07-16 15:48 ` Stephen Warren
2013-07-16 6:51 ` Shawn Guo
[not found] ` <20130716065130.GB30067-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-07-16 9:51 ` Philipp Zabel [this message]
[not found] ` <1373968279.4327.13.camel-/rZezPiN1rtR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2013-07-16 12:15 ` Shawn Guo
2013-07-16 15:47 ` Stephen Warren
[not found] ` <51E56AF6.30506-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-07-17 3:43 ` Shawn Guo
2013-07-17 7:17 ` Philipp Zabel
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=1373968279.4327.13.camel@pizza.hi.pengutronix.de \
--to=p.zabel-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=marex-ynQEQJNshbs@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=pavel-+ZI9xUNit7I@public.gmane.org \
--cc=rjw-KKrjLPT3xs0@public.gmane.org \
--cc=rogerq-l0cyMroinI0@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).