All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Andre Przywara <andre.przywara-5wv7dgnIgG8@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	ext Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>,
	Catalin Marinas <catalin.marinas-5wv7dgnIgG8@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-sunxi <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC
Date: Thu, 19 Jan 2017 18:41:44 +0100	[thread overview]
Message-ID: <20170119174144.hiw7lmvdh2tzxtd7@lukather> (raw)
In-Reply-To: <87a535d3-1170-c388-ce7d-4921e69f4cab-5wv7dgnIgG8@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 5385 bytes --]

On Wed, Jan 18, 2017 at 09:44:37AM +0000, Andre Przywara wrote:
> Hi,
> 
> On 16/01/17 16:31, Maxime Ripard wrote:
> > On Mon, Jan 09, 2017 at 12:16:00AM +0000, André Przywara wrote:
> >> On 05/01/17 22:42, Maxime Ripard wrote:
> >>> On Fri, Dec 30, 2016 at 01:55:44PM +0100, Linus Walleij wrote:
> >>>> On Mon, Dec 26, 2016 at 3:33 PM, André Przywara <andre.przywara@arm.com> wrote:
> >>>>
> >>>>> So while this patch technically looks correct, I was wondering if we
> >>>>> should really explore the possibility of making the whole of sunxi
> >>>>> pinctrl DT controlled.
> >>>>> I brought this up a while ago, but people weren't overly enthusiastic
> >>>>> about it, though their argument weren't really convincing to me[1].
> >>>>>
> >>>>> So:
> >>>>> As this "driver" here is basically a table linking GPIO bit settings
> >>>>> (the actual mux value) to names and every pin we care about needs to be
> >>>>> enumerated in the DT anyway, why not just add something like:
> >>>>> allwinner,pinmux = <4>;
> >>>>> to each pin(group) in the DT and get rid of this "driver" file here
> >>>>> entirely?
> >>>>
> >>>> I'm open to that if you can use pinctrl-single which is in the kernel
> >>>> for this purpose only, and is used with both OMAPs and HiSilicon.
> >>>
> >>> I'm not open to that, and I'm getting tired of discussing it over and
> >>> over again. Andre, if you want to be convinced again, please read the
> >>> last discussion we had on this topic.
> >>
> >> As I said: It didn't convince me back then. And frankly we didn't really
> >> discuss it back then, I just refrained from entering a discussion
> >> against _two_ maintainers at this time, since my capacity on this kind
> >> of email threads is really very limited - especially for something that
> >> is a hobby to me.
> > 
> > This is also (mostly) a hobby to me, which is exactly why I prefer to
> > work on something actually useful, rather than just discussing this
> > over and over again. Just like I don't want (myself, or anyone,
> > really, since we're all in the same boat) to have to maintain two
> > separate pinctrl drivers.
> > 
> > We're having a documented, simple, pinctrl binding, using the generic
> > bindings now (that almost everyone else is using now, or is very close
> > to), and we can leverage as much documentation and code from that. Why
> > would we want to create and maintain a new driver with a new binding,
> > that will need to be documented again, learned by everyone, and will
> > lead only to confusion across the people who just want to have their
> > board supported?
> 
> I agree, and thus was proposing a _slightly changed_ pinctrl driver
> which actually *reduces* the maintenance burden in the kernel.
> In the moment we need to add _both_ a pinctrl .dtsi node _and_ a kernel
> "driver" file, which is really boilerplate code plus a table.
> Also we need to make sure that both these files match.
> If a new SoC is really 99% similar to an existing one, atm we still need
> explicit kernel support if only one pin is changed (see the H5).

That's not true anymore. And while it's true that it reduces the
amount of maintainance on the kernel side and more on the DT side. And
from what you're constantly saying, the thing we can't plan on fixing
/ upgrading is the DT, while the kernel is easy to change.

Which means that if we ever want to fix a non-upgradable DT, the only
way to do that would be to add quirks fixing it in the kernel
itself. Adding more maintainance burden to the kernel.

But really, this is not up for debate. You're 4 years too late for
that for the original binding, and almost 2 years for the generic
binding.

> > I'm sorry, but this is also our jobs as maintainers to prevent all
> > these kind of issues, and to maintain consistency. Switching to one
> > binding to another breaks that consistency on many level,
> 
> Yet we did it for the clocks. The very same argumentation that you gave
> above applies there as well (two different bindings, two sets of drivers
> in the kernel, new learnings for people, etc.)

No, this is very different. An end user just wanting to plug a dumb
device on his i2c bus will never even see how clocks are
described. This is not true for pinctrl.

And all the other arguments for the clocks have been the same than the
pinctrl driver: every driver is converging to the new binding we've
been using, the table in the kernel is easier to fix, etc.

> One difference would be that the new pinctrl binding wouldn't be
> fundamentally different to the old one, up to the point where the old
> driver could possibly use the very same DT nodes (but that would need to
> be worked out).

The story is different if you manage to keep the binding. Every
platform (but TI's) is converging to the generic bindings. Not using
them is not an option. Having a different implementation is.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	ext Tony Lindgren <tony@atomide.com>,
	Icenowy Zheng <icenowy@aosc.xyz>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Chen-Yu Tsai <wens@csie.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>
Subject: Re: [linux-sunxi] [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC
Date: Thu, 19 Jan 2017 18:41:44 +0100	[thread overview]
Message-ID: <20170119174144.hiw7lmvdh2tzxtd7@lukather> (raw)
In-Reply-To: <87a535d3-1170-c388-ce7d-4921e69f4cab@arm.com>

[-- Attachment #1: Type: text/plain, Size: 5061 bytes --]

On Wed, Jan 18, 2017 at 09:44:37AM +0000, Andre Przywara wrote:
> Hi,
> 
> On 16/01/17 16:31, Maxime Ripard wrote:
> > On Mon, Jan 09, 2017 at 12:16:00AM +0000, André Przywara wrote:
> >> On 05/01/17 22:42, Maxime Ripard wrote:
> >>> On Fri, Dec 30, 2016 at 01:55:44PM +0100, Linus Walleij wrote:
> >>>> On Mon, Dec 26, 2016 at 3:33 PM, André Przywara <andre.przywara@arm.com> wrote:
> >>>>
> >>>>> So while this patch technically looks correct, I was wondering if we
> >>>>> should really explore the possibility of making the whole of sunxi
> >>>>> pinctrl DT controlled.
> >>>>> I brought this up a while ago, but people weren't overly enthusiastic
> >>>>> about it, though their argument weren't really convincing to me[1].
> >>>>>
> >>>>> So:
> >>>>> As this "driver" here is basically a table linking GPIO bit settings
> >>>>> (the actual mux value) to names and every pin we care about needs to be
> >>>>> enumerated in the DT anyway, why not just add something like:
> >>>>> allwinner,pinmux = <4>;
> >>>>> to each pin(group) in the DT and get rid of this "driver" file here
> >>>>> entirely?
> >>>>
> >>>> I'm open to that if you can use pinctrl-single which is in the kernel
> >>>> for this purpose only, and is used with both OMAPs and HiSilicon.
> >>>
> >>> I'm not open to that, and I'm getting tired of discussing it over and
> >>> over again. Andre, if you want to be convinced again, please read the
> >>> last discussion we had on this topic.
> >>
> >> As I said: It didn't convince me back then. And frankly we didn't really
> >> discuss it back then, I just refrained from entering a discussion
> >> against _two_ maintainers at this time, since my capacity on this kind
> >> of email threads is really very limited - especially for something that
> >> is a hobby to me.
> > 
> > This is also (mostly) a hobby to me, which is exactly why I prefer to
> > work on something actually useful, rather than just discussing this
> > over and over again. Just like I don't want (myself, or anyone,
> > really, since we're all in the same boat) to have to maintain two
> > separate pinctrl drivers.
> > 
> > We're having a documented, simple, pinctrl binding, using the generic
> > bindings now (that almost everyone else is using now, or is very close
> > to), and we can leverage as much documentation and code from that. Why
> > would we want to create and maintain a new driver with a new binding,
> > that will need to be documented again, learned by everyone, and will
> > lead only to confusion across the people who just want to have their
> > board supported?
> 
> I agree, and thus was proposing a _slightly changed_ pinctrl driver
> which actually *reduces* the maintenance burden in the kernel.
> In the moment we need to add _both_ a pinctrl .dtsi node _and_ a kernel
> "driver" file, which is really boilerplate code plus a table.
> Also we need to make sure that both these files match.
> If a new SoC is really 99% similar to an existing one, atm we still need
> explicit kernel support if only one pin is changed (see the H5).

That's not true anymore. And while it's true that it reduces the
amount of maintainance on the kernel side and more on the DT side. And
from what you're constantly saying, the thing we can't plan on fixing
/ upgrading is the DT, while the kernel is easy to change.

Which means that if we ever want to fix a non-upgradable DT, the only
way to do that would be to add quirks fixing it in the kernel
itself. Adding more maintainance burden to the kernel.

But really, this is not up for debate. You're 4 years too late for
that for the original binding, and almost 2 years for the generic
binding.

> > I'm sorry, but this is also our jobs as maintainers to prevent all
> > these kind of issues, and to maintain consistency. Switching to one
> > binding to another breaks that consistency on many level,
> 
> Yet we did it for the clocks. The very same argumentation that you gave
> above applies there as well (two different bindings, two sets of drivers
> in the kernel, new learnings for people, etc.)

No, this is very different. An end user just wanting to plug a dumb
device on his i2c bus will never even see how clocks are
described. This is not true for pinctrl.

And all the other arguments for the clocks have been the same than the
pinctrl driver: every driver is converging to the new binding we've
been using, the table in the kernel is easier to fix, etc.

> One difference would be that the new pinctrl binding wouldn't be
> fundamentally different to the old one, up to the point where the old
> driver could possibly use the very same DT nodes (but that would need to
> be worked out).

The story is different if you manage to keep the binding. Every
platform (but TI's) is converging to the generic bindings. Not using
them is not an option. Having a different implementation is.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC
Date: Thu, 19 Jan 2017 18:41:44 +0100	[thread overview]
Message-ID: <20170119174144.hiw7lmvdh2tzxtd7@lukather> (raw)
In-Reply-To: <87a535d3-1170-c388-ce7d-4921e69f4cab@arm.com>

On Wed, Jan 18, 2017 at 09:44:37AM +0000, Andre Przywara wrote:
> Hi,
> 
> On 16/01/17 16:31, Maxime Ripard wrote:
> > On Mon, Jan 09, 2017 at 12:16:00AM +0000, Andr? Przywara wrote:
> >> On 05/01/17 22:42, Maxime Ripard wrote:
> >>> On Fri, Dec 30, 2016 at 01:55:44PM +0100, Linus Walleij wrote:
> >>>> On Mon, Dec 26, 2016 at 3:33 PM, Andr? Przywara <andre.przywara@arm.com> wrote:
> >>>>
> >>>>> So while this patch technically looks correct, I was wondering if we
> >>>>> should really explore the possibility of making the whole of sunxi
> >>>>> pinctrl DT controlled.
> >>>>> I brought this up a while ago, but people weren't overly enthusiastic
> >>>>> about it, though their argument weren't really convincing to me[1].
> >>>>>
> >>>>> So:
> >>>>> As this "driver" here is basically a table linking GPIO bit settings
> >>>>> (the actual mux value) to names and every pin we care about needs to be
> >>>>> enumerated in the DT anyway, why not just add something like:
> >>>>> allwinner,pinmux = <4>;
> >>>>> to each pin(group) in the DT and get rid of this "driver" file here
> >>>>> entirely?
> >>>>
> >>>> I'm open to that if you can use pinctrl-single which is in the kernel
> >>>> for this purpose only, and is used with both OMAPs and HiSilicon.
> >>>
> >>> I'm not open to that, and I'm getting tired of discussing it over and
> >>> over again. Andre, if you want to be convinced again, please read the
> >>> last discussion we had on this topic.
> >>
> >> As I said: It didn't convince me back then. And frankly we didn't really
> >> discuss it back then, I just refrained from entering a discussion
> >> against _two_ maintainers at this time, since my capacity on this kind
> >> of email threads is really very limited - especially for something that
> >> is a hobby to me.
> > 
> > This is also (mostly) a hobby to me, which is exactly why I prefer to
> > work on something actually useful, rather than just discussing this
> > over and over again. Just like I don't want (myself, or anyone,
> > really, since we're all in the same boat) to have to maintain two
> > separate pinctrl drivers.
> > 
> > We're having a documented, simple, pinctrl binding, using the generic
> > bindings now (that almost everyone else is using now, or is very close
> > to), and we can leverage as much documentation and code from that. Why
> > would we want to create and maintain a new driver with a new binding,
> > that will need to be documented again, learned by everyone, and will
> > lead only to confusion across the people who just want to have their
> > board supported?
> 
> I agree, and thus was proposing a _slightly changed_ pinctrl driver
> which actually *reduces* the maintenance burden in the kernel.
> In the moment we need to add _both_ a pinctrl .dtsi node _and_ a kernel
> "driver" file, which is really boilerplate code plus a table.
> Also we need to make sure that both these files match.
> If a new SoC is really 99% similar to an existing one, atm we still need
> explicit kernel support if only one pin is changed (see the H5).

That's not true anymore. And while it's true that it reduces the
amount of maintainance on the kernel side and more on the DT side. And
from what you're constantly saying, the thing we can't plan on fixing
/ upgrading is the DT, while the kernel is easy to change.

Which means that if we ever want to fix a non-upgradable DT, the only
way to do that would be to add quirks fixing it in the kernel
itself. Adding more maintainance burden to the kernel.

But really, this is not up for debate. You're 4 years too late for
that for the original binding, and almost 2 years for the generic
binding.

> > I'm sorry, but this is also our jobs as maintainers to prevent all
> > these kind of issues, and to maintain consistency. Switching to one
> > binding to another breaks that consistency on many level,
> 
> Yet we did it for the clocks. The very same argumentation that you gave
> above applies there as well (two different bindings, two sets of drivers
> in the kernel, new learnings for people, etc.)

No, this is very different. An end user just wanting to plug a dumb
device on his i2c bus will never even see how clocks are
described. This is not true for pinctrl.

And all the other arguments for the clocks have been the same than the
pinctrl driver: every driver is converging to the new binding we've
been using, the table in the kernel is easier to fix, etc.

> One difference would be that the new pinctrl binding wouldn't be
> fundamentally different to the old one, up to the point where the old
> driver could possibly use the very same DT nodes (but that would need to
> be worked out).

The story is different if you manage to keep the binding. Every
platform (but TI's) is converging to the generic bindings. Not using
them is not an option. Having a different implementation is.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170119/17c72b5a/attachment-0001.sig>

  parent reply	other threads:[~2017-01-19 17:41 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 12:50 [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC Icenowy Zheng
2016-12-23 12:50 ` Icenowy Zheng
     [not found] ` <20161223125001.1176-1-icenowy-ymACFijhrKM@public.gmane.org>
2016-12-23 12:50   ` [PATCH 2/2] arm64: allwinner: Kconfig: add essential pinctrl driver for H5 Icenowy Zheng
2016-12-23 12:50     ` Icenowy Zheng
2016-12-26 14:33   ` [PATCH 1/2] drivers: pinctrl: add driver for Allwinner H5 SoC André Przywara
2016-12-26 14:33     ` [linux-sunxi] " André Przywara
2016-12-26 14:33     ` André Przywara
     [not found]     ` <1280f095-ab03-93f8-14d2-99d13ba1ce55-5wv7dgnIgG8@public.gmane.org>
2016-12-30 12:55       ` Linus Walleij
2016-12-30 12:55         ` [linux-sunxi] " Linus Walleij
2016-12-30 12:55         ` Linus Walleij
2016-12-30 19:42         ` Tony Lindgren
2016-12-30 19:42           ` Tony Lindgren
2016-12-30 19:42           ` Tony Lindgren
     [not found]         ` <CACRpkdYQhfid3VRcaj=7as_+Zg=pX3Svp9FJ_W_Ft8nVuoZqKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-05 22:42           ` Maxime Ripard
2017-01-05 22:42             ` [linux-sunxi] " Maxime Ripard
2017-01-05 22:42             ` Maxime Ripard
2017-01-09  0:16             ` André Przywara
2017-01-09  0:16               ` [linux-sunxi] " André Przywara
2017-01-09  0:16               ` André Przywara
2017-01-16 16:31               ` Maxime Ripard
2017-01-16 16:31                 ` Maxime Ripard
2017-01-16 16:31                 ` Maxime Ripard
2017-01-18  9:44                 ` Andre Przywara
2017-01-18  9:44                   ` [linux-sunxi] " Andre Przywara
2017-01-18  9:44                   ` Andre Przywara
     [not found]                   ` <87a535d3-1170-c388-ce7d-4921e69f4cab-5wv7dgnIgG8@public.gmane.org>
2017-01-19  9:23                     ` Linus Walleij
2017-01-19  9:23                       ` [linux-sunxi] " Linus Walleij
2017-01-19  9:23                       ` Linus Walleij
     [not found]                       ` <CACRpkdaTVY7Of5bKyk81xA2kUnZVMQ8LnWEJosg7Ns3s5nAEYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-19 13:11                         ` Icenowy Zheng
2017-01-19 13:11                           ` [linux-sunxi] " Icenowy Zheng
     [not found]                           ` <128701484831509-mf8Frdr2Tdlxpj1cXAZ9Bg@public.gmane.org>
2017-01-19 17:29                             ` Maxime Ripard
2017-01-19 17:29                               ` [linux-sunxi] " Maxime Ripard
2017-01-19 17:29                               ` Maxime Ripard
2017-01-19 17:41                     ` Maxime Ripard [this message]
2017-01-19 17:41                       ` Maxime Ripard
2017-01-19 17:41                       ` Maxime Ripard
2017-01-26 10:03                       ` Linus Walleij
2017-01-26 10:03                         ` [linux-sunxi] " Linus Walleij
2017-01-26 10:03                         ` 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=20170119174144.hiw7lmvdh2tzxtd7@lukather \
    --to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=andre.przywara-5wv7dgnIgG8@public.gmane.org \
    --cc=catalin.marinas-5wv7dgnIgG8@public.gmane.org \
    --cc=icenowy-ymACFijhrKM@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@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.