[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y6tlS5lLkNO5PxhH@smile.fi.intel.com>
Date: Tue, 27 Dec 2022 23:36:11 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Angel Iglesias <ang.iglesiasg@...il.com>
Cc: linux-iio@...r.kernel.org, Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Ulf Hansson <ulf.hansson@...aro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Paul Cercueil <paul@...pouillou.net>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] iio: pressure: bmp280: Add enumeration to handle
chip variants
On Sun, Dec 25, 2022 at 05:56:07PM +0100, Angel Iglesias wrote:
> Adds enumeration to improve handling the different supported sensors
> on driver initialization. This avoid collisions if different variants
> share the same device idetifier on ID register.
...
> static const struct of_device_id bmp280_of_i2c_match[] = {
> - { .compatible = "bosch,bmp085", .data = (void *)BMP180_CHIP_ID },
> - { .compatible = "bosch,bmp180", .data = (void *)BMP180_CHIP_ID },
> - { .compatible = "bosch,bmp280", .data = (void *)BMP280_CHIP_ID },
> - { .compatible = "bosch,bme280", .data = (void *)BME280_CHIP_ID },
> - { .compatible = "bosch,bmp380", .data = (void *)BMP380_CHIP_ID },
> + { .compatible = "bosch,bmp085", .data = (void *)BMP180 },
> + { .compatible = "bosch,bmp180", .data = (void *)BMP180 },
> + { .compatible = "bosch,bmp280", .data = (void *)BMP280 },
> + { .compatible = "bosch,bme280", .data = (void *)BME280 },
> + { .compatible = "bosch,bmp380", .data = (void *)BMP380 },
Seems an unneeded churn. If we want to have chip info, then provide a pointer
here. And in case it's done later, squash into this patch.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists