lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250816160927.534dfa12@jic23-huawei>
Date: Sat, 16 Aug 2025 16:09:27 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Ben Collins <bcollins@...ter.com>
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 Sat, 16 Aug 2025 09:18:09 -0400
Ben Collins <bcollins@...ter.com> wrote:

> > 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.
Ah. Fair enough then. Leave it as it is and thanks for pointing this out.

Jonathan


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ