summaryrefslogtreecommitdiff
path: root/drivers/iio/health/afe4404.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/health/afe4404.c')
-rw-r--r--drivers/iio/health/afe4404.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/iio/health/afe4404.c b/drivers/iio/health/afe4404.c
index 7768b07ef7a6..99ff68aed27c 100644
--- a/drivers/iio/health/afe4404.c
+++ b/drivers/iio/health/afe4404.c
@@ -333,8 +333,7 @@ static irqreturn_t afe4404_trigger_handler(int irq, void *private)
struct afe4404_data *afe = iio_priv(indio_dev);
int ret, bit, i = 0;
- for_each_set_bit(bit, indio_dev->active_scan_mask,
- indio_dev->masklength) {
+ iio_for_each_active_channel(indio_dev, bit) {
ret = regmap_read(afe->regmap, afe4404_channel_values[bit],
&afe->buffer[i++]);
if (ret)
@@ -420,7 +419,7 @@ static const struct regmap_config afe4404_regmap_config = {
static const struct of_device_id afe4404_of_match[] = {
{ .compatible = "ti,afe4404", },
- { /* sentinel */ }
+ { }
};
MODULE_DEVICE_TABLE(of, afe4404_of_match);
@@ -430,9 +429,8 @@ static int afe4404_suspend(struct device *dev)
struct afe4404_data *afe = iio_priv(indio_dev);
int ret;
- ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2,
- AFE440X_CONTROL2_PDN_AFE,
- AFE440X_CONTROL2_PDN_AFE);
+ ret = regmap_set_bits(afe->regmap, AFE440X_CONTROL2,
+ AFE440X_CONTROL2_PDN_AFE);
if (ret)
return ret;
@@ -457,8 +455,8 @@ static int afe4404_resume(struct device *dev)
return ret;
}
- ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2,
- AFE440X_CONTROL2_PDN_AFE, 0);
+ ret = regmap_clear_bits(afe->regmap, AFE440X_CONTROL2,
+ AFE440X_CONTROL2_PDN_AFE);
if (ret)
return ret;
@@ -582,8 +580,8 @@ static int afe4404_probe(struct i2c_client *client)
}
static const struct i2c_device_id afe4404_ids[] = {
- { "afe4404", 0 },
- { /* sentinel */ }
+ { "afe4404" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, afe4404_ids);