Commit a24b4d70 authored by David Frey's avatar David Frey Committed by Jonathan Cameron

iio: chemical: bme680: change MSK->MASK in #defines

Convert all defines to use "MASK" instead of a mix of "MSK" and "MASK"
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 70f1cbdd
...@@ -39,13 +39,13 @@ ...@@ -39,13 +39,13 @@
#define BME680_MAX_OVERFLOW_VAL 0x40000000 #define BME680_MAX_OVERFLOW_VAL 0x40000000
#define BME680_HUM_REG_SHIFT_VAL 4 #define BME680_HUM_REG_SHIFT_VAL 4
#define BME680_BIT_H1_DATA_MSK 0x0F #define BME680_BIT_H1_DATA_MASK 0x0F
#define BME680_REG_RES_HEAT_RANGE 0x02 #define BME680_REG_RES_HEAT_RANGE 0x02
#define BME680_RHRANGE_MSK 0x30 #define BME680_RHRANGE_MASK 0x30
#define BME680_REG_RES_HEAT_VAL 0x00 #define BME680_REG_RES_HEAT_VAL 0x00
#define BME680_REG_RANGE_SW_ERR 0x04 #define BME680_REG_RANGE_SW_ERR 0x04
#define BME680_RSERROR_MSK 0xF0 #define BME680_RSERROR_MASK 0xF0
#define BME680_REG_RES_HEAT_0 0x5A #define BME680_REG_RES_HEAT_0 0x5A
#define BME680_REG_GAS_WAIT_0 0x64 #define BME680_REG_GAS_WAIT_0 0x64
#define BME680_ADC_GAS_RES_SHIFT 6 #define BME680_ADC_GAS_RES_SHIFT 6
......
...@@ -206,7 +206,7 @@ static int bme680_read_calib(struct bme680_data *data, ...@@ -206,7 +206,7 @@ static int bme680_read_calib(struct bme680_data *data,
return ret; return ret;
} }
calib->par_h1 = (tmp_msb << BME680_HUM_REG_SHIFT_VAL) | calib->par_h1 = (tmp_msb << BME680_HUM_REG_SHIFT_VAL) |
(tmp_lsb & BME680_BIT_H1_DATA_MSK); (tmp_lsb & BME680_BIT_H1_DATA_MASK);
ret = regmap_read(data->regmap, BME680_H2_MSB_REG, &tmp_msb); ret = regmap_read(data->regmap, BME680_H2_MSB_REG, &tmp_msb);
if (ret < 0) { if (ret < 0) {
...@@ -285,7 +285,7 @@ static int bme680_read_calib(struct bme680_data *data, ...@@ -285,7 +285,7 @@ static int bme680_read_calib(struct bme680_data *data,
dev_err(dev, "failed to read resistance heat range\n"); dev_err(dev, "failed to read resistance heat range\n");
return ret; return ret;
} }
calib->res_heat_range = (tmp & BME680_RHRANGE_MSK) / 16; calib->res_heat_range = (tmp & BME680_RHRANGE_MASK) / 16;
ret = regmap_read(data->regmap, BME680_REG_RES_HEAT_VAL, &tmp); ret = regmap_read(data->regmap, BME680_REG_RES_HEAT_VAL, &tmp);
if (ret < 0) { if (ret < 0) {
...@@ -299,7 +299,7 @@ static int bme680_read_calib(struct bme680_data *data, ...@@ -299,7 +299,7 @@ static int bme680_read_calib(struct bme680_data *data,
dev_err(dev, "failed to read range software error\n"); dev_err(dev, "failed to read range software error\n");
return ret; return ret;
} }
calib->range_sw_err = (tmp & BME680_RSERROR_MSK) / 16; calib->range_sw_err = (tmp & BME680_RSERROR_MASK) / 16;
return 0; return 0;
} }
......
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