From: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> To: Chris Brandt <Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> Cc: jacopo <jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>, Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>, Jacopo Mondi <jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>, Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>, Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>, Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>, Linux-Renesas <linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: Re: [PATCH v2 2/7] dt-bindings: pinctrl: Add RZ/A1 bindings doc Date: Wed, 29 Mar 2017 15:10:17 +0200 [thread overview] Message-ID: <CACRpkdb+k82OUbi1y1SNC09asHsNSqbtvCkYyT=1eqjpdMt_cg@mail.gmail.com> (raw) In-Reply-To: <SG2PR06MB1165276F957CE63DBE0A55268A350-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> On Wed, Mar 29, 2017 at 2:38 PM, Chris Brandt <Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote: >> I'm strongly in favour of something like >> pinmux = <PIN(1, 4) | FUNC# | FLAGS>, .... ; >> >> opposed to >> pinmux = <PIN1_4_FUNC#_FLAGS>, ... ; > > > I agree. I like "<PIN(1, 4) | FUNC# | FLAGS>". I don't know if you have seen the Mediatek things really. include/dt-bindings/pinctrl/mt6397-pinfunc.h Example: #define MT6397_PIN_2_SRCLKEN_PERI__FUNC_GPIO2 (MTK_PIN_NO(2) | 0) If you prefer to use preprocessor macros or whatever to make the bitmasks or how you want to organize the constants in your include files is not my concern, do whatever you seem fit, just pack it into a 32bit thing somehow which makes sense from a maintenance point of view. >> Not only because it will save use from having a loong list(*) of macros >> that has to be kept up to date when/if new RZ hardware will arrive, but >> also because of readability and simplicity for down-stream and BSP users. >> Speaking of which, I would like to know what does Chris think of this. > > The list of macros would be very long, especially against the different > packaging version of the RZ/A1 series. 11 ports, 16-pins for each port, 8 different > function options for each pin....2 different package/pin variations. > > And at the end of the day....there is no benefit for the user over just using > a macro. I don't know who has this idea that you could not use macros, certainly not me. Some misunderstanding must be going on. For what I'm concerned you can write hex numbers in the pinmux = <0x12345678>; > The reason for the "FLAGS" is to work around a quirky hardware design (in my opinion). The flags I don't like at all, and think they should be converted to generic pin config because they have nothing to do with muxing. But I will point that out in the specific patch adding them. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org> To: Chris Brandt <Chris.Brandt@renesas.com> Cc: jacopo <jacopo@jmondi.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Jacopo Mondi <jacopo+renesas@jmondi.org>, Geert Uytterhoeven <geert+renesas@glider.be>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Russell King <linux@armlinux.org.uk>, Linux-Renesas <linux-renesas-soc@vger.kernel.org>, "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v2 2/7] dt-bindings: pinctrl: Add RZ/A1 bindings doc Date: Wed, 29 Mar 2017 15:10:17 +0200 [thread overview] Message-ID: <CACRpkdb+k82OUbi1y1SNC09asHsNSqbtvCkYyT=1eqjpdMt_cg@mail.gmail.com> (raw) In-Reply-To: <SG2PR06MB1165276F957CE63DBE0A55268A350@SG2PR06MB1165.apcprd06.prod.outlook.com> On Wed, Mar 29, 2017 at 2:38 PM, Chris Brandt <Chris.Brandt@renesas.com> wrote: >> I'm strongly in favour of something like >> pinmux = <PIN(1, 4) | FUNC# | FLAGS>, .... ; >> >> opposed to >> pinmux = <PIN1_4_FUNC#_FLAGS>, ... ; > > > I agree. I like "<PIN(1, 4) | FUNC# | FLAGS>". I don't know if you have seen the Mediatek things really. include/dt-bindings/pinctrl/mt6397-pinfunc.h Example: #define MT6397_PIN_2_SRCLKEN_PERI__FUNC_GPIO2 (MTK_PIN_NO(2) | 0) If you prefer to use preprocessor macros or whatever to make the bitmasks or how you want to organize the constants in your include files is not my concern, do whatever you seem fit, just pack it into a 32bit thing somehow which makes sense from a maintenance point of view. >> Not only because it will save use from having a loong list(*) of macros >> that has to be kept up to date when/if new RZ hardware will arrive, but >> also because of readability and simplicity for down-stream and BSP users. >> Speaking of which, I would like to know what does Chris think of this. > > The list of macros would be very long, especially against the different > packaging version of the RZ/A1 series. 11 ports, 16-pins for each port, 8 different > function options for each pin....2 different package/pin variations. > > And at the end of the day....there is no benefit for the user over just using > a macro. I don't know who has this idea that you could not use macros, certainly not me. Some misunderstanding must be going on. For what I'm concerned you can write hex numbers in the pinmux = <0x12345678>; > The reason for the "FLAGS" is to work around a quirky hardware design (in my opinion). The flags I don't like at all, and think they should be converted to generic pin config because they have nothing to do with muxing. But I will point that out in the specific patch adding them. Yours, Linus Walleij
next prev parent reply other threads:[~2017-03-29 13:10 UTC|newest] Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-20 16:14 [PATCH v2 0/7] Renesas RZ/A1 pin and gpio controller Jacopo Mondi 2017-03-20 16:14 ` [PATCH v2 1/7] pinctrl: " Jacopo Mondi [not found] ` <1490026491-21742-2-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org> 2017-03-22 10:26 ` Geert Uytterhoeven 2017-03-22 10:26 ` Geert Uytterhoeven 2017-03-23 14:19 ` jacopo [not found] ` <1490026491-21742-1-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org> 2017-03-20 16:14 ` [PATCH v2 2/7] dt-bindings: pinctrl: Add RZ/A1 bindings doc Jacopo Mondi 2017-03-20 16:14 ` Jacopo Mondi 2017-03-22 10:33 ` Geert Uytterhoeven [not found] ` <CAMuHMdWT6vJNmMhYzMEqYRbuT=W=ZuND-WfG812LfH0r0AzM_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-03-22 13:20 ` Geert Uytterhoeven 2017-03-22 13:20 ` Geert Uytterhoeven 2017-03-22 15:36 ` jacopo 2017-03-22 15:49 ` Geert Uytterhoeven 2017-03-22 15:49 ` Geert Uytterhoeven 2017-03-23 16:02 ` jacopo 2017-03-28 9:46 ` Linus Walleij [not found] ` <CACRpkdYmitsPvv_1bsb-EKkhcWqaKNsLBfxZgf8cjVvcqCpYXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-03-28 14:38 ` jacopo-AW8dsiIh9cEdnm+yROfE0A 2017-03-28 14:38 ` jacopo 2017-03-29 2:30 ` Linus Walleij 2017-03-29 7:35 ` Geert Uytterhoeven 2017-03-29 10:15 ` Linus Walleij 2017-03-29 11:20 ` Geert Uytterhoeven 2017-03-29 12:05 ` jacopo 2017-03-29 12:38 ` Chris Brandt [not found] ` <SG2PR06MB1165276F957CE63DBE0A55268A350-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 2017-03-29 13:10 ` Linus Walleij [this message] 2017-03-29 13:10 ` Linus Walleij 2017-03-29 14:09 ` Chris Brandt 2017-03-29 14:09 ` Chris Brandt 2017-03-29 13:04 ` Linus Walleij 2017-03-20 16:14 ` [PATCH v2 3/7] arm: dts: dt-bindings: Add Renesas RZ pinctrl header Jacopo Mondi [not found] ` <1490026491-21742-4-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org> 2017-03-22 10:35 ` Geert Uytterhoeven 2017-03-22 10:35 ` Geert Uytterhoeven 2017-03-20 16:14 ` [PATCH v2 4/7] arm: dts: r7s72100: Add pin controller node Jacopo Mondi 2017-03-22 13:12 ` Geert Uytterhoeven 2017-03-23 16:13 ` jacopo 2017-03-20 16:14 ` [PATCH v2 5/7] arm: dts: genmai: Add SCIF2 pin group Jacopo Mondi 2017-03-22 13:13 ` Geert Uytterhoeven 2017-03-20 16:14 ` [PATCH v2 6/7] arm: dts: genmai: Add RIIC2 " Jacopo Mondi 2017-03-22 13:17 ` Geert Uytterhoeven 2017-03-20 16:14 ` [PATCH v2 7/7] arm: dts: genmai: Add user led device nodes Jacopo Mondi [not found] ` <1490026491-21742-8-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org> 2017-03-22 13:23 ` Geert Uytterhoeven 2017-03-22 13:23 ` Geert Uytterhoeven 2017-03-22 18:10 ` [PATCH v2 0/7] Renesas RZ/A1 pin and gpio controller Chris Brandt 2017-03-22 18:10 ` Chris Brandt
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='CACRpkdb+k82OUbi1y1SNC09asHsNSqbtvCkYyT=1eqjpdMt_cg@mail.gmail.com' \ --to=linus.walleij-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \ --cc=Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org \ --cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \ --cc=jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org \ --cc=jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org \ --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \ --cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \ --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \ --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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: linkBe 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.