From: Jonathan Cameron <jic23@kernel.org>
To: Louis Adamian <adamianlouis@gmail.com>
Cc: "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 v3 5/5] iio: pressure: ms5637: Add per-variant compensation
Date: Fri, 21 Aug 2026 02:01:22 +0100 [thread overview]
Message-ID: <20260821020122.1c2cc7dc@jic23-huawei> (raw)
In-Reply-To: <20260820141224.23730-6-adamianlouis@gmail.com>
On Thu, 20 Aug 2026 10:12:20 -0400
Louis Adamian <adamianlouis@gmail.com> wrote:
> Previously, all sensors used the compensation for the MS5637-02BA. Add
> correct temperature compensation for MS5637-30BA, MS5803-01BA,
> MS5803-02BA, MS5803-05BA, MS5803-14BA, MS5803-30BA, MS5805, MS5837-02BA
> and MS5837-30BA.
>
> The deprecated meas,ms5803, meas,ms5637 and meas,ms5837 compatibles
> resolve to the -02BA variants. This changes the values that meas,ms5803
> and meas,ms5837 report.
>
> meas,ms5805 now uses its own constants, correcting its readings. MS8607
> gets its own constants struct. The values match the MS5637-02BA ones it
> previously shared, so its readings are unchanged.
>
> Signed-off-by: Louis Adamian <adamianlouis@gmail.com>
For this one Sashiko raises a valid concern. The ABI is changing for
those deprecated choices. To avoid that will require a slightly
annoying dance with extra copies of the data to keep the old name.
One other question below.
> ---
> drivers/iio/pressure/ms5637.c | 376 ++++++++++++++++++++++++++++++++--
> 1 file changed, 360 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/iio/pressure/ms5637.c b/drivers/iio/pressure/ms5637.c
> index 359f3a8e79b2..81b87b79e011 100644
> --- a/drivers/iio/pressure/ms5637.c
> +++ b/drivers/iio/pressure/ms5637.c
> +/*
> + * MS5805-02BA01 compensation constants
> + * Datasheet: https://www.te.com/commerce/DocumentDelivery/DDEController?Action=srchrtrv&DocNm=MS5805-02BA01&DocType=Data%20Sheet&DocLang=English&DocFormat=pdf&PartCntxt=MS580502BA01-50
> + * Pages: 8-9
> + * Sections: Pressure and Temperature Calculation, Second Order Temperature Compensation
> + */
> +static const struct ms_tp_comp_consts ms5805_consts = {
> + .press_scale = 1000,
> + .high_t2_multiplier = 0,
> + .high_t2_shift = 0,
> + .high_off2_multiplier = 0,
> + .high_off2_shift = 0,
> + .low_t2_multiplier = 11,
> + .low_t2_shift = 35,
> + .low_off2_multiplier = 31,
> + .low_off2_shift = 3,
> + .low_sens2_multiplier = 63,
> + .low_sens2_shift = 5,
> + .vlow_off2_multiplier = 0,
> + .vlow_sens2_multiplier = 0,
> + .has_vhigh_temp = false,
> + .off_t1_shift = 17,
> + .off_shift = 6,
> + .sens_t1_shift = 16,
> + .sens_shift = 7,
> + .press_sens_shift = 21,
> + .press_shift = 15,
> };
>
> static const struct ms_tp_data ms5805_data = {
> .name = "ms5805",
> .hw = &ms5637_hw_data,
> - .comp_consts = &ms5637_02_consts,
> + .comp_consts = &ms5805_consts,
Is this change actually a fix?
> +};
prev parent reply other threads:[~2026-08-21 1:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260820141224.23730-1-adamianlouis@gmail.com>
2026-08-20 14:12 ` [PATCH v3 1/5] iio: pressure: ms5637: Add missing ms5803 I2C device ID Louis Adamian
2026-08-21 0:41 ` Jonathan Cameron
2026-08-20 14:12 ` [PATCH v3 2/5] iio: pressure: ms5637: Move device data struct to header Louis Adamian
2026-08-21 0:48 ` Jonathan Cameron
2026-08-20 14:12 ` [PATCH v3 3/5] dt-bindings: iio: pressure: Add MS5637 Louis Adamian
2026-08-20 18:13 ` Conor Dooley
2026-08-20 14:12 ` [PATCH v3 4/5] iio: pressure: ms5637: Parameterise second order temperature compensation Louis Adamian
2026-08-20 14:12 ` [PATCH v3 5/5] iio: pressure: ms5637: Add per-variant compensation Louis Adamian
2026-08-21 1:01 ` 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=20260821020122.1c2cc7dc@jic23-huawei \
--to=jic23@kernel.org \
--cc=adamianlouis@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--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®