lkml.org 
[lkml]   [2022]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/3] dt-bindings: Document ltrf216a light sensor bindings
From
On 25/03/2022 11:30, Shreeya Patel wrote:
> Add devicetree bindings for ltrf216a ambient light sensor

Full stop.

>
> Signed-off-by: Shreeya Patel <shreeya.patel@collabora.com>
> ---
> .../bindings/iio/light/liteon,ltrf216a.yaml | 42 +++++++++++++++++++
> 1 file changed, 42 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
> new file mode 100644
> index 000000000000..275d86a0353a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/liteon,ltrf216a.yaml
> @@ -0,0 +1,42 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/light/liteon,ltrf216a.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LTRF216A Ambient Light Sensor
> +
> +maintainers:
> + - Zhigang Shi <Zhigang.Shi@liteon.com>
> +
> +description: |
> + Ambient sensing with an i2c interface.
> +
> +properties:
> + compatible:
> + enum:
> + - liteon,ltrf216a
> + - ltr,ltrf216a

Make it oneOf and then you can add "deprecated" to "ltr", because I
assume it is deprecated since it is using deprecated vendor prefix and
you keep it only because there is a real world device with it.

> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + light-sensor@53 {
> + compatible = "ltr,ltrf216a";

Don't use deprecated compatible/vendor prefix.

> + reg = <0x53>;
> + };
> + };
> +...


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-03-25 13:26    [W:0.134 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site