diff options
author | David Frey <dpfrey@gmail.com> | 2018-08-20 20:39:59 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-08-25 11:13:45 +0300 |
commit | 1691d4ca7081d3154771c2c4b18ec816936fef4f (patch) | |
tree | 4c1edffe7e945494cd97ec2a63eca0285d1a0692 /drivers/iio/chemical/bme680_core.c | |
parent | 8109b2c94f586e120cc86449777818a2e1020e7c (diff) | |
download | linux-1691d4ca7081d3154771c2c4b18ec816936fef4f.tar.xz |
iio: chemical: bme680: Remove field value defines
Remove BME680_RUN_GAS_EN_BIT and BME680_NB_CONV_0_VAL field value
definitions because the fields are simply boolean and integer
respectively.
Signed-off-by: David Frey <dpfrey@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Tested-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/chemical/bme680_core.c')
-rw-r--r-- | drivers/iio/chemical/bme680_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index 87666ce8915f..70c1fe4366f4 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -572,10 +572,11 @@ static int bme680_gas_config(struct bme680_data *data) return ret; } - /* Selecting the runGas and NB conversion settings for the sensor */ + /* Enable the gas sensor and select heater profile set-point 0 */ ret = regmap_update_bits(data->regmap, BME680_REG_CTRL_GAS_1, BME680_RUN_GAS_MASK | BME680_NB_CONV_MASK, - BME680_RUN_GAS_EN_BIT | BME680_NB_CONV_0_VAL); + FIELD_PREP(BME680_RUN_GAS_MASK, 1) | + FIELD_PREP(BME680_NB_CONV_MASK, 0)); if (ret < 0) dev_err(dev, "failed to write ctrl_gas_1 register\n"); |