Commit ff7723e203349c18d7149e7cf2a4ae928bb9da69

Authored by Jonathan Cameron
Committed by Greg Kroah-Hartman
1 parent ad313b1062

staging:iio: Add new attrs for sampling frequency available and temp_raw

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 1 changed file with 11 additions and 1 deletions Side-by-side Diff

drivers/staging/iio/sysfs.h
... ... @@ -144,18 +144,25 @@
144 144 *
145 145 * May be mode dependent on some devices
146 146 **/
  147 +/* Deprecated */
147 148 #define IIO_DEV_ATTR_AVAIL_SAMP_FREQ(_show) \
148 149 IIO_DEVICE_ATTR(available_sampling_frequency, S_IRUGO, _show, NULL, 0)
149 150  
  151 +#define IIO_DEV_ATTR_SAMP_FREQ_AVAIL(_show) \
  152 + IIO_DEVICE_ATTR(sampling_frequency_available, S_IRUGO, _show, NULL, 0)
150 153 /**
151 154 * IIO_CONST_ATTR_AVAIL_SAMP_FREQ - list available sampling frequencies
152 155 * @_string: frequency string for the attribute
153 156 *
154 157 * Constant version
155 158 **/
156   -#define IIO_CONST_ATTR_AVAIL_SAMP_FREQ(_string) \
  159 +/* Deprecated */
  160 +#define IIO_CONST_ATTR_AVAIL_SAMP_FREQ(_string) \
157 161 IIO_CONST_ATTR(available_sampling_frequency, _string)
158 162  
  163 +#define IIO_CONST_ATTR_SAMP_FREQ_AVAIL(_string) \
  164 + IIO_CONST_ATTR(sampling_frequency_available, _string)
  165 +
159 166 /**
160 167 * IIO_DEV_ATTR_SCAN_MODE - select a scan mode
161 168 * @_mode: sysfs file mode/permissions
... ... @@ -233,6 +240,9 @@
233 240 **/
234 241 #define IIO_DEV_ATTR_TEMP(_show) \
235 242 IIO_DEVICE_ATTR(temp, S_IRUGO, _show, NULL, 0)
  243 +
  244 +#define IIO_DEV_ATTR_TEMP_RAW(_show) \
  245 + IIO_DEVICE_ATTR(temp_raw, S_IRUGO, _show, NULL, 0)
236 246  
237 247 /**
238 248 * IIO_EVENT_SH - generic shared event handler