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

Jonathan Cameron <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel
Message-ID <20260727020355.731746c1@jic23-huawei>
On Fri, 24 Jul 2026 10:55:06 -0500
"David Lechner (TI)" <[email protected]> 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) <[email protected]>
> ---
> 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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.