Re: [PATCH 1/2] dt-bindings: iio: magnetometer: add QST QMC6308
From: Jorijn van der Graaf
Date: Wed Jul 15 2026 - 16:46:49 EST
Hi Siratul,
On Thu, 2026-07-16 at 00:32 +0600, Siratul Islam wrote:
> > + mount-matrix: true
> You could add this prop to the existing QMC5883l binding. See the
> comment below.
Agreed, mount-matrix is a common property and would fit the QMC5883L
binding too, whichever way the file question below goes.
> 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.
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.
Happy to fold it into qstcorp,qmc5883l.yaml in v2 if Jonathan or the
DT maintainers prefer that shape.
Thanks,
Jorijn