* Adding support for QMC5883L magnetometer to IIO subsystem
@ 2025-04-08 14:13 Brajesh Patil
2025-04-10 15:10 ` David Lechner
0 siblings, 1 reply; 3+ messages in thread
From: Brajesh Patil @ 2025-04-08 14:13 UTC (permalink / raw)
To: jic23; +Cc: linux-iio, marcelo.schmitt1
I have a QMC5883L magnetometer module that I’ve been trying to integrate with my
Raspberry Pi using a kernel-space driver. While checking the mainline kernel, I
found that there is a driver for the HMC5883L (under the hmc5843 driver), but nothing
for QMC5883L.
I compared the datasheets for both devices and confirmed that they are not
register-compatible — the QMC5883L has a different I2C address and an entirely different
register map from the HMC5883L.
Given that this sensor is widely used (often as a drop-in replacement for the
now-discontinued HMC5883L), I was thinking of writing a new driver for it under the IIO
subsystem.
Would it make sense to move forward with this? If so, I’d appreciate any guidance or
suggestions from the community.
Thanks,
Brajesh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Adding support for QMC5883L magnetometer to IIO subsystem
2025-04-08 14:13 Adding support for QMC5883L magnetometer to IIO subsystem Brajesh Patil
@ 2025-04-10 15:10 ` David Lechner
[not found] ` <CALJe6R3YfhdLKDVBZ=NgO+m64wHHqvFf5tt1T-2pWnr29wE94Q@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: David Lechner @ 2025-04-10 15:10 UTC (permalink / raw)
To: Brajesh Patil, jic23; +Cc: linux-iio, marcelo.schmitt1
On 4/8/25 9:13 AM, Brajesh Patil wrote:
> I have a QMC5883L magnetometer module that I’ve been trying to integrate with my
> Raspberry Pi using a kernel-space driver. While checking the mainline kernel, I
> found that there is a driver for the HMC5883L (under the hmc5843 driver), but nothing
> for QMC5883L.
>
> I compared the datasheets for both devices and confirmed that they are not
> register-compatible — the QMC5883L has a different I2C address and an entirely different
> register map from the HMC5883L.
>
> Given that this sensor is widely used (often as a drop-in replacement for the
> now-discontinued HMC5883L), I was thinking of writing a new driver for it under the IIO
> subsystem.
>
> Would it make sense to move forward with this? If so, I’d appreciate any guidance or
> suggestions from the community.
>
> Thanks,
> Brajesh
>
>
Go for it. :-)
My advice for writing a new driver: Don't try to implement every feature in one
patch (or even one patch series). Just start with the most basic functionality.
Then add more features in separate patches as they are needed. (Devicetree
bindings are an exception and should be as complete as possible in the first
patch.)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-11 21:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-08 14:13 Adding support for QMC5883L magnetometer to IIO subsystem Brajesh Patil
2025-04-10 15:10 ` David Lechner
[not found] ` <CALJe6R3YfhdLKDVBZ=NgO+m64wHHqvFf5tt1T-2pWnr29wE94Q@mail.gmail.com>
2025-04-11 21:34 ` David Lechner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox