On Wed, 2 Aug 2017 14:40:36 +0300 Narcisa Ana Maria Vasile <narcisaanamaria12@xxxxxxxxx> wrote: > Add ACPI ID to enable ACPI support. > > Cc: Daniel Baluta <daniel.baluta@xxxxxxxxx> > Cc: Alison Schofield <amsfield22@xxxxxxxxx> > Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@xxxxxxxxx> > --- > 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. Sorry, until it is registered then we can't take support for it. ACPI bindings are often entirely random so who knows what the right one will be. Jonathan > > 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 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html