2 * adc.h - sysfs attributes associated with ADCs
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 as published by
6 * the Free Software Foundation.
8 * Copyright (c) 2008 Jonathan Cameron <jic23@cam.ac.uk>
13 #define IIO_DEV_ATTR_ADC(_num, _show, _addr) \
14 IIO_DEVICE_ATTR(adc_##_num, S_IRUGO, _show, NULL, _addr)
16 #define IIO_DEV_ATTR_IN_RAW(_num, _show, _addr) \
17 IIO_DEVICE_ATTR(in##_num##_raw, S_IRUGO, _show, NULL, _addr)
19 #define IIO_DEV_ATTR_IN_NAMED_RAW(_name, _show, _addr) \
20 IIO_DEVICE_ATTR(in_##_name##_raw, S_IRUGO, _show, NULL, _addr)
22 #define IIO_DEV_ATTR_IN_DIFF_RAW(_nump, _numn, _show, _addr) \
23 IIO_DEVICE_ATTR_NAMED(in##_nump##min##_numn##_raw, \
24 in##_nump-in##_numn##_raw, \
30 #define IIO_EVENT_CODE_IN_HIGH_THRESH(a) (IIO_EVENT_CODE_ADC_BASE + a)
31 #define IIO_EVENT_CODE_IN_LOW_THRESH(a) (IIO_EVENT_CODE_ADC_BASE + a + 32)