* [PATCH 0/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. @ 2023-01-16 9:51 Philippe De Muyter 2023-01-16 9:51 ` [PATCH 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' Philippe De Muyter 2023-01-16 9:51 ` [PATCH 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter 0 siblings, 2 replies; 5+ messages in thread From: Philippe De Muyter @ 2023-01-16 9:51 UTC (permalink / raw) To: lorenzo, linux-iio; +Cc: Philippe De Muyter From: Philippe De Muyter <phdm@macqel.be> A simple patch to add the missing 'mount_matrix' sysfs entry for the gyro channel of the st_lsm6dsx 6-axes devices. Philippe De Muyter (2): iio: imu: st_lsm6dsx: fix naming of 'struct iio_info'. iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 5 +++-- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) -- 2.31.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info'. 2023-01-16 9:51 [PATCH 0/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter @ 2023-01-16 9:51 ` Philippe De Muyter 2023-01-16 10:19 ` Lorenzo Bianconi 2023-01-16 9:51 ` [PATCH 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter 1 sibling, 1 reply; 5+ messages in thread From: Philippe De Muyter @ 2023-01-16 9:51 UTC (permalink / raw) To: lorenzo, linux-iio; +Cc: Philippe De Muyter From: Philippe De Muyter <phdm@macqel.be> We need the name 'st_lsm6dsx_ext_info' for the actual 'iio_chan_spec_ext_info'. Rename the 'struct iio_info' to 'st_lsm6dsx_info' like in all other drivers. Signed-off-by: Philippe De Muyter <phdm@macqel.be> --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c index f2b64b4956a3..43304b198040 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c @@ -714,7 +714,7 @@ static const struct attribute_group st_lsm6dsx_ext_attribute_group = { .attrs = st_lsm6dsx_ext_attributes, }; -static const struct iio_info st_lsm6dsx_ext_info = { +static const struct iio_info st_lsm6dsx_info = { .attrs = &st_lsm6dsx_ext_attribute_group, .read_raw = st_lsm6dsx_shub_read_raw, .write_raw = st_lsm6dsx_shub_write_raw, @@ -737,7 +737,7 @@ st_lsm6dsx_shub_alloc_iiodev(struct st_lsm6dsx_hw *hw, return NULL; iio_dev->modes = INDIO_DIRECT_MODE; - iio_dev->info = &st_lsm6dsx_ext_info; + iio_dev->info = &st_lsm6dsx_info; sensor = iio_priv(iio_dev); sensor->id = id; -- 2.31.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info'. 2023-01-16 9:51 ` [PATCH 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' Philippe De Muyter @ 2023-01-16 10:19 ` Lorenzo Bianconi 0 siblings, 0 replies; 5+ messages in thread From: Lorenzo Bianconi @ 2023-01-16 10:19 UTC (permalink / raw) To: Philippe De Muyter; +Cc: linux-iio, Philippe De Muyter [-- Attachment #1: Type: text/plain, Size: 1593 bytes --] > From: Philippe De Muyter <phdm@macqel.be> > > We need the name 'st_lsm6dsx_ext_info' for the actual 'iio_chan_spec_ext_info'. > Rename the 'struct iio_info' to 'st_lsm6dsx_info' like in all other drivers. > > Signed-off-by: Philippe De Muyter <phdm@macqel.be> > --- > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c > index f2b64b4956a3..43304b198040 100644 > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c > @@ -714,7 +714,7 @@ static const struct attribute_group st_lsm6dsx_ext_attribute_group = { > .attrs = st_lsm6dsx_ext_attributes, > }; > > -static const struct iio_info st_lsm6dsx_ext_info = { > +static const struct iio_info st_lsm6dsx_info = { maybe st_lsm6dsx_shub_info is a better name, what do you think? Moreover you can even rename: s/st_lsm6dsx_ext_attributes/st_lsm6dsx_shub_attributes/ s/st_lsm6dsx_ext_attribute_group/st_lsm6dsx_shub_attribute_group/ Regards, Lorenzo > .attrs = &st_lsm6dsx_ext_attribute_group, > .read_raw = st_lsm6dsx_shub_read_raw, > .write_raw = st_lsm6dsx_shub_write_raw, > @@ -737,7 +737,7 @@ st_lsm6dsx_shub_alloc_iiodev(struct st_lsm6dsx_hw *hw, > return NULL; > > iio_dev->modes = INDIO_DIRECT_MODE; > - iio_dev->info = &st_lsm6dsx_ext_info; > + iio_dev->info = &st_lsm6dsx_info; > > sensor = iio_priv(iio_dev); > sensor->id = id; > -- > 2.31.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. 2023-01-16 9:51 [PATCH 0/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter 2023-01-16 9:51 ` [PATCH 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' Philippe De Muyter @ 2023-01-16 9:51 ` Philippe De Muyter 2023-01-16 10:16 ` Lorenzo Bianconi 1 sibling, 1 reply; 5+ messages in thread From: Philippe De Muyter @ 2023-01-16 9:51 UTC (permalink / raw) To: lorenzo, linux-iio; +Cc: Philippe De Muyter From: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Philippe De Muyter <phdm@macqel.be> --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h index 5b6f195748fc..499fcf8875b4 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h @@ -93,7 +93,7 @@ enum st_lsm6dsx_hw_id { .endianness = IIO_LE, \ }, \ .event_spec = &st_lsm6dsx_event, \ - .ext_info = st_lsm6dsx_accel_ext_info, \ + .ext_info = st_lsm6dsx_ext_info, \ .num_event_specs = 1, \ } @@ -113,6 +113,7 @@ enum st_lsm6dsx_hw_id { .storagebits = 16, \ .endianness = IIO_LE, \ }, \ + .ext_info = st_lsm6dsx_ext_info, \ } struct st_lsm6dsx_reg { @@ -528,7 +529,7 @@ st_lsm6dsx_device_set_enable(struct st_lsm6dsx_sensor *sensor, bool enable) } static const -struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_accel_ext_info[] = { +struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_ext_info[] = { IIO_MOUNT_MATRIX(IIO_SHARED_BY_ALL, st_lsm6dsx_get_mount_matrix), { } }; -- 2.31.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel. 2023-01-16 9:51 ` [PATCH 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter @ 2023-01-16 10:16 ` Lorenzo Bianconi 0 siblings, 0 replies; 5+ messages in thread From: Lorenzo Bianconi @ 2023-01-16 10:16 UTC (permalink / raw) To: Philippe De Muyter; +Cc: linux-iio, Philippe De Muyter [-- Attachment #1: Type: text/plain, Size: 1390 bytes --] > From: Philippe De Muyter <phdm@macqel.be> > > Signed-off-by: Philippe De Muyter <phdm@macqel.be> > --- > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> > > diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > index 5b6f195748fc..499fcf8875b4 100644 > --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h > @@ -93,7 +93,7 @@ enum st_lsm6dsx_hw_id { > .endianness = IIO_LE, \ > }, \ > .event_spec = &st_lsm6dsx_event, \ > - .ext_info = st_lsm6dsx_accel_ext_info, \ > + .ext_info = st_lsm6dsx_ext_info, \ > .num_event_specs = 1, \ > } > > @@ -113,6 +113,7 @@ enum st_lsm6dsx_hw_id { > .storagebits = 16, \ > .endianness = IIO_LE, \ > }, \ > + .ext_info = st_lsm6dsx_ext_info, \ > } > > struct st_lsm6dsx_reg { > @@ -528,7 +529,7 @@ st_lsm6dsx_device_set_enable(struct st_lsm6dsx_sensor *sensor, bool enable) > } > > static const > -struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_accel_ext_info[] = { > +struct iio_chan_spec_ext_info __maybe_unused st_lsm6dsx_ext_info[] = { > IIO_MOUNT_MATRIX(IIO_SHARED_BY_ALL, st_lsm6dsx_get_mount_matrix), > { } > }; > -- > 2.31.1 > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-16 10:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-01-16 9:51 [PATCH 0/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter 2023-01-16 9:51 ` [PATCH 1/2] iio: imu: st_lsm6dsx: fix naming of 'struct iio_info' Philippe De Muyter 2023-01-16 10:19 ` Lorenzo Bianconi 2023-01-16 9:51 ` [PATCH 2/2] iio: imu: st_lsm6dsx: add 'mount_matrix' sysfs entry to gyro channel Philippe De Muyter 2023-01-16 10:16 ` Lorenzo Bianconi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).