From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] gpio: rewrite U300 GPIO to use gpiolib
Date: Wed, 7 Sep 2011 21:23:45 +0200 [thread overview]
Message-ID: <CAKnu2MpKw5ynpqxziOgsBqqitobBE51vCDBW-8ArOeRVcTEkVw@mail.gmail.com> (raw)
In-Reply-To: <CAGsJ_4w2fCjnA99bFixWU6CTv+TWSR16c2-+Qfe=u31LHq8dRg@mail.gmail.com>
2011/9/7 Barry Song <21cnbao@gmail.com>:
>> - ? ? ? /* Enable or disable the internal pull-ups in the GPIO ASIC block */
>> - ? ? ? for (i = 0; i < U300_GPIO_MAX; i++) {
>> - ? ? ? ? ? ? ? val = 0;
>> - ? ? ? ? ? ? ? for (j = 0; j < 8; j++)
>> - ? ? ? ? ? ? ? ? ? ? ? val |= (u32)((u300_gpio_config[i][j].pull_up == DISABLE_PULL_UP) << j);
>> - ? ? ? ? ? ? ? local_irq_save(flags);
>> - ? ? ? ? ? ? ? writel(val, virtbase + U300_GPIO_PXPER + i * U300_GPIO_PORTX_SPACING);
>> - ? ? ? ? ? ? ? local_irq_restore(flags);
>
> this has used array/table to set the pull of gpio. so what's our plan
> about api to config GPIO pull dynamically?
My plan is as follows:
1) Introduce the pin control subsystem, support pinmux in it to
begin with
2) Add support for biasing and driving (etc) through pin control
3) Move the driver over to drivers/pinctrl, have it register both
a pin control and a GPIO interface as well
Sounds OK?
Yours,
Linus Walleij
next prev parent reply other threads:[~2011-09-07 19:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 8:11 [PATCH v2] gpio: rewrite U300 GPIO to use gpiolib Linus Walleij
2011-09-07 12:55 ` Barry Song
2011-09-07 19:23 ` Linus Walleij [this message]
2011-09-07 18:02 ` Grant Likely
2011-09-08 5:02 ` Grant Likely
2011-09-08 8:01 ` 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=CAKnu2MpKw5ynpqxziOgsBqqitobBE51vCDBW-8ArOeRVcTEkVw@mail.gmail.com \
--to=linus.walleij@linaro.org \
--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.