Re: [PATCH 1/2] dt-bindings: iio: magnetometer: add QST QMC6308
From: Siratul Islam
Date: Wed Jul 15 2026 - 18:17:08 EST
July 16, 2026 at 2:46 AM, "Jorijn van der Graaf" <jorijnvdgraaf@xxxxxxxxxxxxx mailto:jorijnvdgraaf@xxxxxxxxxxxxx?to=%22Jorijn%20van%20der%20Graaf%22%20%3Cjorijnvdgraaf%40catcrafts.net%3E > wrote:
>
> Hi Siratul,
>
> On Thu, 2026-07-16 at 00:32 +0600, Siratul Islam wrote:
>
...
>
> >
> > I usually don't bother with bindings. But here I have some thoughts.
> > You could reuse the QMC5883L binding. As for the device lacking both
> > interrupt and vddio pins, you could exclude them like
> >
> > allOf:
> > - if:
> > properties:
> > compatible:
> > contains:
> > const: qstcorp,qmc6308
> > then:
> > properties:
> > interrupts: false
> > vddio-supply: false
> >
> > But you would also need to remove the global required vddio-supply and
> > make it required for qmc5883l.
> > Or flip the logic of allOf. Considering a lot of the magnetometer
> > bindings look very similar anyway, I'm not sure if it's worth
> > combining them. Maybe Jonathan or DT maintainers would have a better
> > opinion.
> >
> I'd lean towards keeping the separate file.
Wait for more feedback before deciding, since you have a few days before
you send v2. DT maintainers usually prefer reusing the same file where possible.
> The two schemas share only compatible/reg/vdd-supply: the QMC5883L has
> an interrupt pin and requires vddio-supply, while the QMC6308 (a 4-pin
> WLCSP) has neither. So a combined document would be mostly conditional
> machinery - the block you sketch plus a second one (or the flipped
> allOf you mention) for the required list. And as the two chips are not
> register-compatible, there is no fallback-compatible relationship to
> express either.
Register compatibility is driver specific. Bindings are only for describing hardware.
So if there are reasons to use separate bindings, this isn't one of them. A fallback-compatible
relationship isn't needed, as we are already using an enum to list which different sensors
the binding supports.
>
> Happy to fold it into qstcorp,qmc5883l.yaml in v2 if Jonathan or the
> DT maintainers prefer that shape.
>
> Thanks,
> Jorijn
>
--
Best regards,
Sirat