All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7] reset: Add driver for gpio-controlled reset pins
Date: Thu, 30 May 2013 15:16:21 +0200	[thread overview]
Message-ID: <201305301516.22111.arnd@arndb.de> (raw)
In-Reply-To: <20130530103843.GB24712@amd.pavel.ucw.cz>

On Thursday 30 May 2013, Pavel Machek wrote:
> On Wed 2013-05-29 17:19:20, Stephen Warren wrote:
> > 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.
> 
> Well.. this is kernel :-). We don't have libc around... and this
> standard is normally ignored here. __ is normally used as a prefix for
> "simpler" function.

We're not really consistent in the kernel, but I agree the most common
use is where you have a wrapper calling the __foo function and normal
drivers are supposed to call foo instead. My reading is usually that
by calling __foo, the caller says "I know exactly what I'm doing so
I can optimize this".

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Pavel Machek <pavel-ynQEQJNshbs@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>,
	Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v7] reset: Add driver for gpio-controlled reset pins
Date: Thu, 30 May 2013 15:16:21 +0200	[thread overview]
Message-ID: <201305301516.22111.arnd@arndb.de> (raw)
In-Reply-To: <20130530103843.GB24712-tWAi6jLit6GreWDznjuHag@public.gmane.org>

On Thursday 30 May 2013, Pavel Machek wrote:
> On Wed 2013-05-29 17:19:20, Stephen Warren wrote:
> > 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.
> 
> Well.. this is kernel :-). We don't have libc around... and this
> standard is normally ignored here. __ is normally used as a prefix for
> "simpler" function.

We're not really consistent in the kernel, but I agree the most common
use is where you have a wrapper calling the __foo function and normal
drivers are supposed to call foo instead. My reading is usually that
by calling __foo, the caller says "I know exactly what I'm doing so
I can optimize this".

	Arnd

  reply	other threads:[~2013-05-30 13:16 UTC|newest]

Thread overview: 10+ 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-28 15:06 ` Philipp Zabel
2013-05-29 23:19 ` Stephen Warren
2013-05-29 23:19   ` Stephen Warren
2013-05-30  9:08   ` Philipp Zabel
2013-05-30  9:08     ` Philipp Zabel
2013-05-30 10:38   ` Pavel Machek
2013-05-30 10:38     ` Pavel Machek
2013-05-30 13:16     ` Arnd Bergmann [this message]
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=201305301516.22111.arnd@arndb.de \
    --to=arnd@arndb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.