From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v7 14/15] pinctrl: single: support generic pinconf
Date: Tue, 22 Jan 2013 10:55:44 -0800 [thread overview]
Message-ID: <20130122185543.GP22517@atomide.com> (raw)
In-Reply-To: <CAD6h2NTgw4xvaDJfZrw4U3Q=37W5EgqcXaYKTHbzKb-HqbQvgA@mail.gmail.com>
* Haojian Zhuang <haojian.zhuang@linaro.org> [130121 22:01]:
> On 22 January 2013 01:14, Tony Lindgren <tony@atomide.com> wrote:
> > Hi,
> >
> > * Haojian Zhuang <haojian.zhuang@linaro.org> [130117 23:35]:
> >> +static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np,
> >> + struct pcs_function *func,
> >> + struct pinctrl_map **map)
> >> +
> >> +{
> >> + struct pinctrl_map *m = *map;
> >> + int i = 0, nconfs = 0;
> >> + unsigned long *settings = NULL, *s = NULL;
> >> + struct pcs_conf_vals *conf = NULL;
> >> + struct pcs_conf_type prop2[] = {
> >> + { "pinctrl-single,power-source", PIN_CONFIG_POWER_SOURCE, },
> >> + { "pinctrl-single,slew-rate", PIN_CONFIG_SLEW_RATE, },
> >> + { "pinctrl-single,input-schmitt", PIN_CONFIG_INPUT_SCHMITT, },
> >> + };
> >
> > The PIN_CONFIG_POWER_SOURCE should be split to PIN_CONFIG_POWER_ENABLE
> > and PIN_CONFIG_POWER_SOURCE. If you only have one bit for it, I guess then
> > you can just use PIN_CONFIG_POWER_ENABLE and make PIN_CONFIG_POWER_SOURCE
> > a NOP.
> >
>
> In Hisilicon Hi3620 SoC, 4bits are used for power source. b0000 is
> 2mA, b0001 is 4mA, .... b1111 is 8mA.
> There's no power enable bit. In Marvell silicon, it's also same.
Yeah I figured from your earlier mails. Anyways, from client driver point of
view, PIN_CONFIG_POWER_ENABLE should be just a NOP in your case?
This way the same client device driver can work on other platforms that might
also use ENABLE. It's probably unsafe to attempt to handle any ENABLE bits
automatically as the sequence to change POWER_SOURCE and then ENABLE might be
hardware specific.
Then regarding the various values: We probably need a new pinconf generic
function to set the POWER_SOURCE as it need to be passed a value too?
Regards,
Tony
next prev parent reply other threads:[~2013-01-22 18:55 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 7:31 [PATCH v7 0/15] support pinconf in pinctrl single driver Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 01/15] Revert "pinctrl: single: support gpio request and free" Haojian Zhuang
2013-01-21 16:56 ` Tony Lindgren
2013-01-22 12:49 ` Linus Walleij
2013-01-18 7:31 ` [PATCH v7 02/15] pinctrl: core: get devname from pinctrl_dev Haojian Zhuang
2013-01-21 14:15 ` Linus Walleij
2013-01-18 7:31 ` [PATCH v7 03/15] gpio: use pinctrl device name for add range Haojian Zhuang
2013-01-21 14:20 ` Linus Walleij
2013-01-21 15:24 ` Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 04/15] gpio: set gpio range cells property as 3 Haojian Zhuang
2013-01-21 14:23 ` Linus Walleij
2013-01-18 7:31 ` [PATCH v7 05/15] gpio: fix wrong checking condition for gpio range Haojian Zhuang
2013-01-18 12:18 ` Sergei Shtylyov
2013-01-18 15:02 ` Haojian Zhuang
2013-01-18 12:21 ` Sergei Shtylyov
2013-01-18 7:31 ` [PATCH v7 06/15] gpio: find gpio base by ascend order Haojian Zhuang
2013-01-21 14:24 ` Linus Walleij
2013-02-09 13:45 ` Grant Likely
2013-02-09 17:15 ` Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 07/15] gpio: pl061: allocate irq dynamically Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 08/15] gpio: pl061: bind pinctrl by gpio request Haojian Zhuang
2013-01-21 14:37 ` Linus Walleij
2013-01-21 15:45 ` Haojian Zhuang
2013-01-22 9:10 ` Linus Walleij
2013-01-22 9:55 ` Haojian Zhuang
2013-01-22 10:10 ` Linus Walleij
2013-01-18 7:31 ` [PATCH v7 09/15] gpio: pl061: set initcall level to module init Haojian Zhuang
2013-01-21 14:41 ` Linus Walleij
2013-01-21 16:24 ` Pawel Moll
2013-01-21 20:20 ` Dinh Nguyen
2013-01-22 9:44 ` Linus Walleij
2013-01-22 15:47 ` Dinh Nguyen
2013-01-21 23:33 ` Haojian Zhuang
2013-01-22 10:21 ` Pawel Moll
2013-01-22 9:42 ` Linus Walleij
2013-01-22 10:13 ` Pawel Moll
2013-01-22 10:41 ` Russell King - ARM Linux
2013-01-22 12:55 ` Linus Walleij
2013-01-22 9:45 ` Linus Walleij
2013-01-18 7:31 ` [PATCH v7 10/15] pinctrl: single: create new gpio function range Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 11/15] pinctrl: generic: add slew rate config parameter Haojian Zhuang
2013-01-21 14:44 ` Linus Walleij
2013-01-18 7:31 ` [PATCH v7 12/15] pinctrl: generic: dump pin configuration Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 13/15] pinctrl: single: set function mask as optional Haojian Zhuang
2013-01-18 7:31 ` [PATCH v7 14/15] pinctrl: single: support generic pinconf Haojian Zhuang
2013-01-21 17:14 ` Tony Lindgren
2013-01-22 5:54 ` Haojian Zhuang
2013-01-22 18:55 ` Tony Lindgren [this message]
2013-01-18 7:31 ` [PATCH v7 15/15] ARM: hs: enable hi4511 with device tree Haojian Zhuang
2013-02-09 13:41 ` [PATCH v7 0/15] support pinconf in pinctrl single driver Grant Likely
2013-02-09 17:17 ` Haojian Zhuang
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=20130122185543.GP22517@atomide.com \
--to=tony@atomide.com \
--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 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).