From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Angel Iglesias <ang.iglesiasg@gmail.com>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Ulf Hansson <ulf.hansson@linaro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Paul Cercueil <paul@crapouillou.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants
Date: Tue, 27 Dec 2022 23:36:11 +0200 [thread overview]
Message-ID: <Y6tlS5lLkNO5PxhH@smile.fi.intel.com> (raw)
In-Reply-To: <f0368a3f460707417110dffdb0166824da20af15.1671986815.git.ang.iglesiasg@gmail.com>
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
next prev parent reply other threads:[~2022-12-27 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-25 16:55 [PATCH 0/5] Add support for pressure sensor Bosch BMP580 Angel Iglesias
2022-12-25 16:56 ` [PATCH 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants Angel Iglesias
2022-12-27 21:36 ` Andy Shevchenko [this message]
2022-12-25 16:57 ` [PATCH 2/5] iio: pressure: bmp280: Add preinit callback Angel Iglesias
2022-12-25 16:58 ` [PATCH 3/5] iio: pressure: bmp280: Add support for new sensor BMP580 Angel Iglesias
2022-12-29 9:20 ` Dan Carpenter
2022-12-25 16:59 ` [PATCH 4/5] dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Angel Iglesias
2022-12-26 12:05 ` Krzysztof Kozlowski
2022-12-26 12:43 ` Angel Iglesias
2022-12-25 17:00 ` [PATCH 5/5] iio: pressure: bmp280: Add nvmem operations for BMP580 Angel Iglesias
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y6tlS5lLkNO5PxhH@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=ang.iglesiasg@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@crapouillou.net \
--cc=rafael.j.wysocki@intel.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox