Commit ad313b10 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio: Add new in_raw definitions for adc channels.

Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 495c57f5
...@@ -9,5 +9,17 @@ ...@@ -9,5 +9,17 @@
* *
*/ */
/* Deprecated */
#define IIO_DEV_ATTR_ADC(_num, _show, _addr) \ #define IIO_DEV_ATTR_ADC(_num, _show, _addr) \
IIO_DEVICE_ATTR(adc_##_num, S_IRUGO, _show, NULL, _addr) IIO_DEVICE_ATTR(adc_##_num, S_IRUGO, _show, NULL, _addr)
#define IIO_DEV_ATTR_IN_RAW(_num, _show, _addr) \
IIO_DEVICE_ATTR(in##_num##_raw, S_IRUGO, _show, NULL, _addr)
#define IIO_DEV_ATTR_IN_DIFF_RAW(_nump, _numn, _show, _addr) \
IIO_DEVICE_ATTR_NAMED(in##_nump##min##_numn##_raw, \
in##_nump-in##_numn##_raw, \
S_IRUGO, \
_show, \
NULL, \
_addr)
...@@ -98,6 +98,9 @@ struct iio_const_attr { ...@@ -98,6 +98,9 @@ struct iio_const_attr {
struct iio_dev_attr iio_dev_attr_##_name \ struct iio_dev_attr iio_dev_attr_##_name \
= IIO_ATTR(_name, _mode, _show, _store, _addr) = IIO_ATTR(_name, _mode, _show, _store, _addr)
#define IIO_DEVICE_ATTR_NAMED(_vname, _name, _mode, _show, _store, _addr) \
struct iio_dev_attr iio_dev_attr_##_vname \
= IIO_ATTR(_name, _mode, _show, _store, _addr)
#define IIO_DEVICE_ATTR_2(_name, _mode, _show, _store, _addr, _val2) \ #define IIO_DEVICE_ATTR_2(_name, _mode, _show, _store, _addr, _val2) \
struct iio_dev_attr iio_dev_attr_##_name \ struct iio_dev_attr iio_dev_attr_##_name \
......
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