On Mon, Oct 12, 2026 at 02:45:50PM +0300, Paulius Zaleckas wrote: > From: Paulius Zaleckas > > 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 a per-chip table holding the coefficient count and the TMP_CFG > startup value, and an OF match table to select it. > > Tested on a ZTS8032 at 0x76 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. > > Assisted-by: LLM > Signed-off-by: Paulius Zaleckas > --- > drivers/iio/pressure/Kconfig | 4 +-- > drivers/iio/pressure/dps310.c | 66 ++++++++++++++++++++++++++++++----- > 2 files changed, 60 insertions(+), 10 deletions(-) > > diff --git a/drivers/iio/pressure/Kconfig b/drivers/iio/pressure/Kconfig > index cef8b90b9ae7..e407243e131c 100644 > --- a/drivers/iio/pressure/Kconfig > +++ b/drivers/iio/pressure/Kconfig > @@ -115,8 +115,8 @@ config DPS310 > select IIO_BUFFER > select IIO_TRIGGERED_BUFFER > help > - Support for the Infineon DPS310 digital barometric pressure sensor. > - It can be accessed over I2C bus. > + Support for the Infineon DPS310 and Zilltek ZTS8032 digital > + barometric pressure sensors. They can be accessed over I2C bus. > > This driver can also be built as a module. If so, the module will be > called dps310. > diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c > index 3bc690cc8609..3b0f6d344409 100644 > --- a/drivers/iio/pressure/dps310.c > +++ b/drivers/iio/pressure/dps310.c > @@ -7,6 +7,10 @@ > * > * https://www.infineon.com/dgdl/?fileId=5546d462576f34750157750826c42242 > * > + * The Zilltek ZTS8032 is register compatible, with two more pressure > + * calibration coefficients (c31, c40) and temperature calibrated against > + * the internal sensor. > + * > * Temperature calculation: > * c0 * 0.5 + c1 * T_raw / kT °C > * > @@ -18,6 +22,7 @@ > #include > #include > #include > +#include Adding that header mainly results in pulling in many unneeded dependencies, so please don't. of_device_id is already provided by , so you can just drop the #include. > static const struct acpi_device_id dps310_acpi_match[] = { > - { "IFX3100" }, > + { "IFX3100", (kernel_ulong_t)&dps310_chip_info }, > { } > }; While touching that struct, please make this: { .id = "IFX3100", .driver_data = (kernel_ulong_t)&dps310_chip_info }, Best regards Uwe