All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5 v3] iio: st_sensors: Create extended attr macro
@ 2021-05-18 23:07 Linus Walleij
  2021-05-18 23:07 ` [PATCH 2/5 v3] iio: accel: st_sensors: Support generic mounting matrix Linus Walleij
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Linus Walleij @ 2021-05-18 23:07 UTC (permalink / raw)
  To: Jonathan Cameron, linux-iio
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	Linus Walleij, Hans de Goede, Denis Ciocca, Daniel Drake,
	Andy Shevchenko, Stephan Gerhold

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@redhat.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Cc: Daniel Drake <drake@endlessm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
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)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-05-24 12:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 23:07 [PATCH 1/5 v3] iio: st_sensors: Create extended attr macro Linus Walleij
2021-05-18 23:07 ` [PATCH 2/5 v3] iio: accel: st_sensors: Support generic mounting matrix Linus Walleij
2021-05-18 23:07 ` [PATCH 3/5 v3] iio: accel: st_sensors: Stop copying channels Linus Walleij
2021-05-18 23:07 ` [PATCH 4/5 v3] iio: magnetometer: st_magn: Support mount matrix Linus Walleij
2021-05-18 23:07 ` [PATCH 5/5 v3] iio: gyro: st_gyro: " Linus Walleij
2021-05-19 13:17 ` [PATCH 1/5 v3] iio: st_sensors: Create extended attr macro Hans de Goede
2021-05-22 18:15   ` Jonathan Cameron
2021-05-24  9:43     ` Linus Walleij
2021-05-24  9:50       ` Jonathan Cameron
2021-05-24 10:37         ` Andy Shevchenko
2021-05-24 10:39           ` Andy Shevchenko
2021-05-24 12:07         ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.