From: Chanho Park <chanho61.park@samsung.com>
To: "'Linus Walleij'" <linus.walleij@linaro.org>
Cc: swarren@nvidia.com, Baohua.Song@csr.com, linux-kernel@vger.kernel.org
Subject: RE: [PATCH 0/2] add support for partial pin space
Date: Tue, 03 Jan 2012 17:27:13 +0900 [thread overview]
Message-ID: <007f01ccc9f1$7ebc4230$7c34c690$%park@samsung.com> (raw)
In-Reply-To: <CACRpkdaS7843scS5jwVajMzrUy3c7bSUHMW7n+=fkk6XTEKfDA@mail.gmail.com>
Hello Linus W.,
Original code always enumerate from 0 to maxpin because you wrote
as an offset equals to a pin number. It's inefficient because we always
define and enumerate whole pins in the system even though we do not use
the pin.
The pin space was already stored as array in the pin controller descriptor.
And we also have a number of pins.
Please see below example,
static const struct pinctrl_pin_desc pads[] = {
PINCTRL_PIN(100, "PIN100"),
PINCTRL_PIN(9999, "PIN9999"),
};
In this extreme system, the system has two pins.
We do not support non-zero based pin starting number.
And we always do silly loop until 0 to 9999. :)
This patch enables to enumerate the pin space by using the offset of array.
Thus, we don't need maxpin to enumerate the pin space because it is
sufficient
to use npins.
Best Regards,
Chanho Park
> -----Original Message-----
> From: Linus Walleij [mailto:linus.walleij@linaro.org]
> Sent: Tuesday, January 03, 2012 4:57 PM
> To: Chanho Park
> Cc: swarren@nvidia.com; Baohua.Song@csr.com; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH 0/2] add support for partial pin space
>
> On Tue, Jan 3, 2012 at 8:47 AM, Chanho Park <chanho61.park@samsung.com>
> wrote:
>
> > A pin space of current pinctrl driver always start with zero-based
> pin
> > number. And pins are enumerated from 0 to a max pin number. If there
> are
> > two pins (one is 0, another is 1000), we always enumerate from 0 to
> 1000
> > for just only two pins. This patch enables to start non-zero based
> pin
> > number and to enumerate actually owned pins.
> >
> > For example, there is a system which has huge(500 or 1000) pins. If
> muxing
> > or controlling pins are small, we just define such small pins instead
> of
> > whole pins.
>
> Seems like you're fixing my code to do what was originally intended :-)
>
> The maxpin member was something I introduced for sparse ranges
> which would auto-register "dummy pins" for those not included in the
> enumeration.
>
> That doesn't quite work, so was left behind.
>
> I'll try applying the patches and see what happens.
>
> Yours,
> Linus Walleij
prev parent reply other threads:[~2012-01-03 8:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 7:47 Chanho Park
2012-01-03 7:47 ` [PATCH 1/2] pinctrl: correct a offset while enumerating pins Chanho Park
2012-01-03 7:58 ` Linus Walleij
2012-01-03 8:37 ` Chanho Park
2012-01-04 9:37 ` Linus Walleij
2012-01-03 7:47 ` [PATCH 2/2] pinctrl: remove unnecessary max pin number Chanho Park
2012-01-03 7:57 ` [PATCH 0/2] add support for partial pin space Linus Walleij
2012-01-03 8:27 ` Chanho Park [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='007f01ccc9f1$7ebc4230$7c34c690$%park@samsung.com' \
--to=chanho61.park@samsung.com \
--cc=Baohua.Song@csr.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=swarren@nvidia.com \
/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®