devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Thomas Abraham <thomas.abraham@linaro.org>
Cc: Rajendra Nayak <rnayak@ti.com>, Tony Lindgren <tony@atomide.com>,
	linux-omap@vger.kernel.org, linaro-dev@lists.linaro.org,
	linus.walleij@stericsson.com,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [RFC 1/3] pinctrl: add a driver for the OMAP pinmux
Date: Thu, 17 Nov 2011 14:57:12 +0100	[thread overview]
Message-ID: <CACRpkdbBQoOU8hyew6tXth3Ohrg5_rN7M+tbVsYFcOjgq73aCw@mail.gmail.com> (raw)
In-Reply-To: <CAJuYYwSgzkDed5-R=PaBR_F6ssj_EhxLDfCREXUA=UaynkgZyg@mail.gmail.com>

On Thu, Nov 17, 2011 at 12:26 PM, Thomas Abraham
<thomas.abraham@linaro.org> wrote:

> For now, the Samsung GPIO, Pinconfig and Pinmux information is
> represented in device tree as listed below.

Does this mean that the understanding of this format is merged into
the mainline kernel drivers or is it keps out-of-tree?

> i2c@1C004000 {
>          compatible = "...";
>          reg = <0x... 0x..>;
>           gpios = <&gpa0 2 2 3 0>,
>                      <&gpa0 3 2 3 0>;
>          ...
> };
>
> The format of the gpio specifier is
> <[Pad Controller phandle] [pin number within the controller] [Pin Mux
> Function] [Pull Up/Down] [Drive Strength]>
>
> From a perspective of writing a 'gpios' property for a device node,
> this is quite simple. Looking up the hardware manual of the SoC can
> provide all the values that should be used in the gpio specifier.

That may not be as simple as it seems if all you have is the
device tree and no manual, but I get the picture.

> The GPIO/PinCtrl driver can provide a translate function that picks up
> the values for the gpio specifier and writes the same value to the
> pad-controller registers. But, this a deviation from the existing
> pinctrl subsystem code which mainly relies on name of the pin-group
> and pin-function.
>
> Does this seem to be a feasible option for specifying
> gpio/pinconfig/pinmux dt bindings?

I would prefer the above to use the nice generic enums from the
pin control subsystem's pinmux and pinconf properties in the
end so the device tree on its own is understandable without
any manual whatsoever, but we'll see about that.

Maybe I'm mistaken about the device tree ambitions, but
I was sort of hoping that it would not contain too much
custom magic numbers that need to be cross-referenced
elsewhere ... or rather - the more understandable the device
tree is, the more we win.

Thanks,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

       reply	other threads:[~2011-11-17 13:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1321274409-24643-1-git-send-email-rnayak@ti.com>
     [not found] ` <1321274409-24643-2-git-send-email-rnayak@ti.com>
     [not found]   ` <20111114172312.GI31337@atomide.com>
     [not found]     ` <4EC1EB9D.1000503@ti.com>
     [not found]       ` <CACRpkdYuw+AfVtgfsbpkd=uvfWd8yE-n25EC0FDffhiGUS2MBw@mail.gmail.com>
     [not found]         ` <CAJuYYwSgzkDed5-R=PaBR_F6ssj_EhxLDfCREXUA=UaynkgZyg@mail.gmail.com>
2011-11-17 13:57           ` Linus Walleij [this message]
     [not found]             ` <CACRpkdbBQoOU8hyew6tXth3Ohrg5_rN7M+tbVsYFcOjgq73aCw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-22 11:09               ` [RFC 1/3] pinctrl: add a driver for the OMAP pinmux Thomas Abraham
2011-11-22 12:05                 ` Linus Walleij
2011-11-22 17:54                   ` Tony Lindgren
2011-11-23  0:28                     ` Stephen Warren
2011-11-23 10:14                       ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]                       ` <74CDBE0F657A3D45AFBB94109FB122FF174F08C5B3-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-11-24 10:09                         ` Linus Walleij
2011-11-23 15:21                     ` Koen Kooi
2011-11-24  5:07                       ` Hiremath, Vaibhav
2011-11-24 10:04                     ` Linus Walleij
2011-11-24 19:54                       ` Tony Lindgren
2011-11-25  8:53                         ` 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=CACRpkdbBQoOU8hyew6tXth3Ohrg5_rN7M+tbVsYFcOjgq73aCw@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rnayak@ti.com \
    --cc=thomas.abraham@linaro.org \
    --cc=tony@atomide.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).