* [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties
@ 2023-03-25 11:43 Krzysztof Kozlowski
2023-03-28 14:03 ` Andre Przywara
2023-03-30 13:33 ` Lee Jones
0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-25 11:43 UTC (permalink / raw)
To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Chen-Yu Tsai,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski, Andre Przywara
The syntax to disallow x-powers,drive-vbus-en,
x-powers,self-working-mode and x-powers,master-mode for certain variants
can be made simpler. Also this produces much nicer warning message when
the condition hits wrong DTS.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: Andre Przywara <andre.przywara@arm.com>
---
.../devicetree/bindings/mfd/x-powers,axp152.yaml | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
index 24d03996b93a..8eeb5b387430 100644
--- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
+++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
@@ -47,9 +47,8 @@ allOf:
- x-powers,axp209
then:
- not:
- required:
- - x-powers,drive-vbus-en
+ properties:
+ x-powers,drive-vbus-en: false
- if:
not:
@@ -59,14 +58,9 @@ allOf:
const: x-powers,axp806
then:
- allOf:
- - not:
- required:
- - x-powers,self-working-mode
-
- - not:
- required:
- - x-powers,master-mode
+ properties:
+ x-powers,self-working-mode: false
+ x-powers,master-mode: false
- if:
not:
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties
2023-03-25 11:43 [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties Krzysztof Kozlowski
@ 2023-03-28 14:03 ` Andre Przywara
2023-03-28 14:08 ` Chen-Yu Tsai
2023-03-30 13:33 ` Lee Jones
1 sibling, 1 reply; 4+ messages in thread
From: Andre Przywara @ 2023-03-28 14:03 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Chen-Yu Tsai,
devicetree, linux-kernel
On Sat, 25 Mar 2023 12:43:53 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
Hi,
> The syntax to disallow x-powers,drive-vbus-en,
> x-powers,self-working-mode and x-powers,master-mode for certain variants
> can be made simpler. Also this produces much nicer warning message when
> the condition hits wrong DTS.
Ah, indeed, that reads much nicer!
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
>
> Cc: Andre Przywara <andre.przywara@arm.com>
> ---
> .../devicetree/bindings/mfd/x-powers,axp152.yaml | 16 +++++-----------
> 1 file changed, 5 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> index 24d03996b93a..8eeb5b387430 100644
> --- a/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> +++ b/Documentation/devicetree/bindings/mfd/x-powers,axp152.yaml
> @@ -47,9 +47,8 @@ allOf:
> - x-powers,axp209
>
> then:
> - not:
> - required:
> - - x-powers,drive-vbus-en
> + properties:
> + x-powers,drive-vbus-en: false
>
> - if:
> not:
> @@ -59,14 +58,9 @@ allOf:
> const: x-powers,axp806
>
> then:
> - allOf:
> - - not:
> - required:
> - - x-powers,self-working-mode
> -
> - - not:
> - required:
> - - x-powers,master-mode
> + properties:
> + x-powers,self-working-mode: false
> + x-powers,master-mode: false
>
> - if:
> not:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties
2023-03-28 14:03 ` Andre Przywara
@ 2023-03-28 14:08 ` Chen-Yu Tsai
0 siblings, 0 replies; 4+ messages in thread
From: Chen-Yu Tsai @ 2023-03-28 14:08 UTC (permalink / raw)
To: Andre Przywara
Cc: Krzysztof Kozlowski, Lee Jones, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
On Tue, Mar 28, 2023 at 10:03 PM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Sat, 25 Mar 2023 12:43:53 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
>
> Hi,
>
> > The syntax to disallow x-powers,drive-vbus-en,
> > x-powers,self-working-mode and x-powers,master-mode for certain variants
> > can be made simpler. Also this produces much nicer warning message when
> > the condition hits wrong DTS.
>
> Ah, indeed, that reads much nicer!
>
> > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
> Tested-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties
2023-03-25 11:43 [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties Krzysztof Kozlowski
2023-03-28 14:03 ` Andre Przywara
@ 2023-03-30 13:33 ` Lee Jones
1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2023-03-30 13:33 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Chen-Yu Tsai, devicetree,
linux-kernel, Andre Przywara
On Sat, 25 Mar 2023, Krzysztof Kozlowski wrote:
> The syntax to disallow x-powers,drive-vbus-en,
> x-powers,self-working-mode and x-powers,master-mode for certain variants
> can be made simpler. Also this produces much nicer warning message when
> the condition hits wrong DTS.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Applied, thanks
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-30 13:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-25 11:43 [PATCH] dt-bindings: mfd: x-powers,axp152: simplify disallowing properties Krzysztof Kozlowski
2023-03-28 14:03 ` Andre Przywara
2023-03-28 14:08 ` Chen-Yu Tsai
2023-03-30 13:33 ` Lee Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.