[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKbn39Ek1pOVO7rb@smile.fi.intel.com>
Date: Thu, 21 Aug 2025 12:33:19 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Ben Collins <bcollins@...ter.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 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.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists