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 v7 4/5] iio: mcp9600: Recognize chip id for mcp9601
Date: Wed, 20 Aug 2025 07:11:08 -0400	[thread overview]
Message-ID: <00D2ACBD-DE50-4132-8DF2-46DD97DBCE3B@watter.com> (raw)
In-Reply-To: <CAHp75VfrRJmB-Q6TM+Tiy79_q63=cOvyrePMQwi6ZbvDNUPezQ@mail.gmail.com>


> On Aug 20, 2025, at 6:07 AM, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 
> On Wed, Aug 20, 2025 at 2:45 AM 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 declerations.
> 
> declarations
> 
> ...
> 
>> +struct mcp9600_data {
>> +       struct i2c_client *client;
>> +};
>> +
>> #define MCP9600_CHANNELS(hj_num_ev, hj_ev_spec_off, cj_num_ev, cj_ev_spec_off) \
>>        {                                                                      \
>>                {                                                              \
>> @@ -123,10 +133,6 @@ static const struct iio_chan_spec mcp9600_channels[][2] = {
>>        MCP9600_CHANNELS(2, 0, 2, 0), /* Alerts: 1 2 3 4 */
>> };
>> 
>> -struct mcp9600_data {
>> -       struct i2c_client *client;
>> -};
>> -
> 
> It's not obvious why this piece of change is needed. AFAICS it's a stray change.

The explanation is in the changelog above. A follow up patch needs both struct
declarations to be where I added one and moved mcp9600_data to. It’s just ordering
so I don’t later have to forward declare new functions for filter_type, which make
use of these structs, but need to be in the iio_chan_spec mcp9600_channels[]
declaration.

I guess I could move mcp9600_data in that series, but I had this in here before
I split that series out, and it seemed simple enough to leave in.


  reply	other threads:[~2025-08-20 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-19 23:44 [PATCH v7 0/5] iio: mcp9600: Features and improvements Ben Collins
2025-08-19 23:44 ` [PATCH v7 1/5] dt-bindings: iio: mcp9600: Set default 3 for thermocouple-type Ben Collins
2025-08-19 23:44 ` [PATCH v7 2/5] dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints Ben Collins
2025-08-20  7:29   ` Krzysztof Kozlowski
2025-08-19 23:44 ` [PATCH v7 3/5] iio: mcp9600: White space and fixed width cleanup Ben Collins
2025-08-20 10:01   ` Andy Shevchenko
2025-08-19 23:44 ` [PATCH v7 4/5] iio: mcp9600: Recognize chip id for mcp9601 Ben Collins
2025-08-20 10:07   ` Andy Shevchenko
2025-08-20 11:11     ` Ben Collins [this message]
2025-08-20 11:23       ` Ben Collins
2025-08-20 13:02       ` Andy Shevchenko
2025-08-19 23:44 ` [PATCH v7 5/5] iio: mcp9600: Add support for thermocouple-type Ben Collins
2025-08-20 10:09   ` Andy Shevchenko

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=00D2ACBD-DE50-4132-8DF2-46DD97DBCE3B@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®