From: zonque@gmail.com (Daniel Mack)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] ARM: dts: add pinctrl in PXA DT files
Date: Mon, 13 Aug 2012 11:43:01 +0200 [thread overview]
Message-ID: <5028CC25.5040707@gmail.com> (raw)
In-Reply-To: <CACRpkda0443PF-SwNaiJCO9RmdCFqw1+OtLgTBoTfZzwnFjJ4w@mail.gmail.com>
On 10.08.2012 12:56, Linus Walleij wrote:
> On Thu, Aug 9, 2012 at 4:28 PM, Daniel Mack <zonque@gmail.com> wrote:
>
>> I am looking at the generic pinctrl code right now
>
> Sweet!
>
>> and I wonder if the following approach would be ok:
>>
>> - each driver that calls pinctrl_register() has its own dt_match_table
>> entry, so the 'compatible' part of the bindings is specific to a pin
>> controller chip.
>
> Yep.
>
>> - introduce a pinctrl_parse_of(struct of_node *) and call that after the
>> driver has added all its pins. That function walks all the children of
>> the given node and uses the callbacks provided by the driver to do the
>> actual work.
>
> Isn't that already how it works? Maybe I misunderstand, do you mean
> that you want to pass the DT node to pinctrl_register()?
To parse the generic bits, yes. But I realized only now that we already
have dt_to_map_one_config()
> Are you talking about using pinctrl hogs to set up the default
> configuration and muxing? That can already be done today,
> and has nothing to do with whether you use generic pin config
> or not.
>
> This uses the .dt_node_to_map() and .dt_free_map() callbacks
> in the pinctrl_ops vtable to generate a map from the device tree,
> in any way you want.
Yes, I see. And this is where duplication emerges, or, where
consolidation would need to be done. If we want to standardize the way
pins are set up in terms of bias, pullup/pulldown and all that, we would
just need to map generic DT entries to PIN_CONFIG_* and call the pin
controllers specific functions.
> So the infrastructure I think already exists, but whereas all
> current driver have their own config and mux (etc) parsing
> code, pinconf-generic could provide something that would
> be common for all driver using generic pin config.
Exactly. And then the question is whether we want implicit behaviour.
IOW - let dt_to_map_one_config() parse the generic bits and then call
the driver specific augmentation code, if any.
Daniel
next prev parent reply other threads:[~2012-08-13 9:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-28 6:58 [PATCH 0/6] pinctrl: add DT support in PXA series Haojian Zhuang
2012-07-28 6:58 ` [PATCH 1/6] pinctrl: append new pins and groups in pxa910 Haojian Zhuang
2012-08-05 0:04 ` Linus Walleij
2012-07-28 6:58 ` [PATCH 2/6] pinctrl: add pinconf support in pxa3xx Haojian Zhuang
2012-07-28 10:22 ` Daniel Mack
2012-07-28 15:28 ` Haojian Zhuang
2012-08-05 0:05 ` Linus Walleij
2012-07-28 6:58 ` [PATCH 3/6] pinctrl: support dt in pxa series Haojian Zhuang
2012-08-05 0:07 ` Linus Walleij
2012-07-28 6:58 ` [PATCH 4/6] pinctrl: append new groups of mmp2 Haojian Zhuang
2012-08-05 0:07 ` Linus Walleij
2012-07-28 6:58 ` [PATCH 5/6] ARM: mmp: select pinctrl for boards with DT Haojian Zhuang
2012-08-05 0:08 ` Linus Walleij
2012-07-28 6:58 ` [PATCH 6/6] ARM: dts: add pinctrl in PXA DT files Haojian Zhuang
2012-08-05 0:09 ` Linus Walleij
2012-08-06 8:44 ` Arnd Bergmann
2012-08-06 10:32 ` Daniel Mack
2012-08-06 10:33 ` Haojian Zhuang
2012-08-07 6:49 ` Linus Walleij
2012-08-09 14:28 ` Daniel Mack
2012-08-10 10:56 ` Linus Walleij
2012-08-13 9:43 ` Daniel Mack [this message]
2012-08-13 14:11 ` 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=5028CC25.5040707@gmail.com \
--to=zonque@gmail.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 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.