mbox series

[V2,0/3] pinctrl/arm: dt-bindings: k3: Deprecate header with register constants

Message ID 20230315155228.1566883-1-nm@ti.com
Headers show
Series pinctrl/arm: dt-bindings: k3: Deprecate header with register constants | expand

Message

Nishanth Menon March 15, 2023, 3:52 p.m. UTC
Hi,

This is an updated series to move the pinctrl bindings over to arch as
the definitions are hardware definitions without driver usage.

This series was triggered by the discussion in [1]

v1: https://lore.kernel.org/linux-arm-kernel/20230311131325.9750-1-nm@ti.com/

Nishanth Menon (3):
  dt-bindings: net: ti: k3-am654-cpsw-nuss: Drop pinmux header
  arm64: dts: ti: Use local header for pinctrl register values
  dt-bindings: pinctrl: k3: Deprecate header with register constants

 .../devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml     | 1 -
 arch/arm64/boot/dts/ti/k3-am62.dtsi                        | 3 ++-
 arch/arm64/boot/dts/ti/k3-am62a.dtsi                       | 3 ++-
 arch/arm64/boot/dts/ti/k3-am64.dtsi                        | 3 ++-
 arch/arm64/boot/dts/ti/k3-am65.dtsi                        | 3 ++-
 arch/arm64/boot/dts/ti/k3-j7200.dtsi                       | 3 ++-
 arch/arm64/boot/dts/ti/k3-j721e.dtsi                       | 3 ++-
 arch/arm64/boot/dts/ti/k3-j721s2.dtsi                      | 3 ++-
 arch/arm64/boot/dts/ti/k3-j784s4.dtsi                      | 3 ++-
 .../pinctrl/k3.h => arch/arm64/boot/dts/ti/k3-pinctrl.h    | 6 +++---
 include/dt-bindings/pinctrl/k3.h                           | 7 +++++++
 11 files changed, 26 insertions(+), 12 deletions(-)
 copy include/dt-bindings/pinctrl/k3.h => arch/arm64/boot/dts/ti/k3-pinctrl.h (93%)

[1] https://lore.kernel.org/all/c4d53e9c-dac0-8ccc-dc86-faada324beba@linaro.org/

Comments

Krzysztof Kozlowski March 16, 2023, 6:36 a.m. UTC | #1
On 15/03/2023 16:52, Nishanth Menon wrote:
> The DTS uses hardware register values directly in pin controller pin
> configuration and not an abstraction of any form.
> 
> These definitions were previously put in the bindings header to avoid
> code duplication and to provide some context meaning (name), but they
> do not fit the purpose of bindings.
> 
> Store the constants in a header next to DTS and use them instead of
> bindings.
> 
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Suggested-by: Linus Walleij <linus.walleij@linaro.org>
> Link: https://lore.kernel.org/all/c4d53e9c-dac0-8ccc-dc86-faada324beba@linaro.org/
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Krzysztof Kozlowski March 16, 2023, 6:36 a.m. UTC | #2
On 15/03/2023 16:52, Nishanth Menon wrote:
> For convenience (less code duplication), the pin controller pin
> configuration register values were defined in the bindings header.
> These are not some IDs or other abstraction layer but raw numbers used
> in the registers.
> 
> These constants do not fit the purpose of bindings. They do not
> provide any abstraction, any hardware and driver independent ID. In
> fact, the Linux pinctrl-single driver actually do not use the bindings
> header at all.
> 
> All of the constants were moved already to headers local to DTS
> (residing in DTS directory), so remove any references to the bindings
> header and add a warning that it is deprecated.
> 
> Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Link: https://lore.kernel.org/linux-arm-kernel/71c7feff-4189-f12f-7353-bce41a61119d@linaro.org/
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
> New patch in V2 series and we expect to remove this header after a kernel
> rev.
> 
>  include/dt-bindings/pinctrl/k3.h | 7 +++++++
>  1 file changed, 7 insertions(+)

This should go to the same branch as DTS, so not pinctrl tree, to avoid
warnings.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Nishanth Menon March 20, 2023, 10:51 p.m. UTC | #3
Hi Nishanth Menon,

On Wed, 15 Mar 2023 10:52:25 -0500, Nishanth Menon wrote:
> This is an updated series to move the pinctrl bindings over to arch as
> the definitions are hardware definitions without driver usage.
> 
> This series was triggered by the discussion in [1]
> 
> v1: https://lore.kernel.org/linux-arm-kernel/20230311131325.9750-1-nm@ti.com/
> 
> [...]

I have applied the following to branch ti-k3-dts-next on [1].
Thank you!

[1/3] dt-bindings: net: ti: k3-am654-cpsw-nuss: Drop pinmux header
      commit: c680fa2a09a9550284546d2deeb31640ec3b56c8
[2/3] arm64: dts: ti: Use local header for pinctrl register values
      commit: fe49f2d776f7994dc60dd04712a437fd0bdc67a0
[3/3] dt-bindings: pinctrl: k3: Deprecate header with register constants
      commit: f2de003e1426ccbefa281a066040da7699f6d461

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent up the chain during
the next merge window (or sooner if it is a relevant bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git