From: Jonathan Cameron <jic23@kernel.org>
To: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <kernel@axis.com>
Subject: Re: [PATCH 1/2] dt-bindings: Document TI OPT4001 light sensor bindings
Date: Fri, 7 Apr 2023 18:58:58 +0100 [thread overview]
Message-ID: <20230407185858.1cd624e0@jic23-huawei> (raw)
In-Reply-To: <20230323-add-opt4001-driver-v1-1-1451dcc1bc8a@axis.com>
On Tue, 4 Apr 2023 11:07:42 +0200
Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com> wrote:
> Add devicetree bindings for opt4001 ambient light sensor.
>
> Signed-off-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Hi Stefan,
Please add the VDD regulator and interrupt pin to the DT binding.
Whilst the driver might not use them, the binding should describe the device
fully anyway both so that we can potentially enable control of the regulator
and use of interrupt in Linux and because other software picks up these
bindings and might need them.
The regulator is easy to handle in the driver now we have
devm_regulator_get_enable() so that probably is worth supporting from the start
even if your board has it hard wired on.
Thanks,
Jonathan
> ---
> .../devicetree/bindings/iio/light/ti,opt4001.yaml | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/iio/light/ti,opt4001.yaml b/Documentation/devicetree/bindings/iio/light/ti,opt4001.yaml
> new file mode 100644
> index 000000000000..cfd6b8b92c17
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/light/ti,opt4001.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/ti,opt4001.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments OPT4001 Ambient Light Sensor
> +
> +maintainers:
> + - Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
> +
> +description: |
> + Ambient light sensor with an i2c interface.
> + https://www.ti.com/lit/gpn/opt4001
> +
> +properties:
> + compatible:
> + enum:
> + - ti,opt4001-picostar
> + - ti,opt4001-sot-5x3
> +
> + reg:
> + maxItems: 1
> +
> +additionalProperties: false
> +
> +required:
> + - compatible
> + - reg
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + light-sensor@44 {
> + compatible = "ti,opt4001-picostar";
> + reg = <0x44>;
> + };
> + };
> +...
>
next prev parent reply other threads:[~2023-04-07 17:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 9:07 [PATCH 0/2] Support for Texas Instruments OPT4001 Ambient Light Sensor Stefan Windfeldt-Prytz
2023-04-04 9:07 ` [PATCH 1/2] dt-bindings: Document TI OPT4001 light sensor bindings Stefan Windfeldt-Prytz
2023-04-04 15:39 ` Rob Herring
2023-04-07 17:58 ` Jonathan Cameron [this message]
2023-04-04 9:07 ` [PATCH 2/2] iio: light: Add support for TI OPT4001 light sensor Stefan Windfeldt-Prytz
2023-04-07 18:20 ` Jonathan Cameron
2023-04-18 16:34 ` Krzysztof Kozlowski
2023-04-18 16:35 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230407185858.1cd624e0@jic23-huawei \
--to=jic23@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@axis.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=stefan.windfeldt-prytz@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).