提交 9991f99e 编写于 作者: M Michał Mirosław 提交者: Jonathan Cameron

iio: magnetometer: ak8974: mark INT_CLEAR as precious

Reading INT_CLEAR has side effects - disallow reading it via debugfs.
Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 408cc6eb
......@@ -661,11 +661,17 @@ static bool ak8974_writeable_reg(struct device *dev, unsigned int reg)
}
}
static bool ak8974_precious_reg(struct device *dev, unsigned int reg)
{
return reg == AK8974_INT_CLEAR;
}
static const struct regmap_config ak8974_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0xff,
.writeable_reg = ak8974_writeable_reg,
.precious_reg = ak8974_precious_reg,
};
static int ak8974_probe(struct i2c_client *i2c,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册