Re: [PATCH v2 4/6] iio: pressure: dps310: add per-chip data

From: Andy Shevchenko

Date: Tue Oct 13 2026 - 13:14:43 EST


On Tue, Oct 13, 2026 at 02:21:22PM +0300, Paulius Zaleckas wrote:
> Move the coefficient count, the TMP_CFG startup value and the IIO device
> name into a per-chip structure, passed through the I2C and ACPI match
> data. This prepares for the Zilltek ZTS8032, which has two more
> coefficients and a different TMP_CFG layout.

...

> static const struct i2c_device_id dps310_id[] = {
> - { .name = DPS310_DEV_NAME },
> + { .name = "dps310", .driver_data = (kernel_ulong_t)&dps310_chip_info },
> { }
> };
> MODULE_DEVICE_TABLE(i2c, dps310_id);
>
> static const struct acpi_device_id dps310_acpi_match[] = {
> - { "IFX3100" },
> + { "IFX3100", (kernel_ulong_t)&dps310_chip_info },

Use C99 initialisers while at it.

> { }
> };
> MODULE_DEVICE_TABLE(acpi, dps310_acpi_match);

--
With Best Regards,
Andy Shevchenko