diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2015-08-12 04:22:41 -0400 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2015-08-16 05:51:25 -0400 |
| commit | a0175b9c76f59c1f5706f986d690e27ba06363dd (patch) | |
| tree | dcd09779295650a6f97d62a4858cb2c32ea3d545 /include/linux/iio | |
| parent | 8d96fc276aaec449871bcb86cef41f3187136f0a (diff) | |
iio: st_sensors: add debugfs register read hook
This adds a debugfs hook to read/write registers in the ST
sensors using debugfs. Proved to be awesome help when trying
to debug why IRQs do not arrive.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
| -rw-r--r-- | include/linux/iio/common/st_sensors.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 3c17cd7fdf06..2fe939c73cd2 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h | |||
| @@ -271,6 +271,10 @@ void st_sensors_power_enable(struct iio_dev *indio_dev); | |||
| 271 | 271 | ||
| 272 | void st_sensors_power_disable(struct iio_dev *indio_dev); | 272 | void st_sensors_power_disable(struct iio_dev *indio_dev); |
| 273 | 273 | ||
| 274 | int st_sensors_debugfs_reg_access(struct iio_dev *indio_dev, | ||
| 275 | unsigned reg, unsigned writeval, | ||
| 276 | unsigned *readval); | ||
| 277 | |||
| 274 | int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr); | 278 | int st_sensors_set_odr(struct iio_dev *indio_dev, unsigned int odr); |
| 275 | 279 | ||
| 276 | int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable); | 280 | int st_sensors_set_dataready_irq(struct iio_dev *indio_dev, bool enable); |
