diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2019-03-12 11:41:46 +0000 |
---|---|---|
committer | Peter Robinson <pbrobinson@gmail.com> | 2019-03-12 11:41:46 +0000 |
commit | 2a29b48ca064db958f2a8e649c813fb3aeffa87a (patch) | |
tree | fedccd793a205749e966fb5e3064b47311946d37 /iio-chemical-bme680-device-tree-support.patch | |
parent | ff5c4766aa4a74f2e9eeded38a9696e198639e32 (diff) | |
download | kernel-2a29b48ca064db958f2a8e649c813fb3aeffa87a.tar.gz kernel-2a29b48ca064db958f2a8e649c813fb3aeffa87a.tar.xz kernel-2a29b48ca064db958f2a8e649c813fb3aeffa87a.zip |
Arm config updates and fixes, fixes for Jetson TX series
Diffstat (limited to 'iio-chemical-bme680-device-tree-support.patch')
-rw-r--r-- | iio-chemical-bme680-device-tree-support.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/iio-chemical-bme680-device-tree-support.patch b/iio-chemical-bme680-device-tree-support.patch new file mode 100644 index 000000000..9396dccbf --- /dev/null +++ b/iio-chemical-bme680-device-tree-support.patch @@ -0,0 +1,69 @@ +From f7da884578212f10fd200e48f4e4c56f78e513d6 Mon Sep 17 00:00:00 2001 +From: Sebastien Bourdelin <sebastien.bourdelin@gmail.com> +Date: Mon, 14 Jan 2019 15:19:13 -0500 +Subject: iio: chemical: bme680: Add device-tree support + +This commit allow the driver to work with device-tree. + +Signed-off-by: Sebastien Bourdelin <sebastien.bourdelin@gmail.com> +Acked-by: Himanshu Jha <himanshujha199640@gmail.com> +Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> +--- + drivers/iio/chemical/bme680_i2c.c | 7 +++++++ + drivers/iio/chemical/bme680_spi.c | 8 ++++++++ + 2 files changed, 15 insertions(+) + +diff --git a/drivers/iio/chemical/bme680_i2c.c b/drivers/iio/chemical/bme680_i2c.c +index 06d4be539d2e..b2f805b6b36a 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 = 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..d0b7bdd3f066 100644 +--- a/drivers/iio/chemical/bme680_spi.c ++++ b/drivers/iio/chemical/bme680_spi.c +@@ -6,6 +6,7 @@ + */ + #include <linux/acpi.h> + #include <linux/module.h> ++#include <linux/of.h> + #include <linux/regmap.h> + #include <linux/spi/spi.h> + +@@ -110,10 +111,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 = bme680_of_spi_match, + }, + .probe = bme680_spi_probe, + .id_table = bme680_spi_id, +-- +cgit 1.2-0.3.lf.el7 |