From: Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org, linux-iio@vger.kernel.org,
himanshujha199640@gmail.com, mark.rutland@arm.com,
robh+dt@kernel.org, pmeerw@pmeerw.net, lars@metafoo.de,
knaack.h@gmx.de, jic23@kernel.org,
Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
Subject: [PATCH 1/2] iio: chemical: bme680: Add device-tree support
Date: Fri, 11 Jan 2019 14:31:40 -0500 [thread overview]
Message-ID: <20190111193141.20607-1-sebastien.bourdelin@gmail.com> (raw)
This commit allow the driver to work with device-tree.
Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@gmail.com>
---
drivers/iio/chemical/bme680_i2c.c | 7 +++++++
drivers/iio/chemical/bme680_spi.c | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/drivers/iio/chemical/bme680_i2c.c b/drivers/iio/chemical/bme680_i2c.c
index 06d4be539d2e..94a36ebdf0b2 100644
--- a/drivers/iio/chemical/bme680_i2c.c
+++ b/drivers/iio/chemical/bme680_i2c.c
@@ -70,10 +70,17 @@ static const struct acpi_device_id bme680_acpi_match[] = {
};
MODULE_DEVICE_TABLE(acpi, bme680_acpi_match);
+static const struct of_device_id bme680_of_i2c_match[] = {
+ { .compatible = "bosch,bme680", },
+ {},
+}
+MODULE_DEVICE_TABLE(of, bme680_of_i2c_match);
+
static struct i2c_driver bme680_i2c_driver = {
.driver = {
.name = "bme680_i2c",
.acpi_match_table = ACPI_PTR(bme680_acpi_match),
+ .of_match_table = of_match_ptr(bme680_of_i2c_match),
},
.probe = bme680_i2c_probe,
.id_table = bme680_i2c_id,
diff --git a/drivers/iio/chemical/bme680_spi.c b/drivers/iio/chemical/bme680_spi.c
index c9fb05e8d0b9..45bd4e93a891 100644
--- a/drivers/iio/chemical/bme680_spi.c
+++ b/drivers/iio/chemical/bme680_spi.c
@@ -110,10 +110,17 @@ static const struct acpi_device_id bme680_acpi_match[] = {
};
MODULE_DEVICE_TABLE(acpi, bme680_acpi_match);
+static const struct of_device_id bme680_of_spi_match[] = {
+ { .compatible = "bosch,bme680", },
+ {},
+}
+MODULE_DEVICE_TABLE(of, bme680_of_spi_match);
+
static struct spi_driver bme680_spi_driver = {
.driver = {
.name = "bme680_spi",
.acpi_match_table = ACPI_PTR(bme680_acpi_match),
+ .of_match_table = of_match_ptr(bme680_of_spi_match),
},
.probe = bme680_spi_probe,
.id_table = bme680_spi_id,
--
2.20.1
next reply other threads:[~2019-01-11 19:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-11 19:31 Sebastien Bourdelin [this message]
2019-01-11 19:31 ` [PATCH 2/2] dt-bindings: iio: chemical: Add bindings for bme680 Sebastien Bourdelin
2019-01-14 4:01 ` kbuild test robot
2019-01-13 22:59 ` [PATCH 1/2] iio: chemical: bme680: Add device-tree support kbuild test robot
2019-01-13 22:59 ` kbuild test robot
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=20190111193141.20607-1-sebastien.bourdelin@gmail.com \
--to=sebastien.bourdelin@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=himanshujha199640@gmail.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).