Devicetree
 help / color / mirror / Atom feed
From: David Lechner <dlechner@baylibre.com>
To: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>,
	jic23@kernel.org, nuno.sa@analog.com, andy@kernel.org,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	mranostay@gmail.com
Cc: ~lkcamp/patches@lists.sr.ht, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev
Subject: Re: [PATCH v4] dt-bindings: iio: proximity: move LIDAR-Lite out of trivial-devices
Date: Tue, 14 Jul 2026 17:44:47 -0500	[thread overview]
Message-ID: <7b8973fd-385d-4532-8213-bb0a811081ae@baylibre.com> (raw)
In-Reply-To: <20260714215433.41259-1-rodrigo.gobbi.7@gmail.com>

On 7/14/26 4:30 PM, Rodrigo Gobbi wrote:
> The PulsedLight LIDAR-Lite v2 is currently described as a trivial device,
> but it is not one: besides the I2C interface it exposes a power-enable pin
> and a mode-control pin (the latter also used for the PWM distance output).

IIRC, we are not adding the mode-control pin to the DT bindings because
it would be an alternative to the I2C bus and not likely to be used (would
require something like a PWM controller with a non-cyclic, bidirectional
channel).

We should explain that in the commit message.

> 
> Move it to a dedicated binding file.

And add we are adding the missing properties, so should mention that too.


> While at it, document the LIDAR-Lite
> v3: it is sold by Garmin, which acquired PulsedLight, and is
> pin-compatible with the v2, so add it with "pulsedlight,lidar-lite-v2"
> as a fallback compatible.

This is a separate change, so deserves a separate patch.

The complaint in v3 was just that the removing .txt and adding .yaml should
be in the same patch.

> 
> Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
> ---
> Hi, all,
> This was on my plate and I didn't have a chance to send this before.
> 
> The vendor change is not a typo: see the discussion at [1].
> Tks and regards.

Ideally, this would be explained well enough in the commit message that
we don't need the link.

> 
> [1] https://lore.kernel.org/all/c39a2980-f5e5-44aa-9fd3-20e0658f62dc@gmail.com/
> 
> Changelog:
> v4: unify patches rather than using a series to keep the tree bisectable;
>     rewrite the commit msg, naming the devices explicitly;

We lost the IIO driver patch though. The change adding a new compatible
won't be accepted without it.

> v3: https://lore.kernel.org/all/20251102221643.9966-1-rodrigo.gobbi.7@gmail.com/
> v2: https://lore.kernel.org/all/20250801224112.135918-1-rodrigo.gobbi.7@gmail.com/
> v1: https://lore.kernel.org/all/20250701223341.36835-1-rodrigo.gobbi.7@gmail.com/
> ---
>  .../proximity/pulsedlight,lidar-lite-v2.yaml  | 54 +++++++++++++++++++
>  .../devicetree/bindings/trivial-devices.yaml  |  2 -
>  2 files changed, 54 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/iio/proximity/pulsedlight,lidar-lite-v2.yaml
> 
> diff --git a/Documentation/devicetree/bindings/iio/proximity/pulsedlight,lidar-lite-v2.yaml b/Documentation/devicetree/bindings/iio/proximity/pulsedlight,lidar-lite-v2.yaml
> new file mode 100644
> index 000000000000..60e60b7769ba
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/proximity/pulsedlight,lidar-lite-v2.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/proximity/pulsedlight,lidar-lite-v2.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Pulsedlight LIDAR-Lite v2 range-finding sensor

Could make the title more general:

	Pulsedlight/Garmin LIDAR-Lite range-finding sensors

> +
> +maintainers:
> +  - Matt Ranostay <mranostay@gmail.com>
> +
> +description: |

> +  Support for LIDAR-Lite v2 and v3 laser rangefinders. These devices

The title already says this.

> +  can use a simple I2C communication bus or can operate in a PWM mode using a
> +  mode control pin to trigger acquisitions and return the measured distance.

Probably worth mentioning the bindings are just for I2C usage for now.

Links to datasheets are also useful.

> +  They also have a power enable pin, which can be used to shut off the device.

We can see this in the properties, so don't need to say it here.

> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - grmn,lidar-lite-v3
> +          - const: pulsedlight,lidar-lite-v2
> +      - const: pulsedlight,lidar-lite-v2
> +
> +  reg:
> +    maxItems: 1
> +
> +  powerdown-gpios:
> +    description: GPIO that can be driven low to shut off power to the device.
> +    maxItems: 1
> +
> +  vdd-supply: true
> +

interrupts:
  description: 
    Mode control pin can be used as a status output to provide interrupt.
  maxItems: 1

Mode control pin can also be clock output, so we could add:

'#clock-cells':
  const: 0

if:
  required:
    interrupts
then:
  '#clock-cells': false

I only checked Lidar Lite v3 docs, so we should see if these are available
on v2 as well.

> +required:
> +  - compatible
> +  - reg
> +  - vdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        lidar@62 {
> +            compatible = "grmn,lidar-lite-v3", "pulsedlight,lidar-lite-v2";
> +            reg = <0x62>;
> +            vdd-supply = <&vdd_5v0>;
> +        };
> +    };
> +...
> diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
> index 435c4baab436..74b640c48598 100644
> --- a/Documentation/devicetree/bindings/trivial-devices.yaml
> +++ b/Documentation/devicetree/bindings/trivial-devices.yaml
> @@ -396,8 +396,6 @@ properties:
>            - onnn,adt7462
>              # 48-Lane, 12-Port PCI Express Gen 2 (5.0 GT/s) Switch
>            - plx,pex8648
> -            # Pulsedlight LIDAR range-finding sensor
> -          - pulsedlight,lidar-lite-v2
>              # Renesas HS3001 Temperature and Relative Humidity Sensors
>            - renesas,hs3001
>              # Renesas ISL29501 time-of-flight sensor


      parent reply	other threads:[~2026-07-14 22:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 21:30 [PATCH v4] dt-bindings: iio: proximity: move LIDAR-Lite out of trivial-devices Rodrigo Gobbi
2026-07-14 22:06 ` sashiko-bot
2026-07-14 22:44 ` David Lechner [this message]

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=7b8973fd-385d-4532-8213-bb0a811081ae@baylibre.com \
    --to=dlechner@baylibre.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mranostay@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    --cc=rodrigo.gobbi.7@gmail.com \
    --cc=~lkcamp/patches@lists.sr.ht \
    /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