mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: Chanho Park <chanho61.park@samsung.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"Baohua.Song@csr.com" <Baohua.Song@csr.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "'Kyungmin Park'" <kyungmin.park@samsung.com>
Subject: RE: [PATCH] drivers: pinctrl: add a pin_base for sparse gpio-ranges
Date: Thu, 27 Oct 2011 09:10:42 -0700	[thread overview]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF173E1B48B4@HQMAIL01.nvidia.com> (raw)
In-Reply-To: <008201cc93c3$24867880$6d936980$%park@samsung.com>

Chanho Park wrote at Wednesday, October 26, 2011 3:39 AM:
> Stephen Warren wrote at Wednesday, October 26, 2011 3:21 PM:
> > Chanho Park wrote at Tuesday, October 25, 2011 10:22 PM:
> > > This patch enables mapping a base offset of gpio ranges with
> > > a pin offset even if does'nt matched. A base of pinctrl_gpio_range
> > > means a base offset of gpio. However, we cannot convert gpio to pin
> > > number for sparse gpio ranges just only using a gpio base offset.
> > > We can convert a gpio to real pin number(even if not matched) using
> > > a new pin_base which means a base pin offset of requested gpio range.
> > ...
> > > diff --git a/include/linux/pinctrl/pinctrl.h
> > b/include/linux/pinctrl/pinctrl.h
> > > index 90dd28b..7768e44 100644
> > > --- a/include/linux/pinctrl/pinctrl.h
> > > +++ b/include/linux/pinctrl/pinctrl.h
> > > @@ -127,6 +127,7 @@ struct pinctrl_pin_desc {
> > >   * @name: a name for the chip in this range
> > >   * @id: an ID number for the chip in this range
> > >   * @base: base offset of the GPIO range
> > > + * @pin_base: base pin offset of the GPIO range
> >
> > This may be bike-shedding, but I'd tend to call this "gpio_base", since
> > it's the first "gpio" number of this range, not the first "pin" number
> > ("pins" are used in the pinctrl subsystem, but "gpios" by the GPIO
> > Subsystem)
> 
> A "base" means first "gpio" number of the range.
> And a "pin_base" means first "pin" number.
> Do you want to replace the "base" to the "gpio_base"?

Ah OK. I guess I misunderstood this slightly, since "base" was both a
pin and GPIO number before, or something like that.

Anyway, I certainly see value in s/base/gpio_base/ to make this all
explicit. Hopefully that doesn't cause the patch to grow too big and
churn the code too much.

-- 
nvpublic


  reply	other threads:[~2011-10-27 16:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26  4:22 Chanho Park
2011-10-26  6:21 ` Stephen Warren
2011-10-26  9:39   ` Chanho Park
2011-10-27 16:10     ` Stephen Warren [this message]
2011-10-28 19:57   ` Linus Walleij

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=74CDBE0F657A3D45AFBB94109FB122FF173E1B48B4@HQMAIL01.nvidia.com \
    --to=swarren@nvidia.com \
    --cc=Baohua.Song@csr.com \
    --cc=chanho61.park@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®