diff mbox series

[3/9] media: dt-bindings: cec: convert common CEC properties to DT schema

Message ID 20221204182908.138910-3-krzysztof.kozlowski@linaro.org (mailing list archive)
State Accepted
Commit f4b0b85e171b2a1f99126b8feb93fd1fcc98fdac
Headers show
Series [1/9] media: dt-bindings: amlogic,meson-gx-ao-cec: move to cec subfolder | expand

Commit Message

Krzysztof Kozlowski Dec. 4, 2022, 6:29 p.m. UTC
Convert common HDMI CEC adapter bindings to DT schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/media/cec.txt         |  8 ------
 .../bindings/media/cec/cec-common.yaml        | 28 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 29 insertions(+), 9 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/cec.txt
 create mode 100644 Documentation/devicetree/bindings/media/cec/cec-common.yaml

Comments

Hans Verkuil Dec. 5, 2022, 8:07 a.m. UTC | #1
On 04/12/2022 19:29, Krzysztof Kozlowski wrote:
> Convert common HDMI CEC adapter bindings to DT schema.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Thanks!

	Hans

> ---
>  .../devicetree/bindings/media/cec.txt         |  8 ------
>  .../bindings/media/cec/cec-common.yaml        | 28 +++++++++++++++++++
>  MAINTAINERS                                   |  2 +-
>  3 files changed, 29 insertions(+), 9 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/media/cec.txt
>  create mode 100644 Documentation/devicetree/bindings/media/cec/cec-common.yaml
> 
> diff --git a/Documentation/devicetree/bindings/media/cec.txt b/Documentation/devicetree/bindings/media/cec.txt
> deleted file mode 100644
> index 22d7aae3d3d7..000000000000
> --- a/Documentation/devicetree/bindings/media/cec.txt
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -Common bindings for HDMI CEC adapters
> -
> -- hdmi-phandle: phandle to the HDMI controller.
> -
> -- needs-hpd: if present the CEC support is only available when the HPD
> -  is high. Some boards only let the CEC pin through if the HPD is high,
> -  for example if there is a level converter that uses the HPD to power
> -  up or down.
> diff --git a/Documentation/devicetree/bindings/media/cec/cec-common.yaml b/Documentation/devicetree/bindings/media/cec/cec-common.yaml
> new file mode 100644
> index 000000000000..af6ee5f1c73f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/cec/cec-common.yaml
> @@ -0,0 +1,28 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/cec/cec-common.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: HDMI CEC Adapters Common Properties
> +
> +maintainers:
> +  - Hans Verkuil <hverkuil@xs4all.nl>
> +
> +properties:
> +  $nodename:
> +    pattern: "^cec(@[0-9a-f]+|-[0-9]+)?$"
> +
> +  hdmi-phandle:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      Phandle to the HDMI controller.
> +
> +  needs-hpd:
> +    type: boolean
> +    description:
> +      The CEC support is only available when the HPD is high. Some boards only
> +      let the CEC pin through if the HPD is high, for example if there is a
> +      level converter that uses the HPD to power up or down.
> +
> +additionalProperties: true
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 07cb85cac4c3..45402e03cda5 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -4832,7 +4832,7 @@ S:	Supported
>  W:	http://linuxtv.org
>  T:	git git://linuxtv.org/media_tree.git
>  F:	Documentation/ABI/testing/debugfs-cec-error-inj
> -F:	Documentation/devicetree/bindings/media/cec.txt
> +F:	Documentation/devicetree/bindings/media/cec/cec-common.yaml
>  F:	Documentation/driver-api/media/cec-core.rst
>  F:	Documentation/userspace-api/media/cec
>  F:	drivers/media/cec/
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/cec.txt b/Documentation/devicetree/bindings/media/cec.txt
deleted file mode 100644
index 22d7aae3d3d7..000000000000
--- a/Documentation/devicetree/bindings/media/cec.txt
+++ /dev/null
@@ -1,8 +0,0 @@ 
-Common bindings for HDMI CEC adapters
-
-- hdmi-phandle: phandle to the HDMI controller.
-
-- needs-hpd: if present the CEC support is only available when the HPD
-  is high. Some boards only let the CEC pin through if the HPD is high,
-  for example if there is a level converter that uses the HPD to power
-  up or down.
diff --git a/Documentation/devicetree/bindings/media/cec/cec-common.yaml b/Documentation/devicetree/bindings/media/cec/cec-common.yaml
new file mode 100644
index 000000000000..af6ee5f1c73f
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/cec/cec-common.yaml
@@ -0,0 +1,28 @@ 
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/cec/cec-common.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: HDMI CEC Adapters Common Properties
+
+maintainers:
+  - Hans Verkuil <hverkuil@xs4all.nl>
+
+properties:
+  $nodename:
+    pattern: "^cec(@[0-9a-f]+|-[0-9]+)?$"
+
+  hdmi-phandle:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle to the HDMI controller.
+
+  needs-hpd:
+    type: boolean
+    description:
+      The CEC support is only available when the HPD is high. Some boards only
+      let the CEC pin through if the HPD is high, for example if there is a
+      level converter that uses the HPD to power up or down.
+
+additionalProperties: true
diff --git a/MAINTAINERS b/MAINTAINERS
index 07cb85cac4c3..45402e03cda5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4832,7 +4832,7 @@  S:	Supported
 W:	http://linuxtv.org
 T:	git git://linuxtv.org/media_tree.git
 F:	Documentation/ABI/testing/debugfs-cec-error-inj
-F:	Documentation/devicetree/bindings/media/cec.txt
+F:	Documentation/devicetree/bindings/media/cec/cec-common.yaml
 F:	Documentation/driver-api/media/cec-core.rst
 F:	Documentation/userspace-api/media/cec
 F:	drivers/media/cec/