linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bernhard Rosenkränzer" <bero@baylibre.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Kevin Hilman <khilman@baylibre.com>,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	matthias.bgg@gmail.com,
	"angelogioacchino.delregno@collabora.com" 
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v3 4/7] dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC
Date: Sun, 20 Nov 2022 15:38:51 +0100	[thread overview]
Message-ID: <CAP2ifjMQAx23xc0p_LZ9Dj79Hx1cyLZ-tx8HrGUbtDR-SmdECw@mail.gmail.com> (raw)
In-Reply-To: <76cae9bf-c81a-684a-c22b-9548dd82c8d4@linaro.org>

Hi Krzysztof,

On Sun, Nov 20, 2022 at 11:40 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> >>> +  pins-are-numbered:
> >
> > Yeah, having this as a flag kind of implies that this could be present
> > for some boards but not others.  But in practice, the driver requires it
> > to be present or just fails[1].  What's the right way to describe that?
> > We're just trying to add a binding that reflects the existing driver.
>
> Uh, what an interesting property. What's the point of it then? Why
> failing to probe on a missing property which does nothing else?

I couldn't find any other use of it in the kernel, and also checked
u-boot (where the property also appears in some devicetree files, but
isn't used anywhere).
Both the MTK and STM drivers use it just to refuse it if it isn't there.

Unfortunately "git blame" only shows pins-are-numbered being added as
part of a larger commit ("add the driver"), so there's no "add check
for pins-are-numbered because xyz" commit message.

I can think of 3 possible explanations, but none of them are good:
1. It's something that had a purpose at some point, but doesn't
anymore (but that would likely leave some trace in "git blame"...)
2. It's something that was added in preparation for another patch (but
I can't find any queued/suggested patches that make use of it)
3. It's for the sake of userland -- check if pins-are-numbered is set
(which will be true for MTK and STM because these drivers enforce it,
false for anything else because the schemas don't mention it) and then
do different things. But this seems unlikely as well, the usual
suspects (libgpiod and friends) don't do any such lookup, and there
are ways to look up pins without that property - and I'd expect pins
are numbered on many controllers outside of MTK and STM, so looking up
that property would give a false response there.

> I would like to understand why do we need this property and what is
> described by it.

Same here...

> Because if it's purpose is only to fail or not fail
> driver probe, then we should just drop it everywhere.

Agreed (and I think more likely than not, that is the only purpose),
but probably a "add support for another board" patchset isn't the
right context for that.

I can prepare a "remove pins-are-numbered" patchset, but given it will
likely take time to track down someone who knows why this was added in
the first place, I don't think it should block the MT8365 patchset.

Best regards
bero

  reply	other threads:[~2022-11-20 14:39 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 21:03 [PATCH v3 0/7] Add minimal MT8365 and MT8365-EVK support Bernhard Rosenkränzer
2022-11-17 21:03 ` [PATCH v3 1/7] dt-bindings: arm64: dts: mediatek: Add mt8365-evk board Bernhard Rosenkränzer
2022-11-18  8:15   ` Krzysztof Kozlowski
2022-11-17 21:03 ` [PATCH v3 2/7] dt-bindings: irq: mtk, sysirq: add support for mt8365 Bernhard Rosenkränzer
2022-11-18  8:16   ` Krzysztof Kozlowski
2022-11-17 21:03 ` [PATCH v3 3/7] dt-bindings: mfd: syscon: Add mt8365-syscfg Bernhard Rosenkränzer
2022-11-18  8:17   ` Krzysztof Kozlowski
2022-11-17 21:03 ` [PATCH v3 4/7] dt-bindings: pinctrl: add bindings for Mediatek MT8365 SoC Bernhard Rosenkränzer
2022-11-18  8:25   ` Krzysztof Kozlowski
2022-11-18 19:52     ` Kevin Hilman
2022-11-20 10:40       ` Krzysztof Kozlowski
2022-11-20 14:38         ` Bernhard Rosenkränzer [this message]
2022-11-21  1:58           ` Bernhard Rosenkränzer
2022-11-21 10:20             ` Krzysztof Kozlowski
2022-11-17 21:03 ` [PATCH v3 5/7] dt-bindings: usb: mediatek,mtu3: add MT8365 SoC bindings Bernhard Rosenkränzer
2022-11-17 21:03 ` [PATCH v3 6/7] dt-bindings: usb: mediatek,mtk-xhci: " Bernhard Rosenkränzer
2022-11-17 21:03 ` [PATCH v3 7/7] arm64: dts: mediatek: Initial mt8365-evk support Bernhard Rosenkränzer
2022-11-18 20:28   ` Kevin Hilman

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=CAP2ifjMQAx23xc0p_LZ9Dj79Hx1cyLZ-tx8HrGUbtDR-SmdECw@mail.gmail.com \
    --to=bero@baylibre.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.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).