Re: [PATCH v3 2/2] iio: adc: add driver for Texas Instruments TLA2528 adc

From: Maxime Chevallier

Date: Wed Nov 04 2026 - 13:38:00 EST


Hi Joshua,

On 11/4/26 14:56, Joshua Crofts wrote:

[...]

>> +static int tla2528_read(struct tla2528 *tla2528, u8 channel, int *val)
>> +{
>> + __be16 data;
>> + int ret;
>> +
>> + guard(mutex)(&tla2528->lock);
>> +
>> + ret = regmap_update_bits(tla2528->regmap, TLA2528_CHANNEL_SEL_ADR,
>> + TLA2528_CHANNEL_SEL_MANUAL_CHID, channel);
>> + if (ret)
>> + return ret;
>> +
>> + ret = i2c_master_recv(tla2528->client, (char *)&data, sizeof(data));
>> + if (ret < 0)
>> + return ret;
>>
>
> As rare as short reads may be, perhaps add a check whether the expected amount
> of bits have been returned from the device?

True yes, I'll address that. Got a sashiko review about that too :/

I'll also address the other comments in V4, thanks a lot for reviewing,

Maxime