From: Quentin Schulz <quentin.schulz@cherry.de>
To make it easier to read the device tree, let's add constants for the
rockchip,reset-mode property values that are currently only applicable
to RK806 PMIC.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
---
arch/arm64/boot/dts/rockchip/rk8xx.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk8xx.h b/arch/arm64/boot/dts/rockchip/rk8xx.h
new file mode 100644
index 0000000000000000000000000000000000000000..a6fbef71c06493c35b0f3697476167aaafa24f30
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk8xx.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) */
+/*
+ * Device Tree defines for Rockchip RK8xx PMICs
+ *
+ * Copyright 2025 Cherry Embedded Solutions GmbH
+ *
+ * Author: Quentin Schulz <quentin.schulz@cherry.de>
+ */
+
+#ifndef _DT_MFD_ROCKCHIP_RK8XX_H
+#define _DT_MFD_ROCKCHIP_RK8XX_H
+
+/* For use with rockchip,reset-mode property */
+#define RK806_RESTART 0
+#define RK806_RESET 1
+#define RK806_RESET_NOTIFY 2
+
+#endif
--
2.49.0
Hi, On Wed, Jun 18, 2025 at 12:32:42PM +0200, Quentin Schulz wrote: > From: Quentin Schulz <quentin.schulz@cherry.de> > > To make it easier to read the device tree, let's add constants for the > rockchip,reset-mode property values that are currently only applicable > to RK806 PMIC. > > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> > --- > arch/arm64/boot/dts/rockchip/rk8xx.h | 18 ++++++++++++++++++ I think this header should be in include/dt-bindings/, otherwise the series LGTM. Greetings, -- Sebastian > 1 file changed, 18 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk8xx.h b/arch/arm64/boot/dts/rockchip/rk8xx.h > new file mode 100644 > index 0000000000000000000000000000000000000000..a6fbef71c06493c35b0f3697476167aaafa24f30 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk8xx.h > @@ -0,0 +1,18 @@ > +/* SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) */ > +/* > + * Device Tree defines for Rockchip RK8xx PMICs > + * > + * Copyright 2025 Cherry Embedded Solutions GmbH > + * > + * Author: Quentin Schulz <quentin.schulz@cherry.de> > + */ > + > +#ifndef _DT_MFD_ROCKCHIP_RK8XX_H > +#define _DT_MFD_ROCKCHIP_RK8XX_H > + > +/* For use with rockchip,reset-mode property */ > +#define RK806_RESTART 0 > +#define RK806_RESET 1 > +#define RK806_RESET_NOTIFY 2 > + > +#endif > > -- > 2.49.0 >
Hi Sebastian, On 6/19/25 5:51 PM, Sebastian Reichel wrote: > Hi, > > On Wed, Jun 18, 2025 at 12:32:42PM +0200, Quentin Schulz wrote: >> From: Quentin Schulz <quentin.schulz@cherry.de> >> >> To make it easier to read the device tree, let's add constants for the >> rockchip,reset-mode property values that are currently only applicable >> to RK806 PMIC. >> >> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> >> --- >> arch/arm64/boot/dts/rockchip/rk8xx.h | 18 ++++++++++++++++++ > > I think this header should be in include/dt-bindings/, otherwise the v2 did that and the feedback from dt-binding people was they didn't want (as far as I understood) unused constants as ABI[1][2]. [1] https://lore.kernel.org/all/704d75df-a484-4da3-9bcb-85b480e2ecf0@kernel.org/ [2] https://lore.kernel.org/all/a9baf6b0-b668-4d10-b9de-b63eb3fd8f23@kernel.org/ Cheers, Quentin
Hi, On Mon, Jun 23, 2025 at 11:48:27AM +0200, Quentin Schulz wrote: > On 6/19/25 5:51 PM, Sebastian Reichel wrote: > > On Wed, Jun 18, 2025 at 12:32:42PM +0200, Quentin Schulz wrote: > > > From: Quentin Schulz <quentin.schulz@cherry.de> > > > > > > To make it easier to read the device tree, let's add constants for the > > > rockchip,reset-mode property values that are currently only applicable > > > to RK806 PMIC. > > > > > > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> > > > --- > > > arch/arm64/boot/dts/rockchip/rk8xx.h | 18 ++++++++++++++++++ > > > > I think this header should be in include/dt-bindings/, otherwise the > > v2 did that and the feedback from dt-binding people was they didn't want (as > far as I understood) unused constants as ABI[1][2]. > > [1] > https://lore.kernel.org/all/704d75df-a484-4da3-9bcb-85b480e2ecf0@kernel.org/ > [2] > https://lore.kernel.org/all/a9baf6b0-b668-4d10-b9de-b63eb3fd8f23@kernel.org/ I wonder if it would be considered an ABI, if the drivers would use the values like this: switch (value_from_dt) { case RK806_RESTART: case RK806_RESET: case RK806_RESET_NOTIFY: program_register(...); break; default: return dev_err_probe(dev, -EINVAL, "invalid restart setting"); } IMHO register values not being an ABI is kind of weird, as this is a very strong ABI from my POV - it's just not defined by us. But I don't intent to fight for this, so ignore my comment :) Greetings, -- Sebastian
© 2016 - 2025 Red Hat, Inc.