linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: chemical: ccs811: Add ACPI support
@ 2017-08-02 11:40 Narcisa Ana Maria Vasile
  2017-08-09 14:25 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Narcisa Ana Maria Vasile @ 2017-08-02 11:40 UTC (permalink / raw)
  To: jic23, knaack.h, lars, pmeerw, daniel.baluta, amsfield22
  Cc: linux-iio, Narcisa Ana Maria Vasile

Add ACPI ID to enable ACPI support.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
---
This patch depends on "iio: chemical: ccs811: Add triggered buffer support"

Note: The ACPI ID is not yet registered at
http://www.uefi.org/PNP_ACPI_Registry. This vendor doesn't have a
registered ID yet.

 drivers/iio/chemical/ccs811.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c
index 8dbb5ed..8a4160e 100644
--- a/drivers/iio/chemical/ccs811.c
+++ b/drivers/iio/chemical/ccs811.c
@@ -18,6 +18,7 @@
  * 4. Read error register and put the information in logs
  */

+#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/i2c.h>
 #include <linux/iio/iio.h>
@@ -324,9 +325,16 @@ static int ccs811_remove(struct i2c_client *client)
 };
 MODULE_DEVICE_TABLE(i2c, ccs811_id);

+static const struct acpi_device_id ccs811_acpi_match[] = {
+	{"CCS0811", 0},
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, ccs811_acpi_match);
+
 static struct i2c_driver ccs811_driver = {
 	.driver = {
 		.name = "ccs811",
+		.acpi_match_table = ACPI_PTR(ccs811_acpi_match),
 	},
 	.probe = ccs811_probe,
 	.remove = ccs811_remove,
--
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-09 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-02 11:40 [PATCH] iio: chemical: ccs811: Add ACPI support Narcisa Ana Maria Vasile
2017-08-09 14:25 ` Jonathan Cameron

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).