diff mbox series

[2/2] include: dt-bindings: rockchip: remove RK_FUNC defines

Message ID 20191015191000.2890-2-jbx6244@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/2] arm64: dts: rockchip: rk3399-rock-pi-4: restyle rockchip, pins | expand

Commit Message

Johan Jonker Oct. 15, 2019, 7:10 p.m. UTC
The defines RK_FUNC_1, RK_FUNC_2, RK_FUNC_3 and RK_FUNC_4
are no longer used, so remove them to prevent
that someone start using them again.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
 include/dt-bindings/pinctrl/rockchip.h | 4 ----
 1 file changed, 4 deletions(-)

Comments

Heiko Stübner Oct. 15, 2019, 8:10 p.m. UTC | #1
Hi Johan,

Am Dienstag, 15. Oktober 2019, 21:10:00 CEST schrieb Johan Jonker:
> The defines RK_FUNC_1, RK_FUNC_2, RK_FUNC_3 and RK_FUNC_4
> are no longer used, so remove them to prevent
> that someone start using them again.

That won't work. Devicetree provides a slightly flexible promise of
backwards compatibilty. So a new kernel should still work old devicetrees.
(not exactly sure if this means dt-binaries and sources or only binaries)

So while I think RK_FUNC_0-n should not be used anymore, we should
probably just mark them as "deprecated" in a first step.


Heiko


> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
>  include/dt-bindings/pinctrl/rockchip.h | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/include/dt-bindings/pinctrl/rockchip.h b/include/dt-bindings/pinctrl/rockchip.h
> index dc5c1c73d..2798b6c03 100644
> --- a/include/dt-bindings/pinctrl/rockchip.h
> +++ b/include/dt-bindings/pinctrl/rockchip.h
> @@ -50,9 +50,5 @@
>  #define RK_PD7		31
>  
>  #define RK_FUNC_GPIO	0
> -#define RK_FUNC_1	1
> -#define RK_FUNC_2	2
> -#define RK_FUNC_3	3
> -#define RK_FUNC_4	4
>  
>  #endif
>
Johan Jonker Oct. 15, 2019, 8:26 p.m. UTC | #2
Hi Heiko,

What's the plan for RK_FUNC_GPIO ? Change all to '0' or keep it?

On 10/15/19 10:10 PM, Heiko Stuebner wrote:
> Hi Johan,
> 
> Am Dienstag, 15. Oktober 2019, 21:10:00 CEST schrieb Johan Jonker:
>> The defines RK_FUNC_1, RK_FUNC_2, RK_FUNC_3 and RK_FUNC_4
>> are no longer used, so remove them to prevent
>> that someone start using them again.
> 
> That won't work. Devicetree provides a slightly flexible promise of
> backwards compatibilty. So a new kernel should still work old devicetrees.
> (not exactly sure if this means dt-binaries and sources or only binaries)
> 
> So while I think RK_FUNC_0-n should not be used anymore, we should
> probably just mark them as "deprecated" in a first step.
> 
> 
> Heiko
Heiko Stübner Oct. 15, 2019, 8:32 p.m. UTC | #3
Am Dienstag, 15. Oktober 2019, 22:26:14 CEST schrieb Johan Jonker:
> Hi Heiko,
> 
> What's the plan for RK_FUNC_GPIO ? Change all to '0' or keep it?

RK_FUNC_GPIO I'd like to keep :-) .

Basic rationale is that mapping RK_FUNC_1 -> 1, RK_FUNC_2 -> 2, etc does
not provide any additional value, while telling it explicitly that we're
mapping to the gpio function does.

Heiko

> 
> On 10/15/19 10:10 PM, Heiko Stuebner wrote:
> > Hi Johan,
> > 
> > Am Dienstag, 15. Oktober 2019, 21:10:00 CEST schrieb Johan Jonker:
> >> The defines RK_FUNC_1, RK_FUNC_2, RK_FUNC_3 and RK_FUNC_4
> >> are no longer used, so remove them to prevent
> >> that someone start using them again.
> > 
> > That won't work. Devicetree provides a slightly flexible promise of
> > backwards compatibilty. So a new kernel should still work old devicetrees.
> > (not exactly sure if this means dt-binaries and sources or only binaries)
> > 
> > So while I think RK_FUNC_0-n should not be used anymore, we should
> > probably just mark them as "deprecated" in a first step.
> > 
> > 
> > Heiko
> 
>
diff mbox series

Patch

diff --git a/include/dt-bindings/pinctrl/rockchip.h b/include/dt-bindings/pinctrl/rockchip.h
index dc5c1c73d..2798b6c03 100644
--- a/include/dt-bindings/pinctrl/rockchip.h
+++ b/include/dt-bindings/pinctrl/rockchip.h
@@ -50,9 +50,5 @@ 
 #define RK_PD7		31
 
 #define RK_FUNC_GPIO	0
-#define RK_FUNC_1	1
-#define RK_FUNC_2	2
-#define RK_FUNC_3	3
-#define RK_FUNC_4	4
 
 #endif