2020-05-12 20:37:30

by Johan Jonker

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2.dts

The defines RK_FUNC_1 and RK_FUNC_2 are deprecated,
so replace them with the preferred form.
Restyle properties in the same line.

Signed-off-by: Johan Jonker <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
index fe253669b..46826b6e2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts
@@ -543,18 +543,15 @@
};

soc_slppin_gpio: soc_slppin_gpio {
- rockchip,pins =
- <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
+ rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
};

soc_slppin_rst: soc_slppin_rst {
- rockchip,pins =
- <0 RK_PA4 RK_FUNC_2 &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PA4 2 &pcfg_pull_none>;
};

soc_slppin_slp: soc_slppin_slp {
- rockchip,pins =
- <0 RK_PA4 RK_FUNC_1 &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PA4 1 &pcfg_pull_none>;
};
};
};
--
2.11.0


2020-05-12 20:38:29

by Johan Jonker

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: pinctrl: rockchip: update example

The Rockchip dtsi and dts files have been bulk-converted for the
remaining raw gpio numbers into their descriptive counterparts and
also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x
mappings, so update the example as well.

Signed-off-by: Johan Jonker <[email protected]>
---
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
index 2113cfaa2..d3eae61a3 100644
--- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt
@@ -110,8 +110,8 @@ pinctrl@20008000 {

uart2 {
uart2_xfer: uart2-xfer {
- rockchip,pins = <RK_GPIO1 8 1 &pcfg_pull_default>,
- <RK_GPIO1 9 1 &pcfg_pull_default>;
+ rockchip,pins = <1 RK_PB0 1 &pcfg_pull_default>,
+ <1 RK_PB1 1 &pcfg_pull_default>;
};
};
};
--
2.11.0

2020-05-12 20:39:56

by Johan Jonker

[permalink] [raw]
Subject: [PATCH 3/3] include: dt-bindings: rockchip: remove unused defines

The Rockchip dtsi and dts files have been bulk-converted for the
remaining raw gpio numbers into their descriptive counterparts and
also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x
mappings, so remove the unused defines in 'rockchip.h' to prevent
that someone start using them again.

Signed-off-by: Johan Jonker <[email protected]>
---
include/dt-bindings/pinctrl/rockchip.h | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/include/dt-bindings/pinctrl/rockchip.h b/include/dt-bindings/pinctrl/rockchip.h
index 6d6bac1c2..5f291045e 100644
--- a/include/dt-bindings/pinctrl/rockchip.h
+++ b/include/dt-bindings/pinctrl/rockchip.h
@@ -9,13 +9,6 @@
#ifndef __DT_BINDINGS_ROCKCHIP_PINCTRL_H__
#define __DT_BINDINGS_ROCKCHIP_PINCTRL_H__

-#define RK_GPIO0 0
-#define RK_GPIO1 1
-#define RK_GPIO2 2
-#define RK_GPIO3 3
-#define RK_GPIO4 4
-#define RK_GPIO6 6
-
#define RK_PA0 0
#define RK_PA1 1
#define RK_PA2 2
@@ -50,9 +43,5 @@
#define RK_PD7 31

#define RK_FUNC_GPIO 0
-#define RK_FUNC_1 1 /* deprecated */
-#define RK_FUNC_2 2 /* deprecated */
-#define RK_FUNC_3 3 /* deprecated */
-#define RK_FUNC_4 4 /* deprecated */

#endif
--
2.11.0

2020-05-18 07:22:40

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: pinctrl: rockchip: update example

On Tue, May 12, 2020 at 10:35 PM Johan Jonker <[email protected]> wrote:

> The Rockchip dtsi and dts files have been bulk-converted for the
> remaining raw gpio numbers into their descriptive counterparts and
> also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x
> mappings, so update the example as well.
>
> Signed-off-by: Johan Jonker <[email protected]>

This patch applied to the pinctrl tree.

Yours,
Linus Walleij

2020-05-18 07:26:13

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 3/3] include: dt-bindings: rockchip: remove unused defines

On Tue, May 12, 2020 at 10:35 PM Johan Jonker <[email protected]> wrote:

> The Rockchip dtsi and dts files have been bulk-converted for the
> remaining raw gpio numbers into their descriptive counterparts and
> also got rid of the unhelpful RK_FUNC_x -> x and RK_GPIOx -> x
> mappings, so remove the unused defines in 'rockchip.h' to prevent
> that someone start using them again.
>
> Signed-off-by: Johan Jonker <[email protected]>

Acked-by: Linus Walleij <[email protected]>

I think patch 1 & 3 needs to be applied to the Rockchip tree.

Yours,
Linus Walleij

2020-05-18 22:30:31

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2.dts

On Tue, 12 May 2020 22:35:22 +0200, Johan Jonker wrote:
> The defines RK_FUNC_1 and RK_FUNC_2 are deprecated,
> so replace them with the preferred form.
> Restyle properties in the same line.

Applied, thanks!

[1/2] arm64: dts: rockchip: replace RK_FUNC defines in rk3326-odroid-go2
commit: 213f272b754f4e27aeab9d1265c775610e612bb7
[2/2] include: dt-bindings: rockchip: remove unused defines
commit: d09855bdd8c4d4eb6e58b8546318ebb5859a513c

Best regards,
--
Heiko Stuebner <[email protected]>