Re: [PATCH v2 1/2] iio: adc: ti-ads112c14: add support for I2C CRC8

From: Jonathan Cameron

Date: Sun Jul 26 2026 - 21:04:04 EST


On Fri, 24 Jul 2026 10:55:06 -0500
"David Lechner (TI)" <dlechner@xxxxxxxxxxxx> wrote:

> Add support for I2C CRC8 to the TI ADS112C14 ADC driver. This verifies
> data integrity of all I2C transactions with the device.
>
> For now, it is always enabled, but it could be made optional in the
> future if needed (e.g. for higher-speed data acquisition).
>
> Signed-off-by: David Lechner (TI) <dlechner@xxxxxxxxxxxx>
> ---
> v2 changes:
> * Rebased on iio/testing.

Just one trivial thing.

...


> if (IS_ERR(data->regmap))
> return dev_err_probe(dev, PTR_ERR(data->regmap),
> "failed to init regmap\n");
> @@ -1158,6 +1274,14 @@ static int ads112c14_probe(struct i2c_client *client)
> if (ret)
> return ret;
>
> + ret = regmap_update_bits(data->regmap, ADS112C14_REG_DIGITAL_CFG,
> + ADS112C14_DIGITAL_CFG_I2C_CRC_EN,
> + ADS112C14_DIGITAL_CFG_I2C_CRC_EN);

regmap_set_bits() or maybe some future patch breaks using that?

> + if (ret)
> + return ret;
> +
> + data->i2c_crc_enabled = true;
> +
> ret = regmap_read(data->regmap, ADS112C14_REG_DEVICE_ID, &reg_val);
> if (ret)
> return ret;