From: Dong Aisheng <aisheng.dong@freescale.com>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Dong Aisheng-B29396 <B29396@freescale.com>,
Dong Aisheng <dongas86@gmail.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
"linus.walleij@stericsson.com" <linus.walleij@stericsson.com>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/3] pinctrl: pinctrl-imx: add imx pinctrl core driver
Date: Tue, 17 Apr 2012 17:57:23 +0800 [thread overview]
Message-ID: <20120417095722.GF17173@shlinux2.ap.freescale.net> (raw)
In-Reply-To: <20120416034646.GI24997@S2101-09.ap.freescale.net>
On Mon, Apr 16, 2012 at 11:46:49AM +0800, Shawn Guo wrote:
> On Mon, Apr 16, 2012 at 11:47:14AM +0800, Dong Aisheng wrote:
> ...
> > Good suggestion.
> > I can do it and it's easy to change.
> > But as i said above, before the dtc macro support is available, the pinctrl
> > setting in dts file will be hard to read since it's all raw data.
> > It becomes
> > fsl,pins = <1 2 3 4 5 6 ....>;
> > People have to search the binding doc to see what the data means.
> >
> It does not make the thing any worse. You were asking people to search
> pinctrl-imx6q.c for the meaning of the following.
>
> fsl,mux = <0 0 1 1 1 1 1 1 1 1>;
>
> IMO, it makes a bit more sense to look at binding doc than code to
> understand the dts file.
>
Yes if this is binding rather than data.
> > The question is how long the dtc macro support will be available?
> > I'm very willing to do like as you said if it's just a short time.
> > But if it's long time, do we still want to lose the readability right now?
> >
> The point is with my suggestion taken, we do not need to change code
> when the dtc macro support is available.
>
Yes, that's the benefit.
I'm fine with both method, but i was personally a little intend to the
original one before dtc macro support is available(Stehpen said it's
possible not a short-term) since it's better readable.
But considering minimize the changes after convert many other platforms
to pinctrl subsystem, the new one may be a good choice.
Sascha & Shawn,
Just let you know:
After changes the pinctrl table may look like:
(i also removed fsl,* config properties since it was introduced for better
readability before, but after dtc macro support is available, it could also
be removed. So i removed now. Then the using is much similar as iomux-v3).
iomuxc@020e0000 {
compatible = "fsl,imx6q-iomuxc";
reg = <0x020e0000 0x4000>;
/* shared pinctrl settings */
uart4 {
pinctrl_uart4_1: uart4grp-1 {
fsl,pins = <58 61>;
fsl,configs = <0x12407>
};
};
usdhc4 {
pinctrl_usdhc4_1: usdhc4grp-1 {
fsl,pins = <101 102 103 104 105 ...>;
fsl,configs = <0x12407>
};
};
};
When dt macro is available, it may be like:
/define/ MX6Q_UART_PAD_CTRL 0x12407 /* pull: 100KOhm Pull Up, speed: 50Mhz... */
/define/ MX6Q_USDHC_PAD_CTRL 0x12407 /* pull: 100KOhm Pull Up, speed: 50Mhz... */
iomuxc@020e0000 {
compatible = "fsl,imx6q-iomuxc";
rt4 {
pinctrl_uart4_1: uart4grp-1 {
fsl,pins = <MX6Q_PAD_KEY_COL0__UART4_RX
MX6Q_PAD_KEY_ROW0__UART4_TX>;
fsl,configs = <MX6Q_UART_PAD_CTRL>
};
};
usdhc4 {
pinctrl_usdhc4_1: usdhc4grp-1 {
fsl,pins = <MX6Q_PAD_SD4_CMD__SD4_CMD
MX6Q_PAD_SD4_CLK__SD4_CLK
......>;
fsl,configs = <MX6Q_USDHC_PAD_CTRL>
};
};
};
If you're also fine with it, i will do like this.
Regards
Dong Aisheng
next prev parent reply other threads:[~2012-04-17 9:57 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 16:18 [PATCH 1/3] pinctrl: pinctrl-imx: add imx pinctrl core driver Dong Aisheng
2012-04-13 16:18 ` [PATCH 2/3] pinctrl: pinctrl-imx: add imx6q pinctrl driver Dong Aisheng
2012-04-17 20:12 ` Stephen Warren
2012-04-18 3:40 ` Dong Aisheng
2012-04-13 16:18 ` [PATCH 3/3] ARM: imx6q: switch to use " Dong Aisheng
2012-04-14 13:53 ` Sascha Hauer
2012-04-15 4:03 ` Dong Aisheng
[not found] ` <CAA+hA=QhSUZg0bWTss_4ROwZ--OOQfcP=mpt+MP7-ZKPkEwXyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-15 7:37 ` Shawn Guo
2012-04-16 3:35 ` Dong Aisheng
2012-04-20 1:08 ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-24 8:23 ` Linus Walleij
2012-04-24 8:46 ` Dong Aisheng
2012-04-17 20:23 ` Stephen Warren
2012-04-13 18:17 ` [PATCH 1/3] pinctrl: pinctrl-imx: add imx pinctrl core driver Dong Aisheng
[not found] ` <1334333915-1174-1-git-send-email-b29396-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2012-04-14 13:48 ` Sascha Hauer
2012-04-15 3:49 ` Dong Aisheng
2012-04-15 14:17 ` Shawn Guo
2012-04-15 14:45 ` Sascha Hauer
2012-04-15 17:29 ` Sascha Hauer
[not found] ` <20120415172958.GG20478-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-16 1:47 ` Shawn Guo
2012-04-16 18:01 ` Stephen Warren
2012-04-16 3:47 ` Dong Aisheng
2012-04-16 3:46 ` Shawn Guo
2012-04-17 9:57 ` Dong Aisheng [this message]
2012-04-17 12:30 ` Sascha Hauer
2012-04-18 3:38 ` Dong Aisheng
2012-04-17 20:58 ` Stephen Warren
2012-04-18 7:19 ` Dong Aisheng
2012-04-18 18:06 ` Stephen Warren
2012-04-19 15:28 ` Shawn Guo
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=20120417095722.GF17173@shlinux2.ap.freescale.net \
--to=aisheng.dong@freescale.com \
--cc=B29396@freescale.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dongas86@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=s.hauer@pengutronix.de \
--cc=shawn.guo@linaro.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).