Re: [RFC PATCH 1/2] dt-bindings: iio: magnetometer: add Melexis MLX90393
From: Jonathan Cameron
Date: Mon May 11 2026 - 10:00:33 EST
On Mon, 11 May 2026 00:40:09 +0530
Nikhil Gautam <nikhilgtr@xxxxxxxxx> wrote:
> Add devicetree bindings for the Melexis MLX90393
> 3-axis magnetometer and temperature sensor.
>
> The device supports magnetic field and temperature
> measurements over I2C and SPI interfaces.
>
> This initial binding documents the I2C interface.
>
> Signed-off-by: Nikhil Gautam <nikhilgtr@xxxxxxxxx>
Hi Nikhil,
Add a MAINTAINERS entry as part of this patch and expand it in patch 2 to cover
the driver. That's much cleaner than doing it after the fact as a separate patch.
> ---
> .../iio/magnetometer/melexis,mlx90393.yaml | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/melexis,mlx90393.yaml
>
> diff --git a/Documentation/devicetree/bindings/iio/magnetometer/melexis,mlx90393.yaml b/Documentation/devicetree/bindings/iio/magnetometer/melexis,mlx90393.yaml
> new file mode 100644
> index 000000000000..b99629ff2585
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/melexis,mlx90393.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/magnetometer/melexis,mlx90393.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Melexis MLX90393 magnetometer sensor
> +
> +maintainers:
> + - Nikhil Gautam <nikhilgtr@xxxxxxxxx>
> +
> +description:
> + Melexis MLX90393 3-axis magnetometer and temperature sensor.
> +
> +properties:
> + compatible:
> + enum:
> + - melexis,mlx90393
> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
Definitely require some power... Looks like vdd-supply and vddio-supply
Also binding in general should be as complete as possible, even if the
driver you are sending it with only supports some stuff to start with.
So looks like there is an interrupt and a trigger pin that can possibly
be used with a GPIO. Seems they may be the same pin from the pinout so
maybe don't bother with trig.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + magnetometer@c {
> + compatible = "melexis,mlx90393";
> + reg = <0x0c>;
> + };
> + };