Re: [PATCH v3 1/4] dt-bindings: rockchip-rga: Add PX30 compatible
flat view
From: Johan Jonker <hidden>
Date: 2020-05-07 23:01:53
Also in:
linux-arm-kernel, linux-media, linux-rockchip, lkml
Hi Paul, With help of enum each additional compatibility string with fall back 'rockchip,rk3288-rga' adds only 1 extra line instead of 3. See my and Heiko's response at the review of 'rockchip-saradc.yaml'. Re: [PATCH v1 1/3] dt-bindings: iio: adc: convert rockchip saradc bindings to yaml https://lore.kernel.org/lkml/a35bdff4-601e-6186-584e-9a0b88cf3dbb@gmail.com/ (local) The response of robh when I did something similar wrong as this patch. Re: [PATCH 1/2] dt-bindings: usb: dwc2: add compatible property for rk3328 usb https://lore.kernel.org/lkml/20200310192933.GA15236@bogus/ (local) Example of an approved patch with enum. [PATCH v2 1/2] dt-bindings: usb: dwc2: add compatible property for rk3328 usb https://lore.kernel.org/lkml/20200311122121.8912-1-jbx6244@gmail.com/ (local) Kind regards, Johan On 5/7/20 10:23 PM, Paul Kocialkowski wrote:
Hi, On Thu 30 Apr 20, 23:24, Johan Jonker wrote:quoted
Hi Paul,quoted
Add a new compatible for the PX30 Rockchip SoC, which also features a RGA block. It is compatible with the RK3288 RGA block. Signed-off-by: Paul Kocialkowski <redacted> --- Documentation/devicetree/bindings/media/rockchip-rga.yaml | 3 +++ 1 file changed, 3 insertions(+)diff --git a/Documentation/devicetree/bindings/media/rockchip-rga.yaml b/Documentation/devicetree/bindings/media/rockchip-rga.yaml index dd645ddccb07..740586299da9 100644 --- a/Documentation/devicetree/bindings/media/rockchip-rga.yaml +++ b/Documentation/devicetree/bindings/media/rockchip-rga.yaml@@ -23,6 +23,9 @@ properties:quoted
- items: - const: rockchip,rk3228-rga - const: rockchip,rk3288-rga + - items: + - const: rockchip,px30-rga + - const: rockchip,rk3288-rgaUse enum. - items: - enum: - rockchip,px30-rga - rockchip,rk3228-rga - const: rockchip,rk3288-rgaAre you sure about this? The rk3228 above does it as I did it and other examples like allwinner,sun4i-a10-csi.yaml appear to be doing the same too.
The use of enum starts from 2 or more identical fall back strings.
'allwinner,sun4i-a10-csi.yaml' has 2 different fall back strings.
properties:
compatible:
oneOf:
- const: allwinner,sun4i-a10-csi1
- const: allwinner,sun7i-a20-csi0
- items:
- const: allwinner,sun7i-a20-csi1
- const: allwinner,sun4i-a10-csi1
- items:
- const: allwinner,sun8i-r40-csi0
- const: allwinner,sun7i-a20-csi0
The case with rockchip,rk3288-rga alone already seems covered.
See yaml examples in the links above.
Cheers, Paulquoted
quoted
reg: maxItems: 1 -- 2.26.0