Re: [PATCH v3 1/2] dt-bindings: iio: magnetometer: add Melexis MLX90393

From: David Lechner

Date: Sat Jun 27 2026 - 14:41:33 EST


On 6/26/26 7:58 PM, Nikhil Gautam 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>
> ---
> .../iio/magnetometer/melexis,mlx90393.yaml | 54 +++++++++++++++++++
> MAINTAINERS | 6 +++
> 2 files changed, 60 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..33ab0be66345
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/magnetometer/melexis,mlx90393.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/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:
> + const: melexis,mlx90393
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + trigger-gpios:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - vdd-supply
> + - vddio-supply

The supplies are required but are missing from the properties and the
example. Running `make dt_binding_check` before sending would have caught
this.

See: https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html

> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + magnetometer@c {
> + compatible = "melexis,mlx90393";
> + reg = <0x0c>;
> +
> + interrupt-parent = <&gpio>;
> + interrupts = <17 IRQ_TYPE_EDGE_RISING>;
> +
> + trigger-gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
> + };
> + };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a92290fffa16..469ae3f9aa0f 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -15501,6 +15501,12 @@ F: Documentation/scsi/megaraid.rst
> F: drivers/scsi/megaraid.*
> F: drivers/scsi/megaraid/
>
> +MELEXIS MLX90393 MAGNETOMETER DRIVER
> +M: Nikhil Gautam <nikhilgtr@xxxxxxxxx>
> +L: linux-iio@xxxxxxxxxxxxxxx
> +S: Maintained
> +F: Documentation/devicetree/bindings/iio/magnetometer/melexis,mlx90393.yaml
> +
> MELEXIS MLX90614 DRIVER
> M: Crt Mori <cmo@xxxxxxxxxxx>
> L: linux-iio@xxxxxxxxxxxxxxx