All of lore.kernel.org
 help / color / mirror / Atom feed
From: jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org
To: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: 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>,
	Chris Brandt
	<chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@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,
	devicetree-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: Tue, 28 Mar 2017 16:38:22 +0200	[thread overview]
Message-ID: <b9eaac8a63dced229bb152ba412e8ec1@jmondi.org> (raw)
In-Reply-To: <CACRpkdYmitsPvv_1bsb-EKkhcWqaKNsLBfxZgf8cjVvcqCpYXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Linus,

On 2017-03-28 11:46, Linus Walleij wrote:
> On Thu, Mar 23, 2017 at 5:02 PM, jacopo <jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org> wrote:
> 
>>> > +  Required properties:
>>> > +    - renesas,pins
>>> 
>>> Just "pins"?
>>> 
>> 
>> You know, I've been thinking about this, bu the "pins" property
>> definition in pinctrl-bidings is the following one:
>> 
>> Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>> ---
>> - pins takes a list of pin names or IDs as a required argument. The
>>   specific binding for the hardware defines:
>>       - Whether the entries are integers or strings, and their
>>         meaning.
>> ---
>> 
>> And all examples there assume one "pin name" or "ID" per pin.
>> 
>> Now, we use 2 values per each pin (the pin ID and the alternate
>> function number), so to me this is different from what the generic
>> binding describes.
>> Also, pinctrl-single, and pinctrl-imx which have and ABI similar to
>> the one this driver define, use "pinctrl-single,pins" and "fsl,pins"
>> respectively as property names.
>> So either they have to be updated yet, or we should keep using
>> "renesas,pins" for our own defined ABI.
>> 
>> Maybe Linus or other pinctrl people can give some suggestion here.
> 
> To me as subsystem maintainer any "necessarily different" bindings
> are just a big confusion for the head.
> 

Understandable :)

> Since you're adding a new driver, try to stick to the generic bindings
> even if it deviates from what you are used to for Renesas, because
> even if it may be more work for you guys or make you annoyed that
> now a certain Renesas is different from all other Renesas platforms,
> for the community this makes things easier to maintain because
> we can look at the driver and its bindings and say "ah I know this".
> 
> The fact that historically all the early adopters of pinctrl in device 
> tree
> have these funky custom bindings is unfortunate but just something
> that we need to live with.
> 

To avoid any confusion, please bear with me and clarify this once and 
for all,
since I'm not certain I fully got you here.

Are you suggesting:

1) Use "pins" property with the currently implemented ABI (which 
slightly differs
    from the standard documented one as explained above. Not sure it is 
fine overriding
    it or not)

2) Use "pins" property and change our ABI to match the documented one: 
one ID (integer
    or string) per pin, not 2 as we're doing now.

Both solutions are easily implementable; 2) requires some more work to 
make pin id, function number
and pin configuration fit in one single integer, but is achievable for 
sure.

Thanks
    j

> 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: jacopo@jmondi.org
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Jacopo Mondi <jacopo+renesas@jmondi.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Chris Brandt <chris.brandt@renesas.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, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/7] dt-bindings: pinctrl: Add RZ/A1 bindings doc
Date: Tue, 28 Mar 2017 16:38:22 +0200	[thread overview]
Message-ID: <b9eaac8a63dced229bb152ba412e8ec1@jmondi.org> (raw)
In-Reply-To: <CACRpkdYmitsPvv_1bsb-EKkhcWqaKNsLBfxZgf8cjVvcqCpYXA@mail.gmail.com>

Hi Linus,

On 2017-03-28 11:46, Linus Walleij wrote:
> On Thu, Mar 23, 2017 at 5:02 PM, jacopo <jacopo@jmondi.org> wrote:
> 
>>> > +  Required properties:
>>> > +    - renesas,pins
>>> 
>>> Just "pins"?
>>> 
>> 
>> You know, I've been thinking about this, bu the "pins" property
>> definition in pinctrl-bidings is the following one:
>> 
>> Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
>> ---
>> - pins takes a list of pin names or IDs as a required argument. The
>>   specific binding for the hardware defines:
>>       - Whether the entries are integers or strings, and their
>>         meaning.
>> ---
>> 
>> And all examples there assume one "pin name" or "ID" per pin.
>> 
>> Now, we use 2 values per each pin (the pin ID and the alternate
>> function number), so to me this is different from what the generic
>> binding describes.
>> Also, pinctrl-single, and pinctrl-imx which have and ABI similar to
>> the one this driver define, use "pinctrl-single,pins" and "fsl,pins"
>> respectively as property names.
>> So either they have to be updated yet, or we should keep using
>> "renesas,pins" for our own defined ABI.
>> 
>> Maybe Linus or other pinctrl people can give some suggestion here.
> 
> To me as subsystem maintainer any "necessarily different" bindings
> are just a big confusion for the head.
> 

Understandable :)

> Since you're adding a new driver, try to stick to the generic bindings
> even if it deviates from what you are used to for Renesas, because
> even if it may be more work for you guys or make you annoyed that
> now a certain Renesas is different from all other Renesas platforms,
> for the community this makes things easier to maintain because
> we can look at the driver and its bindings and say "ah I know this".
> 
> The fact that historically all the early adopters of pinctrl in device 
> tree
> have these funky custom bindings is unfortunate but just something
> that we need to live with.
> 

To avoid any confusion, please bear with me and clarify this once and 
for all,
since I'm not certain I fully got you here.

Are you suggesting:

1) Use "pins" property with the currently implemented ABI (which 
slightly differs
    from the standard documented one as explained above. Not sure it is 
fine overriding
    it or not)

2) Use "pins" property and change our ABI to match the documented one: 
one ID (integer
    or string) per pin, not 2 as we're doing now.

Both solutions are easily implementable; 2) requires some more work to 
make pin id, function number
and pin configuration fit in one single integer, but is achievable for 
sure.

Thanks
    j

> Yours,
> Linus Walleij

  parent reply	other threads:[~2017-03-28 14:38 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 [this message]
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
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=b9eaac8a63dced229bb152ba412e8ec1@jmondi.org \
    --to=jacopo-aw8dsiih9cednm+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=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@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: 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.