Re: [PATCH v7 3/5] iio: adc: versal-sysmon: add I2C driver

From: Erim, Salih

Date: Mon Jun 15 2026 - 11:47:24 EST


Hi Andy,

On 15/06/2026 15:30, Andy Shevchenko wrote:
On Mon, Jun 15, 2026 at 12:37:20AM +0100, Salih Erim wrote:
Add an I2C transport driver for the Versal SysMon block. The SysMon
provides an I2C slave interface that allows an external master to
read voltage and temperature measurements through the same register
map used by the MMIO path.

The I2C command frame is an 8-byte structure containing a 4-byte data
payload, a 2-byte register offset, and a 1-byte instruction field.
Read operations send the frame with a read instruction, then receive
a 4-byte response containing the register value.

Events are not supported on the I2C path because there is no
interrupt line and the I2C regmap backend cannot be called from
atomic context.

...

+static const struct regmap_config sysmon_i2c_regmap_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = SYSMON_REG_STRIDE,
+ .max_register = SYSMON_MAX_REG,
+ .reg_read = sysmon_i2c_reg_read,
+ .reg_write = sysmon_i2c_reg_write,
+};

No cache?

No, the registers are live ADC readings and interrupt status.
Caching would return stale voltage and temperature data.

Thanks,
Salih


--
With Best Regards,
Andy Shevchenko