From: Jonathan Cameron <jic23@kernel.org>
To: Sidharth Seela <sidharthseela@gmail.com>
Cc: Gyeyoung Baek <gye976@gmail.com>,
dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v1 2/2] Added mhz19c to compatible list in mhz19b driver.
Date: Sun, 31 Aug 2025 16:36:51 +0100 [thread overview]
Message-ID: <20250831163651.41d79348@jic23-huawei> (raw)
In-Reply-To: <CAJE-K+CiQdZ9mpqom0HdGoCqrt3v7Dkj2DM5WtumoGhhtduumQ@mail.gmail.com>
On Sun, 31 Aug 2025 13:54:20 +0545
Sidharth Seela <sidharthseela@gmail.com> wrote:
> The pin-compatiblity and UART configuration are same. Although
> documentation on mhz19c's UART commands is sparse. It can be reasonably
> thought of that the commands from mhz19b will be supported in mhz19c.
> The mhz19b document mentions all the different commands. Still the
> uncertainity is noted.
>
> Signed-off-by: Sidharth Seela <sidharthseela@gmail.com>
> ---
> drivers/iio/chemical/mhz19b.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/iio/chemical/mhz19b.c b/drivers/iio/chemical/mhz19b.c
> index 3c64154918b1..4899aad895d5 100644
> --- a/drivers/iio/chemical/mhz19b.c
> +++ b/drivers/iio/chemical/mhz19b.c
> @@ -297,7 +297,17 @@ static int mhz19b_probe(struct serdev_device *serdev)
> }
>
> static const struct of_device_id mhz19b_of_match[] = {
> + /* It should be noted that mhz19b is discontinued*/
> { .compatible = "winsen,mhz19b", },
> + /* Beware that mhz19c has same pinout, UART characteristics.But there
> + * are gaps in the official user-manual[1], specifically
> + * regarding.
> + * Calibrate Zero Point.
> + * Calibrate Span Point.
> + * Detection range setting.
If those are not documented, unless we can definitely confirm they are
present, we should not enable those features for this device.
That means you'll need more substantial driver changes and a chip_info type
structure via the data fields in these firmware match tables.
That structure would have a bunch of boolean flags for features so
we can work out what to turn on for a given part. We shouldn't expose
any interface that doesn't make sense for a given part.
Jonathan
> + * Ref [1]:
> https://www.winsen-sensor.com/d/files/infrared-gas-sensor/mh-z19c-pins-type-co2-manual-ver1_0.pdf
> + */
> + { .compatible = "winsen,mhz19c", },
> { }
> };
> MODULE_DEVICE_TABLE(of, mhz19b_of_match);
> --
> 2.39.5 (Apple Git-154)
prev parent reply other threads:[~2025-08-31 15:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 8:09 [PATCH v1 2/2] Added mhz19c to compatible list in mhz19b driver Sidharth Seela
2025-08-31 15:36 ` Jonathan Cameron [this message]
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=20250831163651.41d79348@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=gye976@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=sidharthseela@gmail.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