Re: [PATCH v3 5/5] iio: pressure: dps310: add Zilltek ZTS8032 support
From: Andy Shevchenko
Date: Thu Oct 15 2026 - 09:43:35 EST
On Thu, Oct 15, 2026 at 01:49:45PM +0300, Paulius Zaleckas wrote:
> The Zilltek ZTS8032 has the DPS310 register map, scale factors and
> compensation, with these differences:
>
> - two more pressure coefficients, c31 and c40 at 0x22-0x25, adding
> c40 * Praw_sc^4 + c31 * Traw_sc * Praw_sc^3 to the polynomial
> - TMP_EXT is MEAS_CFG bit 3, and the temperature coefficients are for
> the internal sensor (COEF_SRCE reads 0x06). TMP_CFG bit 7 is the top
> bit of a 4-bit TMP_RATE, so the DPS310 TMP_EXT write would select a
> 25/16 Hz background rate instead of the external sensor.
> - product ID 0x11 instead of 0x10, the driver does not check it
>
> Add its chip data, reading 22 coefficient bytes and leaving TMP_CFG at
> 0, a Horner step for each of c40 and c31, and the I2C and OF IDs.
>
> Tested on a ZTS8032 over I2C: in_pressure_input is within 1 Pa of the
> datasheet formula evaluated from the raw and coefficient registers at
> every oversampling rate from 1 to 128, and TMP_CFG reads 0x00 after
> probe.
...
> #define DPS310_COEF_LEN 18
> -#define DPS310_MAX_COEF_LEN 18
> +#define ZTS8032_COEF_LEN 22
> +#define DPS310_MAX_COEF_LEN 22
I probably was unclear. What I meant is the agnostic name for that.
After the first patch:
#define DPS310_COEF_LEN 18
#define MAX_COEF_LEN 18
After this one
#define DPS310_COEF_LEN 18
#define ZTS8032_COEF_LEN 22
#define MAX_COEF_LEN 22
...
Everything else looks good to me.
--
With Best Regards,
Andy Shevchenko