Re: [PATCH 1/5 v3] iio: st_sensors: Create extended attr macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 5/19/21 1:07 AM, 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.
> 
> Cc: Hans de Goede <hdegoede@xxxxxxxxxx>
> Cc: Denis Ciocca <denis.ciocca@xxxxxx>
> Cc: Daniel Drake <drake@xxxxxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Signed-off-by: Stephan Gerhold <stephan@xxxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Thanks.

The entire series looks good to me:

Reviewed-by: Hans de Goede <hdegoede@xxxxxxxxxx>

for the series.

Regards,

Hans


> ---
> ChangeLog v2->v3:
> - Rebase and resend.
> ChangeLog v1->v2:
> - New helper patch from Stephan.
> ---
>  include/linux/iio/common/st_sensors.h | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
> index 0b9aeb479f48..8e0d76b42db9 100644
> --- a/include/linux/iio/common/st_sensors.h
> +++ b/include/linux/iio/common/st_sensors.h
> @@ -48,8 +48,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, \
> @@ -65,8 +65,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)
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux