From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7] reset: Add driver for gpio-controlled reset pins
Date: Thu, 30 May 2013 11:08:48 +0200 [thread overview]
Message-ID: <1369904928.24693.6.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <51A68CF8.7000303@wwwdotorg.org>
Hi Stephen,
Am Mittwoch, den 29.05.2013, 17:19 -0600 schrieb Stephen Warren:
> On 05/28/2013 09:06 AM, 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.
>
> > diff --git a/drivers/reset/gpio-reset.c b/drivers/reset/gpio-reset.c
>
> > +static void __gpio_reset_set(struct reset_controller_dev *rcdev, int asserted)
>
> Nit: Technically I think __ is a reserved name-space, so you shouldn't
> prefix "user-level" (rather than libc/similar) symbols with it, but it's
> not a big deal.
I'll s/__//.
> > +static int gpio_reset_probe(struct platform_device *pdev)
>
> > + if (of_gpio_named_count(np, "reset-gpios") != 1)
> > + return -EINVAL;
>
> Should that error-path (and the path for of_property_read_u32() failure)
> include a dev_err() like some already do, so it's obvious what the
> failure is?
For reset-gpios, yes. reset-delay-us is marked as optional in the
bindings.
> > + reset_controller_register(&drvdata->rcdev);
> > +
> > + platform_set_drvdata(pdev, drvdata);
>
> It might be better to set the drvdata right after it's been allocated.
> It perhaps doesn't matter much here, but if the reset controller core
> ever starts calling into the registered device inside the call to
> reset_controller_register(), then there might be a problem.
Alright. I'll move ist above the reset_controller_register() call.
> Aside from those minor issues,
> Reviewed-by: Stephen Warren <swarren@nvidia.com>
thanks
Philipp
next prev parent reply other threads:[~2013-05-30 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-28 15:06 [PATCH v7] reset: Add driver for gpio-controlled reset pins Philipp Zabel
2013-05-29 23:19 ` Stephen Warren
2013-05-30 9:08 ` Philipp Zabel [this message]
2013-05-30 10:38 ` Pavel Machek
2013-05-30 13:16 ` Arnd Bergmann
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=1369904928.24693.6.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).