devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH RFC] dt-bindings: pinctrl: support specifying pins
Date: Fri, 12 Nov 2021 12:16:01 +0200	[thread overview]
Message-ID: <YY4+4Wb/H2ogKnQg@atomide.com> (raw)
In-Reply-To: <CACRpkdbAS0JiqTQUU0R0yRhVCwagubwsNYLxj1DLE1Ldc+H_JQ@mail.gmail.com>

* Linus Walleij <linus.walleij@linaro.org> [211111 15:32]:
> At the time (2011?) it was unclear what kind of data should go into
> e.g. header and data files in the kernel (modules) and what should
> go into the DT. So the approach to put pin information into the DT
> was allowed for pinctrl-single.
> 
> The way I have understood it, DT maintainers have since gotten
> a bit wary about (ab)using the DT as a container for "anything data"
> and prefer that drivers contain details and derive these from
> compatible strings.
> 
> As of today, IIUC the DT maintainers are against this scheme.

We have some newish tools now compared 2011 though with #pinctrl-cells.
And we now have also GENERIC_PINCTRL_GROUPS, GENERIC_PINMUX_FUNCTIONS
and GENERIC_PINCONF :)

The problem with the pinctrl-single binding is that it uses the hardware
specific mux values in addition to the mux register offsets. IMO the
values should use Linux generic pinctrl defines instead. Just like we
do for the gpio and interrupt bindings. And then the generic pinctrl
binding would be very similar to the interrupts-extended binding for
example.

And with a generic pinctrl binding pinctrl-single could be updated to
parse the generic binding naturally too in addition to the legacy
binding.

> That said, the topic is open in a way. Some people are also annoyed
> that some graphics drivers just ask Torvalds to pull 100.000+ lines
> of register defnes in some merge windows. The data has to go
> somewhere.

Yes and the amount of SoC specific LOC under drivers/pinctrl is pretty
staggering already.

With all that SoC specific data built into the kernel, it's like going
camping with all your pants stuffed into your car instead of just the
pants you need :)

We only need the SoC specific data for the booted SoC, so devicetree
and loadable modules makes more sense there compared to the current
built-in setup.

Regards,

Tony

  parent reply	other threads:[~2021-11-12 10:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 23:14 [PATCH RFC] dt-bindings: pinctrl: support specifying pins Rafał Miłecki
2021-11-11 15:31 ` Linus Walleij
2021-11-11 19:53   ` Rob Herring
2021-11-12 10:16   ` Tony Lindgren [this message]
2021-11-12 11:21     ` Andy Shevchenko
2021-11-12 12:16       ` Tony Lindgren
2021-11-12 12:20         ` Andy Shevchenko
2021-11-11 20:06 ` Rob Herring

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=YY4+4Wb/H2ogKnQg@atomide.com \
    --to=tony@atomide.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafal@milecki.pl \
    --cc=robh+dt@kernel.org \
    --cc=zajec5@gmail.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).