[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <af7881b2-811d-4805-b679-25c650a7858a@kernel.org>
Date: Thu, 12 Jun 2025 12:23:28 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: surajsonawane0215@...il.com, Jonathan Cameron <jic23@...nel.org>
Cc: David Lechner <dlechner@...libre.com>, Nuno Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: iio: chemical: Add sharp,gp2y1010au0f
On 12/06/2025 12:07, surajsonawane0215@...il.com wrote:
> +description: |
> + Optical dust sensor measuring particulate matter concentration via infrared scattering.
> + Requires ADC for analog output and GPIO for pulsed LED control with strict timing.
Wrap according to Linux coding style (so 80).
> + Datasheet: https://global.sharp/products/device/lineup/data/pdf/datasheet/gp2y1010au_appl_e.pdf
> +
> +properties:
> + compatible:
> + const: sharp,gp2y1010au0f
> +
> + reg:
> + maxItems: 1
> +
> + vdd-supply: true
> +
> + led-gpios:
> + description: GPIO connected to the sensor's LED control pin (V-LED)
> + maxItems: 1
> +
> + io-channels:
> + description: ADC channel connected to the sensor's analog output (Vo)
> + maxItems: 1
> +
> + io-channel-names:
> + const: dust
> +
> + sharp,led-on-delay-us:
> + description: |
> + Delay in microseconds after turning the LED ON before reading ADC.
> + The datasheet recommends 280µs after LED ON for accurate measurement.
> + (See Section 6-1 of the datasheet: Sampling timing = 0.28ms)
> +
Drop blank line
> + default: 280
> + minimum: 0
> + maximum: 320
> +
> + sharp,measurement-window-us:
> + description: |
> + Duration in microseconds the LED remains ON for measurement.
> + The recommended pulse width is 320µs ±20µs. (See Section 6-1)
What is the point of calling something recommended if there is no other
choice? Your schema here:
> +
> + default: 320
> + minimum: 300
> + maximum: 340
Says 360 is not allowed, so what is the meaning of recommended in such case?
> +
> +required:
> + - compatible
> + - reg
> + - led-gpios
> + - io-channels
> + - io-channel-names
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + dust_sensor {
No underscores, see DTS coding style. Not tested either, missing unit
address and testing would point it out most likely.
Best regards,
Krzysztof
Powered by blists - more mailing lists