[PATCH] gpiolib: Fix incorrect use of find_next_zero_bit()

2018-09-29 Thread Janusz Krzysztofik
infinite loop. Fix it by incrementing the index uncoditionally before find_next_zero_bit() is optionally called. Reported-by: Marek Szyprowski Signed-off-by: Janusz Krzysztofik --- Marek, Could you please test it on top of next-20180920 with "gpiolib: Fix missing updates of bitmap i

Re: [PATCH 0/2] gpiolib: Fix issues introduced by fast bitmap processing path

2018-09-24 Thread Janusz Krzysztofik
Hi Marek, 2018-09-24 13:38 GMT+02:00, Marek Szyprowski : > Hi Janusz, > > On 2018-09-24 13:08, Janusz Krzysztofik wrote: >> 2018-09-24 11:43 GMT+02:00, Marek Szyprowski : >>> On 2018-09-24 01:53, Janusz Krzysztofik wrote: >>>> While investigating possible re

Re: [PATCH 0/2] gpiolib: Fix issues introduced by fast bitmap processing path

2018-09-24 Thread Janusz Krzysztofik
Hi Marek, 2018-09-24 11:43 GMT+02:00, Marek Szyprowski : > Hi Janusz, > > On 2018-09-24 01:53, Janusz Krzysztofik wrote: >> While investigating possible reasons of GPIO fast bitmap processing >> related boot hang on Samsung Snow Chromebook, reported by Marek >>

[PATCH 1/2] gpiolib: Fix missing updates of bitmap index

2018-09-23 Thread Janusz Krzysztofik
loop. Fix it. Signed-off-by: Janusz Krzysztofik --- drivers/gpio/gpiolib.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index a53d17745d21..7d9536a79a66 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c

[PATCH 2/2] gpiolib: Fix array members of same chip processed separately

2018-09-23 Thread Janusz Krzysztofik
chip which don't follow the equal numbering rule. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/board.rst | 19 +- drivers/gpio/gpiolib.c | 35 +++-- 2 files changed, 39 insertions(+), 15 deletion

[PATCH 0/2] gpiolib: Fix issues introduced by fast bitmap processing path

2018-09-23 Thread Janusz Krzysztofik
, hopefully fixed by PATCH 2/2. See commit messages for details. Janusz Krzysztofik (2): gpiolib: Fix missing updates of bitmap index gpiolib: Fix array members of same chip processed separately The fixes should resolve the boot hang observed by Marek, however the second change

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-23 Thread Janusz Krzysztofik
On Friday, September 21, 2018 4:14:06 PM CEST Marek Szyprowski wrote: > Hi Janusz, > > > On 2018-09-21 12:51, Janusz Krzysztofik wrote: > > 2018-09-21 10:18 GMT+02:00, Marek Szyprowski : > >> On 2018-09-20 18:21, Janusz Krzysztofik wrote: > >>> On Thurs

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-21 Thread Janusz Krzysztofik
Hi Marek, 2018-09-21 12:51 GMT+02:00, Janusz Krzysztofik : > Hi Marek, > > 2018-09-21 10:18 GMT+02:00, Marek Szyprowski : >> Hi Janusz, >> >> On 2018-09-20 18:21, Janusz Krzysztofik wrote: >>> On Thursday, September 20, 2018 5:48:22 PM CEST Janusz Krz

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-21 Thread Janusz Krzysztofik
Hi Marek, 2018-09-21 10:18 GMT+02:00, Marek Szyprowski : > Hi Janusz, > > On 2018-09-20 18:21, Janusz Krzysztofik wrote: >> On Thursday, September 20, 2018 5:48:22 PM CEST Janusz Krzysztofik wrote: >>> On Thursday, September 20, 2018 12:11:48 PM CEST Marek Szyprowski wrot

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-20 Thread Janusz Krzysztofik
On Thursday, September 20, 2018 5:48:22 PM CEST Janusz Krzysztofik wrote: > On Thursday, September 20, 2018 12:11:48 PM CEST Marek Szyprowski wrote: > > Hi All, > > > > On 2018-09-02 14:01, Janusz Krzysztofik wrote: > > > Certain GPIO descriptor arrays returned b

Re: [PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-20 Thread Janusz Krzysztofik
On Thursday, September 20, 2018 12:11:48 PM CEST Marek Szyprowski wrote: > Hi All, > > On 2018-09-02 14:01, Janusz Krzysztofik wrote: > > Certain GPIO descriptor arrays returned by gpio_get_array() may contain > > information on direct mapping of array members to pins of a

[PATCH v8 3/4] gpiolib: Pass array info to get/set array functions

2018-09-05 Thread Janusz Krzysztofik
Brodowski Cc: Russell King Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Yegor Yefremov Cc: Uwe Kleine-König Signed-off-by: Janusz K

[PATCH v8 2/4] gpiolib: Identify arrays matching GPIO hardware

2018-09-05 Thread Janusz Krzysztofik
performance as soon as get/set array functions can accept and make efficient use of it. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/consumer.rst | 4 +- drivers/gpio/gpiolib.c | 72 +- drivers/gpio/gpiolib.h

[PATCH v8 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-09-05 Thread Janusz Krzysztofik
ameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Yegor Yefremov Cc: Uwe Kleine-König Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven --- Documentation/driver-api/gpio/co

[PATCH v8 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-05 Thread Janusz Krzysztofik
on iterations. Add respective code to gpiod_get/set_array_bitmap_complex() functions. Pins not applicable for fast path are processed as before, skipping over the 'fast' ones. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/board.rst| 15

[PATCH v8 0/4] gpiolib: speed up GPIO array processing

2018-09-05 Thread Janusz Krzysztofik
Delta board with NAND driver updated to use GPIO API for data I/O. Performance degrade compared to PIO is much better than before the optimization though not quite satisfactory on my test hardware. Janusz Krzysztofik (4): gpiolib: Pass bitmaps, not integer arrays, to get/set array gpiolib

[PATCH v7 4/4] gpiolib: Implement fast processing path in get/set array

2018-09-02 Thread Janusz Krzysztofik
on iterations. Add respective code to gpiod_get/set_array_bitmap_complex() functions. Pins not applicable for fast path are processed as before, skipping over the 'fast' ones. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/board.rst| 15

[PATCH v7 2/4] gpiolib: Identify arrays matching GPIO hardware

2018-09-02 Thread Janusz Krzysztofik
performance as soon as get/set array functions can accept and make efficient use of it. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/consumer.rst | 4 +- drivers/gpio/gpiolib.c | 72 +- drivers/gpio/gpiolib.h

[PATCH v7 3/4] gpiolib: Pass array info to get/set array functions

2018-09-02 Thread Janusz Krzysztofik
Brodowski Cc: Russell King Cc: Kishon Vijay Abraham I Cc: Tony Lindgren Cc: Lars-Peter Clausen Cc: Michael Hennerich Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Yegor Yefremov Cc: Uwe Kleine-König Signed-off-by: Janusz K

[PATCH v7 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-09-02 Thread Janusz Krzysztofik
nerich Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Yegor Yefremov Cc: Uwe Kleine-König Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson --- Documentation/driver-api/gpio/consumer.rst | 22 drivers/auxdisplay

[PATCH v7 0/4] gpiolib: speed up GPIO array processing

2018-09-02 Thread Janusz Krzysztofik
Delta board with NAND driver updated to use GPIO API for data I/O. Performance degrade compared to PIO is much better than before the optimization though not quite satisfactory on my test hardware. Janusz Krzysztofik (4): gpiolib: Pass bitmaps, not integer arrays, to get/set array gpiolib

Re: [PATCH v5 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-09-02 Thread Janusz Krzysztofik
Hi Miguel, On Thursday, August 30, 2018 1:10:59 PM CEST Miguel Ojeda wrote: > Hi Janusz, > > On Wed, Aug 29, 2018 at 10:48 PM, Janusz Krzysztofik > wrote: > > ... > > /* High nibble + RS, RW */ > > - for (i = 4; i < 8; i++) > > -

[PATCH v6 2/4] gpiolib: Identify arrays matching GPIO hardware

2018-08-31 Thread Janusz Krzysztofik
performance as soon as get/set array functions can accept and make efficient use of it. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/consumer.rst | 4 +- drivers/gpio/gpiolib.c | 72 +- drivers/gpio/gpiolib.h

[PATCH v6 3/4] gpiolib: Pass array info to get/set array functions

2018-08-31 Thread Janusz Krzysztofik
: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson --- Documentation/driver-api/gpio/consumer.rst | 14 ++-- drivers/auxdisplay/hd44780.c| 12 ++ driv

[PATCH v6 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-31 Thread Janusz Krzysztofik
Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson --- Documentation/driver-api/gpio/consumer.rst | 22 drivers/auxdisplay/hd44780.c| 62 - drivers/bus/ts-nbus.c | 21 ++- drivers/gpio/gpio-max3191x.c| 17 +++--

[PATCH v6 4/4] gpiolib: Implement fast processing path in get/set array

2018-08-31 Thread Janusz Krzysztofik
on iterations. Add respective code to gpiod_get/set_array_bitmap_complex() functions. Pins not applicable for fast path are processed as before, skipping over the 'fast' ones. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/board.rst| 15

[PATH v6 0/4] gpiolib: speed up GPIO array processing

2018-08-31 Thread Janusz Krzysztofik
Delta board with NAND driver updated to use GPIO API for data I/O. Performance degrade compared to PIO is much better than before the optimization but still not quite satisfactory. Janusz Krzysztofik (4): gpiolib: Pass bitmaps, not integer arrays, to get/set array gpiolib: Identify arrays

[PATCH v5 4/4] gpiolib: Implement fast processing path in get/set array

2018-08-29 Thread Janusz Krzysztofik
on iterations. Add respective code to gpiod_get/set_array_bitmap_complex() functions. Pins not applicable for fast path are processed as before, skipping over the 'fast' ones. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/board.rst| 15

[PATCH v5 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-29 Thread Janusz Krzysztofik
Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson --- Documentation/driver-api/gpio/consumer.rst | 22 drivers/auxdisplay/hd44780.c| 52 + drivers/bus/ts-nbus.c | 19 ++- drivers/gpio/gpio-max3191x.c| 17 +++--- dr

[PATCH v5 3/4] gpiolib: Pass array info to get/set array functions

2018-08-29 Thread Janusz Krzysztofik
: Jonathan Cameron Cc: Hartmut Knaack Cc: Peter Meerwald-Stadler Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Janusz Krzysztofik Acked-by: Ulf Hansson --- Documentation/driver-api/gpio/consumer.rst | 14 ++-- drivers/auxdisplay/hd44780.c| 12 ++ driv

[PATCH v5 2/4] gpiolib: Identify arrays matching GPIO hardware

2018-08-29 Thread Janusz Krzysztofik
performance as soon as get/set array functions can accept and make efficient use of it. Cc: Jonathan Corbet Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/consumer.rst | 4 +- drivers/gpio/gpiolib.c | 72 +- drivers/gpio/gpiolib.h

[PATH v5 0/4] gpiolib: speed up GPIO array processing

2018-08-29 Thread Janusz Krzysztofik
Delta board with NAND driver updated to use GPIO API for data I/O. Performance degrade compared to PIO is much better than before the optimization but still not quite satisfactory. Janusz Krzysztofik (4): gpiolib: Pass bitmaps, not integer arrays, to get/set array gpiolib: Identify arrays

Re: [RFC RFT PATCH 0/4] gpiolib: speed up GPIO array processing

2018-08-29 Thread Janusz Krzysztofik
Hi Linus, On Wednesday, August 29, 2018 11:06:21 AM CEST Linus Walleij wrote: > On Tue, Aug 21, 2018 at 1:42 AM Janusz Krzysztofik wrote: > > > This series is a follow up of the former "mtd: rawnand: ams-delta: Use > > gpio-omap accessors for data I/O" which al

Re: [RFC RFT PATCH v4 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-29 Thread Janusz Krzysztofik
On Wednesday, August 29, 2018 2:03:18 PM CEST Miguel Ojeda wrote: > Hi Janusz, > > On Tue, Aug 21, 2018 at 1:43 AM, Janusz Krzysztofik > wrote: > > Most users of get/set array functions iterate consecutive bits of data, > > usually a single integer, while or processing a

[RFC RFT PATCH v4 3/4] gpiolib: Pass array info to get/set array functions

2018-08-20 Thread Janusz Krzysztofik
bulids an array itself from single GPIOs. Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/consumer.rst | 14 ++-- drivers/auxdisplay/hd44780.c| 12 ++ drivers/bus/ts-nbus.c | 6 +++-- drivers/gpio/gpio-max3191x.c

[RFC RFT PATCH v4 4/4] gpiolib: Implement fast processing path in get/set array

2018-08-20 Thread Janusz Krzysztofik
on iterations. Add respective code to gpiod_get/set_array_bitmap_complex() functions. Pins not applicable for fast path are processed as before, skipping over the 'fast' ones. Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/board.rst| 15 ++ Documentation/driver-api/gpio

[RFC RFT PATCH 0/4] gpiolib: speed up GPIO array processing

2018-08-20 Thread Janusz Krzysztofik
IO API can be used for data I/O without much loss of speed. Created and tested on a low end Amstrad Delta board with NAND driver updated to use GPIO API for data I/O. Performance degrade compared to PIO is much better than before the optimization but still not quite satisfactory. Janusz Krzy

[RFC RFT PATCH v4 1/4] gpiolib: Pass bitmaps, not integer arrays, to get/set array

2018-08-20 Thread Janusz Krzysztofik
. All current users are updated as well. More benefits from the change are expected as soon as planned support for accepting/passing those bitmaps directly from/to respective GPIO chip callbacks if applicable is implemented. Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio

[RFC RFT PATCH v4 2/4] gpiolib: Identify arrays matching GPIO hardware

2018-08-20 Thread Janusz Krzysztofik
performance as soon as get/set array functions can accept and make efficient use of it. Signed-off-by: Janusz Krzysztofik --- Documentation/driver-api/gpio/consumer.rst | 4 +- drivers/gpio/gpiolib.c | 72 +- drivers/gpio/gpiolib.h

[RFC] [PATCH 3/3] staging: media: omap1: use dmaengine

2016-06-16 Thread Janusz Krzysztofik
Created and tested on Amstrad Delta on top of Linux-4.7-rc3 with "staging: media: omap1: convert to videobuf2" applied. Signed-off-by: Janusz Krzysztofik <jmkrzy...@gmail.com> --- drivers/staging/media/omap1/Kconfig| 2 +- drivers/staging/media/omap1/omap

[RFC] [PATCH 2/3] staging: media: omap1: convert to videobuf2

2016-06-16 Thread Janusz Krzysztofik
Created and tested on Amstrad Delta on top of Linux-4.7-rc3 with "staging: media: omap1: drop videobuf-dma-sg mode" applied. Signed-off-by: Janusz Krzysztofik <jmkrzy...@gmail.com> --- drivers/staging/media/omap1/Kconfig| 2 +- drivers/staging/media/omap1/omap

[RFC] [PATCH 1/3] staging: media: omap1: drop videobuf-dma-sg mode

2016-06-16 Thread Janusz Krzysztofik
fixes applied. Signed-off-by: Janusz Krzysztofik <jmkrzy...@gmail.com> --- drivers/staging/media/omap1/Kconfig | 1 - drivers/staging/media/omap1/omap1_camera.c | 445 --- include/linux/platform_data/media/omap1_camera.h | 9 - 3 files chang

[RFC] [PATCH 0/3] media: an attempt to refresh omap1_camera driver

2016-06-16 Thread Janusz Krzysztofik
how much time I have for that, i.e., when the soc-camera framework is going to be depreciated. Thanks, Janusz Janusz Krzysztofik (3): staging: media: omap1: drop videobuf-dma-sg mode staging: media: omap1: convert to videobuf2 staging: media: omap1: use dmaengine drivers/staging/media

[PATCH 3/3] media: i2c/soc_camera: fix ov6650 sensor getting wrong clock

2016-06-15 Thread Janusz Krzysztofik
;mclk", started to return respective CCF clock instead of the V4l2 one registered by soc_camera. Fix it by calling v4l2_clk_get() with NULL clock name. Created and tested on Amstrad Delta against Linux-4.7-rc3 with omap1_camera fixes. Signed-off-by: Janusz Krzysztofik <jmkrzy...@gmail.com&

[PATCH 2/3] staging: media: omap1: fix sensor probe not working anymore

2016-06-15 Thread Janusz Krzysztofik
soc_camera_host_register() invocation with clock_start() / clock_stop(). Created and tested on Amstrad Delta against Linux-4.7-rc3 with 'staging: media: omap1: fix null pointer dereference in omap1_cam_probe()' applied. Signed-off-by: Janusz Krzysztofik <jmkrzy...@gmail.com> --- drivers/s

[PATCH 1/3] staging: media: omap1: fix null pointer dereference in omap1_cam_probe()

2016-06-15 Thread Janusz Krzysztofik
hile being at it: - follow the recently introduced convention of direct return instead of jump to return with err value assigned, - drop no longer needed res member from the definition of struct omap1_cam_dev. Created and tested on Amstrad Delta aginst Linux-4.7-rc3 Signed-off-by: Janusz Krzysztof

[PATCH 0/3] media: fixes for Amstrad Delta camera

2016-06-15 Thread Janusz Krzysztofik
Janusz Krzysztofik (3): staging: media: omap1: fix null pointer dereference in omap1_cam_probe() staging: media: omap1: fix sensor probe not working anymore media: i2c/soc_camera: fix ov6650 sensor getting wrong clock drivers/media/i2c/soc_camera/ov6650.c | 2 +- drivers/staging