[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025082107-spiritual-centipede-ae66d0@boujee-and-buff>
Date: Thu, 21 Aug 2025 07:14:21 -0400
From: Ben Collins <bcollins@...ter.com>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: Jonathan Cameron <jic23@...nel.org>,
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 v4 3/5] iio: mcp9600: Recognize chip id for mcp9601
On Thu, Aug 21, 2025 at 12:33:19PM -0500, Andy Shevchenko wrote:
> On Sun, Aug 17, 2025 at 11:50:51PM -0400, Ben Collins 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.
>
> ...
>
> > static int mcp9600_probe(struct i2c_client *client)
> > {
> > + const struct mcp_chip_info *chip_info = i2c_get_match_data(client);
>
> I believe I have commented on this already, please, split assignment...
>
> > struct iio_dev *indio_dev;
> > struct mcp9600_data *data;
> > - int ret, ch_sel;
> > + int ch_sel, dev_id, ret;
>
> ...and put it here.
>
> > + if (chip_info == NULL)
> > + return dev_err_probe(&client->dev, -EINVAL,
> > + "No chip-info found for device\n");
>
> Wrong indentation.
>
> Besides that I have commented as well on
>
> struct device *dev = &client->dev;
>
> at the top that helps to make the code neater.
>
> ...
>
> Since it seems the comments were ignored, I stopped here. Please, find previous
> emails, take your time and fine grain the result for the next version.
You're looking at v4. The latest is v7.
--
Ben Collins
https://libjwt.io
https://github.com/benmcollins
--
3EC9 7598 1672 961A 1139 173A 5D5A 57C7 242B 22CF
Powered by blists - more mailing lists