[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1CAB4E66-23B6-41F6-9782-3F3D66AB9908@watter.com>
Date: Sat, 16 Aug 2025 09:18:09 -0400
From: Ben Collins <bcollins@...ter.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>,
linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] iio: mcp9600: Add support for thermocouple-type
> On Aug 16, 2025, at 6:11 AM, Jonathan Cameron <jic23@...nel.org> wrote:
>
> On Fri, 15 Aug 2025 16:46:06 +0000
> Ben Collins <bcollins@...ter.com> wrote:
>
>> dt-bindings documentation for this driver claims to support
>> thermocouple-type, but the driver does not actually make use of
>> the property.
>>
>> Implement usage of the property to configure the chip for the
>> selected thermocouple-type.
>>
>> Signed-off-by: Ben Collins <bcollins@...ter.com>
> Hi Ben,
>
> Just one trivial thing inline.
...
>>
>> +static int mcp9600_config(struct mcp9600_data *data)
>> +{
>> + struct i2c_client *client = data->client;
>> + int ret;
>> + u8 cfg;
>> +
>> + cfg = FIELD_PREP(MCP9600_SENSOR_TYPE_MASK,
>> + mcp9600_type_map[data->thermocouple_type]);
>> +
>> + ret = i2c_smbus_write_byte_data(client, MCP9600_SENSOR_CFG, cfg);
>> + if (ret < 0) {
>> + dev_err(&client->dev, "Failed to set sensor configuration\n");
>
> Only called from probe so use return dev_err_probe() here
Hi Johnathan. That’s correct in this patch. However, in the IIR patch
I call this when the filter is set, so it didn’t seem to make sense to
do it that way, just to change it in the next patch.
I appreciate all the feedback. I’ll get things cleaned in for v4.
Powered by blists - more mailing lists