[PATCH v2] iio: chemical: ccs811: Corrected firmware boot/application mode transition

2018-02-17 Thread Richard Lai
called. This patch checks the STATUS register before attempting to send a write to APP_START. Only if the firmware is not in application mode and has valid firmware application loaded, then it will continue to start transiting the firmware boot to application mode. Signed-off-by: Richard La

[PATCH] iio: chemical: ccs811: Corrected firmware boot/application mode transition

2018-02-14 Thread Richard Lai
Adds two macros for checking APP_VALID and FW_MODE bits in the STATUS register of CCS811 sensor. Signed-off-by: Richard Lai --- drivers/iio/chemical/ccs811.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/che

[PATCH] iio: chemical: ccs811: Renamed resistance member in ccs811_reading struct

2018-02-13 Thread Richard Lai
the electrical resistance of the sensor using Ohm's law, V = I x R, in which a new channel type of IIO_RESISTANCE may be added to the driver in the future. Signed-off-by: Richard Lai --- drivers/iio/chemical/ccs811.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i

[PATCH] iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming

2018-02-13 Thread Richard Lai
unrelated to AMS CCS811 sensor. Signed-off-by: Richard Lai --- drivers/iio/chemical/ccs811.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/chemical/ccs811.c b/drivers/iio/chemical/ccs811.c index 840a6cb..8e8beb7 100644 --- a/drivers/iio/chemical/ccs811.c +++ b