mbox series

[v3,0/7] Remove the pins-are-numbered DT property

Message ID 20221129023401.278780-1-bero@baylibre.com (mailing list archive)
Headers show
Series Remove the pins-are-numbered DT property | expand

Message

Bernhard Rosenkränzer Nov. 29, 2022, 2:33 a.m. UTC
During the review of my MT8365 support patchset
(https://lore.kernel.org/linux-mediatek/20221117210356.3178578-1-bero@baylibre.com/),
the issue of the "pins-are-numbered" DeviceTree property has come up.

This property is unique to Mediatek MT65xx and STM32 pinctrls, and
doesn't seem to serve any purpose (both the Mediatek and STM32 drivers
simply refuse to deal with a device unless pins-are-numbered is set to
true).

There is no other use of this property in the kernel or in other projects
using DeviceTrees (checked u-boot and FreeBSD -- in both of those, the
flag is present in Mediatek and STM devicetrees, but not used anywhere).

There is also no known use in userspace (in fact, a userland application
relying on the property would be broken because it would get true on
any Mediatek or STM chipset and false on all others, even though other
chipsets use numbered pins).

This patchset removes all uses of pins-are-numbered and marks the
property as deprecated.

v3:
  - No functional changes; add recent Reviewed-Bys and Acked-Bys,
    add linux-gpio to Cc

v2:
  - Deprecate the property instead of removing it completely from
    schemas
  - squash some related commits


Bernhard Rosenkränzer (7):
  pinctrl: mediatek: common: Remove check for pins-are-numbered
  pinctrl: stm32: Remove check for pins-are-numbered
  dt-bindings: pinctrl: mediatek,mt65xx: Deprecate pins-are-numbered
  dt-bindings: pinctrl: st,stm32: Deprecate pins-are-numbered
  arm64: dts: mediatek: Remove pins-are-numbered property
  ARM: dts: mediatek: Remove pins-are-numbered property
  ARM: dts: stm32: Remove the pins-are-numbered property

 .../bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml          | 5 ++---
 .../devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml      | 7 +++----
 arch/arm/boot/dts/mt2701.dtsi                              | 1 -
 arch/arm/boot/dts/mt7623.dtsi                              | 1 -
 arch/arm/boot/dts/mt8135.dtsi                              | 1 -
 arch/arm/boot/dts/stm32f4-pinctrl.dtsi                     | 1 -
 arch/arm/boot/dts/stm32f7-pinctrl.dtsi                     | 1 -
 arch/arm/boot/dts/stm32h743.dtsi                           | 1 -
 arch/arm/boot/dts/stm32mp131.dtsi                          | 1 -
 arch/arm/boot/dts/stm32mp151.dtsi                          | 2 --
 arch/arm64/boot/dts/mediatek/mt2712e.dtsi                  | 1 -
 arch/arm64/boot/dts/mediatek/mt8167.dtsi                   | 1 -
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi               | 1 -
 arch/arm64/boot/dts/mediatek/mt8173.dtsi                   | 1 -
 arch/arm64/boot/dts/mediatek/mt8516.dtsi                   | 1 -
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c              | 6 ------
 drivers/pinctrl/stm32/pinctrl-stm32.c                      | 5 -----
 17 files changed, 5 insertions(+), 32 deletions(-)

Comments

Linus Walleij Dec. 3, 2022, 9:22 a.m. UTC | #1
Hi Bero,

long time no see!

On Tue, Nov 29, 2022 at 3:34 AM Bernhard Rosenkränzer <bero@baylibre.com> wrote:

> During the review of my MT8365 support patchset
> (https://lore.kernel.org/linux-mediatek/20221117210356.3178578-1-bero@baylibre.com/),
> the issue of the "pins-are-numbered" DeviceTree property has come up.

(...)
> This patchset removes all uses of pins-are-numbered and marks the
> property as deprecated.

I don't remember any more why this property was introduced, but
I am happy to see it go.

> Bernhard Rosenkränzer (7):
>   pinctrl: mediatek: common: Remove check for pins-are-numbered
>   pinctrl: stm32: Remove check for pins-are-numbered
>   dt-bindings: pinctrl: mediatek,mt65xx: Deprecate pins-are-numbered
>   dt-bindings: pinctrl: st,stm32: Deprecate pins-are-numbered

I applied patches 1-4 to the pin control tree for v6.2,
please funnel the rest through mediatek/stm32 and
SoC trees!

Yours,
Linus Walleij
Bernhard Rosenkränzer Dec. 6, 2022, 4:25 p.m. UTC | #2
On Sat, Dec 3, 2022 at 10:22 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> Hi Bero,
>
> long time no see!

Hi Linus,
indeed, I've been doing mostly userland stuff lately, and my latest
kernel patch was x86 (got to keep all of my hardware working ;) ). Now
that I've changed jobs, I'm expecting to be more active on the kernel
side (though still doing a lot of userland).

> > This patchset removes all uses of pins-are-numbered and marks the
> > property as deprecated.
>
> I don't remember any more why this property was introduced, but
> I am happy to see it go.

I couldn't find why it was introduced either (and git blame wasn't
much help). I'm assuming there was some other mode in vendor trees
that never made it into mainline (but the flag for switching between
the modes did).

> I applied patches 1-4 to the pin control tree for v6.2,
> please funnel the rest through mediatek/stm32 and
> SoC trees!

Thanks! Remaining patches reposted and currently waiting.

ttyl
bero