Commit 1691d4ca authored by David Frey's avatar David Frey Committed by Jonathan Cameron

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: default avatarDavid Frey <dpfrey@gmail.com>
Reviewed-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Tested-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 8109b2c9
...@@ -54,8 +54,6 @@ ...@@ -54,8 +54,6 @@
#define BME680_REG_CTRL_GAS_1 0x71 #define BME680_REG_CTRL_GAS_1 0x71
#define BME680_RUN_GAS_MASK BIT(4) #define BME680_RUN_GAS_MASK BIT(4)
#define BME680_NB_CONV_MASK GENMASK(3, 0) #define BME680_NB_CONV_MASK GENMASK(3, 0)
#define BME680_RUN_GAS_EN_BIT BIT(4)
#define BME680_NB_CONV_0_VAL 0
#define BME680_REG_MEAS_STAT_0 0x1D #define BME680_REG_MEAS_STAT_0 0x1D
#define BME680_GAS_MEAS_BIT BIT(6) #define BME680_GAS_MEAS_BIT BIT(6)
......
...@@ -572,10 +572,11 @@ static int bme680_gas_config(struct bme680_data *data) ...@@ -572,10 +572,11 @@ static int bme680_gas_config(struct bme680_data *data)
return ret; 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, ret = regmap_update_bits(data->regmap, BME680_REG_CTRL_GAS_1,
BME680_RUN_GAS_MASK | BME680_NB_CONV_MASK, 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) if (ret < 0)
dev_err(dev, "failed to write ctrl_gas_1 register\n"); dev_err(dev, "failed to write ctrl_gas_1 register\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment