Re: [PATCH v3 5/5] iio: pressure: ms5637: Add per-variant compensation
From: Louis Adamian
Date: Mon Aug 31 2026 - 16:08:28 EST
On Fri, 21 Aug 2026 02:01:22 +0100
Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
>
> 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.
>
I will add ms_tp_data structs for the deprecated meas,ms5637,
meas,ms5803 and meas,ms5837 compatible strings, so the name there
matches.
> > +/*
> > + * 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?
No, I miswrote that. It's here because the hardware is different,
so there is no implied shared compensation between them. I prefer to
keep them separate but it can be removed if you prefer.