lkml.org 
[lkml]   [2022]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2023-03-26 23:21    [W:0.175 / U:1.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site