Re: [PATCH v8 4/5] iio: mcp9600: Recognize chip id for mcp9601

From: Ben Collins
Date: Fri Aug 22 2025 - 12:14:22 EST



> On Aug 22, 2025, at 11:57 AM, Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:
>
> On Fri, Aug 22, 2025 at 4:24 PM Ben Collins <bcollins@xxxxxxxxxx> wrote:
>>
>> The current driver works with mcp9601, but emits a warning because it
>> does not recognize the chip id.
>>
>> MCP9601 is a superset of MCP9600. The drivers works without changes
>> on this chipset.
>>
>> However, the 9601 chip supports open/closed-circuit detection if wired
>> properly, so we'll need to be able to differentiate between them.
>>
>> Moved "struct mcp9600_data" up in the file since a later patch will
>> need it and chip_info before the declarations.
>
> ...
>
>> +struct mcp9600_data {
>> + struct i2c_client *client;
>> +};
>> +
>
>> -struct mcp9600_data {
>> - struct i2c_client *client;
>> -};
>> -
>
> Seems we discussed this. And my suggestion was to defer the change to
> when it will be needed.

And my response was that it’s needed in 5/5 where I add the mcp9600_config()
function. That function will need to be before mcp9600_channels[] in the
IIR patch series.

So either I move mcp9600_data now, or I leave it and put mcp9600_config()
below it, and then in the IIR series I’ll have to move both up.

Didn’t seem to make sense to move 30 lines of code later when I can move
3 lines now.

Regards,
Ben