Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516021 > unrolled thread
| Started by | Daniel Baluta <daniel.baluta@gmail.com> |
|---|---|
| First post | 2016-11-07 12:40 +0100 |
| Last post | 2016-11-07 17:50 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes Daniel Baluta <daniel.baluta@gmail.com> - 2016-11-07 12:40 +0100
Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes Daniel Baluta <daniel.baluta@gmail.com> - 2016-11-07 13:20 +0100
Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes Slawomir Stepien <sst@poczta.fm> - 2016-11-07 17:50 +0100
| From | Daniel Baluta <daniel.baluta@gmail.com> |
|---|---|
| Date | 2016-11-07 12:40 +0100 |
| Subject | Re: [PATCH v3 1/8] iio:core: add a callback to allow drivers to provide _available attributes |
| Message-ID | <sAQro-2rT-9@gated-at.bofh.it> |
On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin <peda@axentia.se> wrote: > From: Jonathan Cameron <jic23@kernel.org> > > A large number of attributes can only take a limited range of values. > Currently in IIO this is handled by directly registering additional > *_available attributes thus providing this information to userspace. > > It is desirable to provide this information via the core for much the same > reason this was done for the actual channel information attributes in the > first place. If it isn't there, then it can only really be accessed from > userspace. Other in kernel IIO consumers have no access to what valid > parameters are. > > Two forms are currently supported: > * list of values in one particular IIO_VAL_* format. > e.g. 1.300000 1.500000 1.730000 > * range specification with a step size: > e.g. [1.000000 0.500000 2.500000] > equivalent to 1.000000 1.5000000 2.000000 2.500000 Is there any driver using this format? :) > > An addition set of masks are used to allow different sharing rules for the > *_available attributes generated. > > This allows for example: > > in_accel_x_offset > in_accel_y_offset > in_accel_offset_available. > > We could have gone with having a specification for each and every > info_mask element but that would have meant changing the existing userspace > ABI. This approach does not. > > Signed-off-by: Jonathan Cameron <jic23@kernel.org> > [forward ported, added some docs and fixed buffer overflows /peda] > Signed-off-by: Peter Rosin <peda@axentia.se> The patch looks good to me at a first glance.
[toc] | [next] | [standalone]
| From | Daniel Baluta <daniel.baluta@gmail.com> |
|---|---|
| Date | 2016-11-07 13:20 +0100 |
| Message-ID | <sAR45-30v-3@gated-at.bofh.it> |
| In reply to | #1516021 |
On Mon, Nov 7, 2016 at 1:57 PM, Peter Rosin <peda@axentia.se> wrote: > On 2016-11-07 12:37, Daniel Baluta wrote: >> On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin <peda@axentia.se> wrote: >>> From: Jonathan Cameron <jic23@kernel.org> >>> >>> A large number of attributes can only take a limited range of values. >>> Currently in IIO this is handled by directly registering additional >>> *_available attributes thus providing this information to userspace. >>> >>> It is desirable to provide this information via the core for much the same >>> reason this was done for the actual channel information attributes in the >>> first place. If it isn't there, then it can only really be accessed from >>> userspace. Other in kernel IIO consumers have no access to what valid >>> parameters are. >>> >>> Two forms are currently supported: >>> * list of values in one particular IIO_VAL_* format. >>> e.g. 1.300000 1.500000 1.730000 >>> * range specification with a step size: >>> e.g. [1.000000 0.500000 2.500000] >>> equivalent to 1.000000 1.5000000 2.000000 2.500000 >> >> Is there any driver using this format? :) > > Yes, soon. Hopefully. See patch 3/8 > iio: mcp4531: provide range of available raw values > https://patchwork.kernel.org/patch/9391283/ > >>> >>> An addition set of masks are used to allow different sharing rules for the >>> *_available attributes generated. >>> >>> This allows for example: >>> >>> in_accel_x_offset >>> in_accel_y_offset >>> in_accel_offset_available. >>> >>> We could have gone with having a specification for each and every >>> info_mask element but that would have meant changing the existing userspace >>> ABI. This approach does not. >>> >>> Signed-off-by: Jonathan Cameron <jic23@kernel.org> >>> [forward ported, added some docs and fixed buffer overflows /peda] >>> Signed-off-by: Peter Rosin <peda@axentia.se> >> >> The patch looks good to me at a first glance. > > Thanks, may I add your acked-by if/when I respin? Yes. You can have it from here: Acked-by: Daniel Baluta <daniel.baluta@intel.com> thanks, Daniel.
[toc] | [prev] | [next] | [standalone]
| From | Slawomir Stepien <sst@poczta.fm> |
|---|---|
| Date | 2016-11-07 17:50 +0100 |
| Message-ID | <sAVho-5CE-19@gated-at.bofh.it> |
| In reply to | #1516021 |
On Nov 07, 2016 12:57, Peter Rosin wrote: > On 2016-11-07 12:37, Daniel Baluta wrote: > > On Mon, Oct 24, 2016 at 1:39 AM, Peter Rosin <peda@axentia.se> wrote: > >> From: Jonathan Cameron <jic23@kernel.org> > >> > >> A large number of attributes can only take a limited range of values. > >> Currently in IIO this is handled by directly registering additional > >> *_available attributes thus providing this information to userspace. > >> > >> It is desirable to provide this information via the core for much the same > >> reason this was done for the actual channel information attributes in the > >> first place. If it isn't there, then it can only really be accessed from > >> userspace. Other in kernel IIO consumers have no access to what valid > >> parameters are. > >> > >> Two forms are currently supported: > >> * list of values in one particular IIO_VAL_* format. > >> e.g. 1.300000 1.500000 1.730000 > >> * range specification with a step size: > >> e.g. [1.000000 0.500000 2.500000] > >> equivalent to 1.000000 1.5000000 2.000000 2.500000 > > > > Is there any driver using this format? :) > > Yes, soon. Hopefully. See patch 3/8 > iio: mcp4531: provide range of available raw values > https://patchwork.kernel.org/patch/9391283/ I would also like to add this to mcp4131.c and ds1803.c. -- Slawomir Stepien
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web