linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Barry Song <21cnbao@gmail.com>,
	Rohit Vaswani <rvaswani@codeaurora.org>,
	Kyungmin Park <kmpark@infradead.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	linux-kernel@vger.kernel.org, workgroup.linux@csr.com,
	Grant Likely <grant.likely@secretlab.ca>,
	Richard Woo <richard.wu@lianlab.org>,
	linux-arm-kernel@lists.infradead.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] GPIOLIB: add generic gpio_set_pull API
Date: Thu, 21 Jun 2012 09:48:59 +0200	[thread overview]
Message-ID: <CACRpkdZE45cSUTKBfJ=sqmw35MG1f_2s=Jyh350QXpATT_wFxQ@mail.gmail.com> (raw)
In-Reply-To: <20120620143140.GA7817@linux-sh.org>

On Wed, Jun 20, 2012 at 4:31 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> On Wed, Jun 20, 2012 at 10:15:01AM +0200, Linus Walleij wrote:
>> On Tue, Jun 19, 2012 at 5:25 AM, Barry Song <21cnbao@gmail.com> wrote:
>> > but i think at least the macros of GPIO_PULL_NONE, GPIO_PULL_UP and
>> > GPIO_PULL_DOWN should be standardized.
>>
>> You find an attempt at standardization in drivers/pinctrl/pinconf-generic.c
>> which is also used by the composite U300+COH901 drivers. Drivers
>> can select this support library and use the flags from
>> <linux/pinctrl/pinconf-generic.h>
>>
> What's with PIN_CONFIG_END using such an insane value?

This: PIN_CONFIG_END = 0x7FFF

It's just that I reserved 16 bits for the different stuff, and then
the bitstuffing
functions below use 16 bits for this. If it's too much we can shrink
it.

> I'm happy to consolidate on the provided definitions and add my own on top
> of that, but I'm not going to waste an insane amount of bits that I could
> be using for driver-specific data and so on instead to comply with the
> PIN_CONFIG_END comment. Is there any valid reason why this would ever
> need to exceed 4 bits?

I think we need more than 4 bits for sure, but not more than 8.

If you want to patch it down to have 8 bits for the param and 24 bits
for the argument, go ahead, it won't hurt.

Yours,
Linus Walleij

  reply	other threads:[~2012-06-21  7:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08  5:19 [PATCH] GPIOLIB: add generic gpio_set_pull API Barry Song
2011-08-08  8:15 ` Paul Mundt
2011-08-08 18:24   ` Grant Likely
2011-08-08 22:57     ` Kyungmin Park
2011-08-09  1:45       ` Rohit Vaswani
2011-08-09  2:51         ` Barry Song
2011-08-09 10:11         ` Linus Walleij
2012-06-19  3:25           ` Barry Song
2012-06-20  8:15             ` Linus Walleij
2012-06-20 10:07               ` Barry Song
2012-06-20 14:31               ` Paul Mundt
2012-06-21  7:48                 ` Linus Walleij [this message]
2011-08-09 10:07       ` Linus Walleij
2011-08-09 10:04     ` 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='CACRpkdZE45cSUTKBfJ=sqmw35MG1f_2s=Jyh350QXpATT_wFxQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=21cnbao@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kmpark@infradead.org \
    --cc=lethal@linux-sh.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.wu@lianlab.org \
    --cc=rvaswani@codeaurora.org \
    --cc=workgroup.linux@csr.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;
as well as URLs for NNTP newsgroup(s).