From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Ben Collins <bcollins@watter.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 3/5] iio: mcp9600: Recognize chip id for mcp9601
Date: Thu, 21 Aug 2025 12:33:19 +0300 [thread overview]
Message-ID: <aKbn39Ek1pOVO7rb@smile.fi.intel.com> (raw)
In-Reply-To: <20250818035053.32626-4-bcollins@watter.com>
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
next prev parent reply other threads:[~2025-08-21 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 3:50 [PATCH v4 0/5] iio: mcp9600: Features and improvements Ben Collins
2025-08-18 3:50 ` [PATCH v4 1/5] dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints Ben Collins
2025-08-18 3:50 ` [PATCH v4 2/5] iio: mcp9600: White space and fixed width cleanup Ben Collins
2025-08-21 9:30 ` Andy Shevchenko
2025-08-18 3:50 ` [PATCH v4 3/5] iio: mcp9600: Recognize chip id for mcp9601 Ben Collins
2025-08-21 9:33 ` Andy Shevchenko [this message]
2025-08-21 11:14 ` Ben Collins
2025-08-21 11:25 ` Andy Shevchenko
2025-08-18 3:50 ` [PATCH v4 4/5] iio: mcp9600: Add support for thermocouple-type Ben Collins
2025-08-18 3:50 ` [PATCH v4 5/5] iio: mcp9600: Add support for IIR filter Ben Collins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKbn39Ek1pOVO7rb@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=bcollins@watter.com \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®