RE: [PATCH 0/2] kxcjk-1013 driver optimizations
> -Original Message- > From: Jonathan Cameron [mailto:ji...@kernel.org] > Sent: 21 February, 2015 20:27 > To: Tirdea, Irina; Peter Meerwald > Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Pandruvada, > Srinivas; Reus, Adriana > Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations > > On 20/02/15 12:03, Tirdea, Irina wrote: > > > > > >> -Original Message- > >> From: Peter Meerwald [mailto:pme...@pmeerw.net] > >> Sent: 16 February, 2015 21:14 > >> To: Tirdea, Irina > >> Cc: Jonathan Cameron; linux-...@vger.kernel.org; > >> linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana > >> Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations > >> > >> > >>> Adds optimization of i2c transactions in trigger handler and > >>> usage of available_scan_masks for kxcjk-1013. > >> > >> the 'optimization' changes the capabilities of the driver, reading > >> individual channel is not possible anymore > >> > > We can still read individual channels, just that the driver does not see > > that anymore and the demux is handled by the iio core. > > available_scan_masks contains the bitmap superset for all channels we can > > enable (I will remove the 0 available_scan_mask as it > does not makes sense). > Careful. That's there as a null terminator for this list of available scan > masks. Missed this. You are right, thanks! Seems it's good as is. > > When a new channel is enabled, the iio core checks if the new mask is a > > subset of any entry in available_scan_masks. > > When the buffer is pushed from the driver, the iio core will select only > > the enabled channel values. > > Pretty much. IIRC This originally went in as part of handling multiple > clients on these > data streams, but it was rapidly pointed out that lots of drivers spun their > own > versions to break out particular elements from a multichannel read. > As such, using the generic form saved on repetition in these cases as well. > A good, complex example is drivers/iio/adc/max1363 in which really weird > combinations > of channels (but far from all) are available for bulk capture and reading. > > > >>> Adriana Reus (2): > >>> iio: accel: kxcjk-1013: use available_scan_masks > >>> iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler > >>> > >>> drivers/iio/accel/kxcjk-1013.c | 50 > >>> -- > >>> 1 file changed, 39 insertions(+), 11 deletions(-) > >>> > >>> > >> > >> -- > >> > >> Peter Meerwald > >> +43-664-218 (mobile) > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > > the body of a message to majord...@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 0/2] kxcjk-1013 driver optimizations
-Original Message- From: Jonathan Cameron [mailto:ji...@kernel.org] Sent: 21 February, 2015 20:27 To: Tirdea, Irina; Peter Meerwald Cc: linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations On 20/02/15 12:03, Tirdea, Irina wrote: -Original Message- From: Peter Meerwald [mailto:pme...@pmeerw.net] Sent: 16 February, 2015 21:14 To: Tirdea, Irina Cc: Jonathan Cameron; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations Adds optimization of i2c transactions in trigger handler and usage of available_scan_masks for kxcjk-1013. the 'optimization' changes the capabilities of the driver, reading individual channel is not possible anymore We can still read individual channels, just that the driver does not see that anymore and the demux is handled by the iio core. available_scan_masks contains the bitmap superset for all channels we can enable (I will remove the 0 available_scan_mask as it does not makes sense). Careful. That's there as a null terminator for this list of available scan masks. Missed this. You are right, thanks! Seems it's good as is. When a new channel is enabled, the iio core checks if the new mask is a subset of any entry in available_scan_masks. When the buffer is pushed from the driver, the iio core will select only the enabled channel values. Pretty much. IIRC This originally went in as part of handling multiple clients on these data streams, but it was rapidly pointed out that lots of drivers spun their own versions to break out particular elements from a multichannel read. As such, using the generic form saved on repetition in these cases as well. A good, complex example is drivers/iio/adc/max1363 in which really weird combinations of channels (but far from all) are available for bulk capture and reading. Adriana Reus (2): iio: accel: kxcjk-1013: use available_scan_masks iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler drivers/iio/accel/kxcjk-1013.c | 50 -- 1 file changed, 39 insertions(+), 11 deletions(-) -- Peter Meerwald +43-664-218 (mobile) -- To unsubscribe from this list: send the line unsubscribe linux-iio in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/2] kxcjk-1013 driver optimizations
On 20/02/15 12:03, Tirdea, Irina wrote: > > >> -Original Message- >> From: Peter Meerwald [mailto:pme...@pmeerw.net] >> Sent: 16 February, 2015 21:14 >> To: Tirdea, Irina >> Cc: Jonathan Cameron; linux-...@vger.kernel.org; >> linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana >> Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations >> >> >>> Adds optimization of i2c transactions in trigger handler and >>> usage of available_scan_masks for kxcjk-1013. >> >> the 'optimization' changes the capabilities of the driver, reading >> individual channel is not possible anymore >> > We can still read individual channels, just that the driver does not see that > anymore and the demux is handled by the iio core. > available_scan_masks contains the bitmap superset for all channels we can > enable (I will remove the 0 available_scan_mask as it does not makes sense). Careful. That's there as a null terminator for this list of available scan masks. > When a new channel is enabled, the iio core checks if the new mask is a > subset of any entry in available_scan_masks. > When the buffer is pushed from the driver, the iio core will select only the > enabled channel values. Pretty much. IIRC This originally went in as part of handling multiple clients on these data streams, but it was rapidly pointed out that lots of drivers spun their own versions to break out particular elements from a multichannel read. As such, using the generic form saved on repetition in these cases as well. A good, complex example is drivers/iio/adc/max1363 in which really weird combinations of channels (but far from all) are available for bulk capture and reading. > >>> Adriana Reus (2): >>> iio: accel: kxcjk-1013: use available_scan_masks >>> iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler >>> >>> drivers/iio/accel/kxcjk-1013.c | 50 >>> -- >>> 1 file changed, 39 insertions(+), 11 deletions(-) >>> >>> >> >> -- >> >> Peter Meerwald >> +43-664-218 (mobile) > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/2] kxcjk-1013 driver optimizations
On 20/02/15 12:03, Tirdea, Irina wrote: -Original Message- From: Peter Meerwald [mailto:pme...@pmeerw.net] Sent: 16 February, 2015 21:14 To: Tirdea, Irina Cc: Jonathan Cameron; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations Adds optimization of i2c transactions in trigger handler and usage of available_scan_masks for kxcjk-1013. the 'optimization' changes the capabilities of the driver, reading individual channel is not possible anymore We can still read individual channels, just that the driver does not see that anymore and the demux is handled by the iio core. available_scan_masks contains the bitmap superset for all channels we can enable (I will remove the 0 available_scan_mask as it does not makes sense). Careful. That's there as a null terminator for this list of available scan masks. When a new channel is enabled, the iio core checks if the new mask is a subset of any entry in available_scan_masks. When the buffer is pushed from the driver, the iio core will select only the enabled channel values. Pretty much. IIRC This originally went in as part of handling multiple clients on these data streams, but it was rapidly pointed out that lots of drivers spun their own versions to break out particular elements from a multichannel read. As such, using the generic form saved on repetition in these cases as well. A good, complex example is drivers/iio/adc/max1363 in which really weird combinations of channels (but far from all) are available for bulk capture and reading. Adriana Reus (2): iio: accel: kxcjk-1013: use available_scan_masks iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler drivers/iio/accel/kxcjk-1013.c | 50 -- 1 file changed, 39 insertions(+), 11 deletions(-) -- Peter Meerwald +43-664-218 (mobile) -- To unsubscribe from this list: send the line unsubscribe linux-iio in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 0/2] kxcjk-1013 driver optimizations
> -Original Message- > From: Peter Meerwald [mailto:pme...@pmeerw.net] > Sent: 16 February, 2015 21:14 > To: Tirdea, Irina > Cc: Jonathan Cameron; linux-...@vger.kernel.org; > linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana > Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations > > > > Adds optimization of i2c transactions in trigger handler and > > usage of available_scan_masks for kxcjk-1013. > > the 'optimization' changes the capabilities of the driver, reading > individual channel is not possible anymore > We can still read individual channels, just that the driver does not see that anymore and the demux is handled by the iio core. available_scan_masks contains the bitmap superset for all channels we can enable (I will remove the 0 available_scan_mask as it does not makes sense). When a new channel is enabled, the iio core checks if the new mask is a subset of any entry in available_scan_masks. When the buffer is pushed from the driver, the iio core will select only the enabled channel values. > > Adriana Reus (2): > > iio: accel: kxcjk-1013: use available_scan_masks > > iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler > > > > drivers/iio/accel/kxcjk-1013.c | 50 > > -- > > 1 file changed, 39 insertions(+), 11 deletions(-) > > > > > > -- > > Peter Meerwald > +43-664-218 (mobile) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
RE: [PATCH 0/2] kxcjk-1013 driver optimizations
-Original Message- From: Peter Meerwald [mailto:pme...@pmeerw.net] Sent: 16 February, 2015 21:14 To: Tirdea, Irina Cc: Jonathan Cameron; linux-...@vger.kernel.org; linux-kernel@vger.kernel.org; Pandruvada, Srinivas; Reus, Adriana Subject: Re: [PATCH 0/2] kxcjk-1013 driver optimizations Adds optimization of i2c transactions in trigger handler and usage of available_scan_masks for kxcjk-1013. the 'optimization' changes the capabilities of the driver, reading individual channel is not possible anymore We can still read individual channels, just that the driver does not see that anymore and the demux is handled by the iio core. available_scan_masks contains the bitmap superset for all channels we can enable (I will remove the 0 available_scan_mask as it does not makes sense). When a new channel is enabled, the iio core checks if the new mask is a subset of any entry in available_scan_masks. When the buffer is pushed from the driver, the iio core will select only the enabled channel values. Adriana Reus (2): iio: accel: kxcjk-1013: use available_scan_masks iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler drivers/iio/accel/kxcjk-1013.c | 50 -- 1 file changed, 39 insertions(+), 11 deletions(-) -- Peter Meerwald +43-664-218 (mobile) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/2] kxcjk-1013 driver optimizations
> Adds optimization of i2c transactions in trigger handler and > usage of available_scan_masks for kxcjk-1013. the 'optimization' changes the capabilities of the driver, reading individual channel is not possible anymore > Adriana Reus (2): > iio: accel: kxcjk-1013: use available_scan_masks > iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler > > drivers/iio/accel/kxcjk-1013.c | 50 > -- > 1 file changed, 39 insertions(+), 11 deletions(-) > > -- Peter Meerwald +43-664-218 (mobile) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/2] kxcjk-1013 driver optimizations
Adds optimization of i2c transactions in trigger handler and usage of available_scan_masks for kxcjk-1013. Adriana Reus (2): iio: accel: kxcjk-1013: use available_scan_masks iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler drivers/iio/accel/kxcjk-1013.c | 50 -- 1 file changed, 39 insertions(+), 11 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 0/2] kxcjk-1013 driver optimizations
Adds optimization of i2c transactions in trigger handler and usage of available_scan_masks for kxcjk-1013. the 'optimization' changes the capabilities of the driver, reading individual channel is not possible anymore Adriana Reus (2): iio: accel: kxcjk-1013: use available_scan_masks iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler drivers/iio/accel/kxcjk-1013.c | 50 -- 1 file changed, 39 insertions(+), 11 deletions(-) -- Peter Meerwald +43-664-218 (mobile) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 0/2] kxcjk-1013 driver optimizations
Adds optimization of i2c transactions in trigger handler and usage of available_scan_masks for kxcjk-1013. Adriana Reus (2): iio: accel: kxcjk-1013: use available_scan_masks iio: accel: kxcjk-1013: optimize i2c transfers in trigger handler drivers/iio/accel/kxcjk-1013.c | 50 -- 1 file changed, 39 insertions(+), 11 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/