* [RFC] iio: magnetometer: mlx90393 - regmap vs command-based access
@ 2026-04-23 12:18 Nikhil Gautam
2026-04-23 12:25 ` Nikhil Gautam
0 siblings, 1 reply; 3+ messages in thread
From: Nikhil Gautam @ 2026-04-23 12:18 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, dlechner, nuno.sa, andy, linux-kernel, Nikhil Gautam
Hi,
I am working on adding support for the MLX90393 magnetometer.
The device uses a command-based protocol (e.g. SM, RM, RR)
rather than a traditional register map.
Before proceeding, I wanted to clarify the preferred design:
- Should regmap be used in such cases, even without a linear
register map?
- Or is it acceptable to implement a custom command-based
abstraction layer?
My understanding is that regmap may not be a good fit here,
but I would appreciate guidance before implementing.
Also, pointers to similar IIO drivers would be helpful.
Thanks,
Nikhil Gautam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] iio: magnetometer: mlx90393 - regmap vs command-based access
2026-04-23 12:18 [RFC] iio: magnetometer: mlx90393 - regmap vs command-based access Nikhil Gautam
@ 2026-04-23 12:25 ` Nikhil Gautam
2026-04-23 17:43 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Nikhil Gautam @ 2026-04-23 12:25 UTC (permalink / raw)
To: linux-iio; +Cc: jic23, dlechner, nuno.sa, andy, linux-kernel, Nikhil Gautam
Hi,
Apologies for missing a few details in the previous mail.
The MLX90393 supports both I2C and SPI interfaces.
Commands include, for example:
- SM (Start Measurement)
- RM (Read Measurement)
- RR (Read Register)
Given this command-oriented interface over both I2C and SPI,
I wanted to confirm whether a custom command abstraction layer
would still be the preferred approach instead of regmap.
Thanks,
Nikhil Gautam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] iio: magnetometer: mlx90393 - regmap vs command-based access
2026-04-23 12:25 ` Nikhil Gautam
@ 2026-04-23 17:43 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-04-23 17:43 UTC (permalink / raw)
To: Nikhil Gautam; +Cc: linux-iio, jic23, dlechner, nuno.sa, andy, linux-kernel
On Thu, Apr 23, 2026 at 05:55:35PM +0530, Nikhil Gautam wrote:
>
> Apologies for missing a few details in the previous mail.
>
> The MLX90393 supports both I2C and SPI interfaces.
>
> Commands include, for example:
> - SM (Start Measurement)
> - RM (Read Measurement)
> - RR (Read Register)
>
> Given this command-oriented interface over both I2C and SPI,
> I wanted to confirm whether a custom command abstraction layer
> would still be the preferred approach instead of regmap.
I found only 4 drivers for this vendor in the kernel and they seem
either register based or eeprom based. Perhaps the latter is the
case here? Have you checked existing implementations?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-23 17:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 12:18 [RFC] iio: magnetometer: mlx90393 - regmap vs command-based access Nikhil Gautam
2026-04-23 12:25 ` Nikhil Gautam
2026-04-23 17:43 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox