mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Collins <bcollins@watter.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Andrew Hepp" <andrew.hepp@ahepp.dev>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 4/5] iio: mcp9600: Recognize chip id for mcp9601
Date: Fri, 22 Aug 2025 12:06:51 -0400	[thread overview]
Message-ID: <7C976B5E-781D-472B-B2C8-3AD22550E036@watter.com> (raw)
In-Reply-To: <CAHp75VdMCY3=bL2t7zWw0D1WqtiLXrWi+ptjpaxK16b8J1KVSg@mail.gmail.com>


> On Aug 22, 2025, at 11:57 AM, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 
> On Fri, Aug 22, 2025 at 4:24 PM Ben Collins <bcollins@watter.com> 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.
>> 
>> Moved "struct mcp9600_data" up in the file since a later patch will
>> need it and chip_info before the declarations.
> 
> ...
> 
>> +struct mcp9600_data {
>> +       struct i2c_client *client;
>> +};
>> +
> 
>> -struct mcp9600_data {
>> -       struct i2c_client *client;
>> -};
>> -
> 
> Seems we discussed this. And my suggestion was to defer the change to
> when it will be needed.

And my response was that it’s needed in 5/5 where I add the mcp9600_config()
function. That function will need to be before mcp9600_channels[] in the
IIR patch series.

So either I move mcp9600_data now, or I leave it and put mcp9600_config()
below it, and then in the IIR series I’ll have to move both up.

Didn’t seem to make sense to move 30 lines of code later when I can move
3 lines now.

Regards,
  Ben

  reply	other threads:[~2025-08-22 16:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-22 13:23 [PATCH v8 0/5] iio: mcp9600: Features and improvements Ben Collins
2025-08-22 13:23 ` [PATCH v8 1/5] dt-bindings: iio: mcp9600: Set default 3 for thermocouple-type Ben Collins
2025-08-23 16:06   ` David Lechner
2025-08-22 13:23 ` [PATCH v8 2/5] dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints Ben Collins
2025-08-23 16:06   ` David Lechner
2025-08-23 16:09     ` David Lechner
2025-08-22 13:23 ` [PATCH v8 3/5] iio: mcp9600: White space and fixed width cleanup Ben Collins
2025-08-22 13:23 ` [PATCH v8 4/5] iio: mcp9600: Recognize chip id for mcp9601 Ben Collins
2025-08-22 15:57   ` Andy Shevchenko
2025-08-22 16:06     ` Ben Collins [this message]
2025-08-22 16:47       ` Andy Shevchenko
2025-08-25  9:36         ` Jonathan Cameron
2025-08-22 13:23 ` [PATCH v8 5/5] iio: mcp9600: Add support for thermocouple-type Ben Collins
2025-08-25  9:38 ` [PATCH v8 0/5] iio: mcp9600: Features and improvements Jonathan Cameron
2025-08-25 10:04   ` 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=7C976B5E-781D-472B-B2C8-3AD22550E036@watter.com \
    --to=bcollins@watter.com \
    --cc=andrew.hepp@ahepp.dev \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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®