diff options
Diffstat (limited to 'drivers/iio/chemical')
-rw-r--r-- | drivers/iio/chemical/ams-iaq-core.c | 17 | ||||
-rw-r--r-- | drivers/iio/chemical/atlas-ph-sensor.c | 16 | ||||
-rw-r--r-- | drivers/iio/chemical/ccs811.c | 10 | ||||
-rw-r--r-- | drivers/iio/chemical/vz89x.c | 17 |
4 files changed, 17 insertions, 43 deletions
diff --git a/drivers/iio/chemical/ams-iaq-core.c b/drivers/iio/chemical/ams-iaq-core.c index d9e5950ad24a..a0646ba2ad88 100644 --- a/drivers/iio/chemical/ams-iaq-core.c +++ b/drivers/iio/chemical/ams-iaq-core.c @@ -1,18 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * ams-iaq-core.c - Support for AMS iAQ-Core VOC sensors * - * Copyright (C) 2015 Matt Ranostay <mranostay@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * + * Copyright (C) 2015, 2018 + * Author: Matt Ranostay <matt.ranostay@konsulko.com> */ #include <linux/module.h> @@ -194,6 +185,6 @@ static struct i2c_driver ams_iaqcore_driver = { }; module_i2c_driver(ams_iaqcore_driver); -MODULE_AUTHOR("Matt Ranostay <mranostay@gmail.com>"); +MODULE_AUTHOR("Matt Ranostay <matt.ranostay@konsulko.com>"); MODULE_DESCRIPTION("AMS iAQ-Core VOC sensors"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c index 8c4e05580091..abfc4bbc4cfc 100644 --- a/drivers/iio/chemical/atlas-ph-sensor.c +++ b/drivers/iio/chemical/atlas-ph-sensor.c @@ -1,17 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * atlas-ph-sensor.c - Support for Atlas Scientific OEM pH-SM sensor * - * Copyright (C) 2015 Matt Ranostay <mranostay@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Copyright (C) 2015-2018 Matt Ranostay + * Author: Matt Ranostay <matt.ranostay@konsulko.com> */ #include <linux/module.h> @@ -689,6 +681,6 @@ static struct i2c_driver atlas_driver = { }; module_i2c_driver(atlas_driver); -MODULE_AUTHOR("Matt Ranostay <mranostay@gmail.com>"); +MODULE_AUTHOR("Matt Ranostay <matt.ranostay@konsulko.com>"); MODULE_DESCRIPTION("Atlas Scientific pH-SM sensor"); MODULE_LICENSE("GPL"); diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c index 1ea9f5513b02..b4a46eb45789 100644 --- a/drivers/iio/chemical/ccs811.c +++ b/drivers/iio/chemical/ccs811.c @@ -32,7 +32,7 @@ #define CCS811_ALG_RESULT_DATA 0x02 #define CCS811_RAW_DATA 0x03 #define CCS811_HW_ID 0x20 -#define CCS881_HW_ID_VALUE 0x81 +#define CCS811_HW_ID_VALUE 0x81 #define CCS811_HW_VERSION 0x21 #define CCS811_HW_VERSION_VALUE 0x10 #define CCS811_HW_VERSION_MASK 0xF0 @@ -69,7 +69,7 @@ struct ccs811_reading { __be16 voc; u8 status; u8 error; - __be16 resistance; + __be16 raw_data; } __attribute__((__packed__)); struct ccs811_data { @@ -213,12 +213,12 @@ static int ccs811_read_raw(struct iio_dev *indio_dev, switch (chan->type) { case IIO_VOLTAGE: - *val = be16_to_cpu(data->buffer.resistance) & + *val = be16_to_cpu(data->buffer.raw_data) & CCS811_VOLTAGE_MASK; ret = IIO_VAL_INT; break; case IIO_CURRENT: - *val = be16_to_cpu(data->buffer.resistance) >> 10; + *val = be16_to_cpu(data->buffer.raw_data) >> 10; ret = IIO_VAL_INT; break; case IIO_CONCENTRATION: @@ -356,7 +356,7 @@ static int ccs811_probe(struct i2c_client *client, if (ret < 0) return ret; - if (ret != CCS881_HW_ID_VALUE) { + if (ret != CCS811_HW_ID_VALUE) { dev_err(&client->dev, "hardware id doesn't match CCS81x\n"); return -ENODEV; } diff --git a/drivers/iio/chemical/vz89x.c b/drivers/iio/chemical/vz89x.c index 9c9095ba4227..415b39339d4e 100644 --- a/drivers/iio/chemical/vz89x.c +++ b/drivers/iio/chemical/vz89x.c @@ -1,18 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * vz89x.c - Support for SGX Sensortech MiCS VZ89X VOC sensors * - * Copyright (C) 2015 Matt Ranostay <mranostay@gmail.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * + * Copyright (C) 2015-2018 + * Author: Matt Ranostay <matt.ranostay@konsulko.com> */ #include <linux/module.h> @@ -419,6 +410,6 @@ static struct i2c_driver vz89x_driver = { }; module_i2c_driver(vz89x_driver); -MODULE_AUTHOR("Matt Ranostay <mranostay@gmail.com>"); +MODULE_AUTHOR("Matt Ranostay <matt.ranostay@konsulko.com>"); MODULE_DESCRIPTION("SGX Sensortech MiCS VZ89X VOC sensors"); MODULE_LICENSE("GPL v2"); |