Message ID | 20210517233322.383043-1-linus.walleij@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [1/5,v2] iio: st_sensors: Create extended attr macro | expand |
On Tue, May 18, 2021 at 01:33:18AM +0200, Linus Walleij wrote: > Extend ST_SENSORS_LSM_CHANNELS() to a version that will accept extended > attributes named ST_SENSORS_LSM_CHANNELS_EXT() and wrap the former as a > specialized version of the former. Missed to Cc Hans? Btw, I have scripted the series submission [1]. Feel free to use it, I found it much easier and less error prone (like forgetting maintainers or key contributors). [1]: https://github.com/andy-shev/home-bin-tools/blob/master/ge2maintainer.sh
On Tue, May 18, 2021 at 01:33:18AM +0200, Linus Walleij wrote: > Extend ST_SENSORS_LSM_CHANNELS() to a version that will accept extended > attributes named ST_SENSORS_LSM_CHANNELS_EXT() and wrap the former as a > specialized version of the former. After addressing comments Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> for the entire series. P.S. I think I can send one patch that should prepend your series, stay tuned!
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h index 33e939977444..704217a5c3ba 100644 --- a/include/linux/iio/common/st_sensors.h +++ b/include/linux/iio/common/st_sensors.h @@ -46,8 +46,8 @@ #define ST_SENSORS_MAX_NAME 17 #define ST_SENSORS_MAX_4WAI 8 -#define ST_SENSORS_LSM_CHANNELS(device_type, mask, index, mod, \ - ch2, s, endian, rbits, sbits, addr) \ +#define ST_SENSORS_LSM_CHANNELS_EXT(device_type, mask, index, mod, \ + ch2, s, endian, rbits, sbits, addr, ext) \ { \ .type = device_type, \ .modified = mod, \ @@ -63,8 +63,14 @@ .storagebits = sbits, \ .endianness = endian, \ }, \ + .ext_info = ext, \ } +#define ST_SENSORS_LSM_CHANNELS(device_type, mask, index, mod, \ + ch2, s, endian, rbits, sbits, addr) \ + ST_SENSORS_LSM_CHANNELS_EXT(device_type, mask, index, mod, \ + ch2, s, endian, rbits, sbits, addr, NULL) + #define ST_SENSORS_DEV_ATTR_SAMP_FREQ_AVAIL() \ IIO_DEV_ATTR_SAMP_FREQ_AVAIL( \ st_sensors_sysfs_sampling_frequency_avail)