Re: [PATCH v10 33/33] counter: 104-quad-8: Add IRQ support for the ACCES 104-QUAD-8

2021-04-15 Thread Syed Nayyar Waris
s > push Counter events to event channel X, where 'X' is the respective > channel whose FLG1 activated. > > This patch adds IRQ support for the ACCES 104-QUAD-8. The interrupt line > numbers for the devices may be configured via the irq array module > parameter. > &

Re: [PATCH v10 32/33] counter: 104-quad-8: Replace mutex with spinlock

2021-04-15 Thread Syed Nayyar Waris
gt; spinlock instead. > > Cc: Syed Nayyar Waris > Signed-off-by: William Breathitt Gray > --- > drivers/counter/104-quad-8.c | 90 +--- > 1 file changed, 53 insertions(+), 37 deletions(-) Acked-by: Syed Nayyar Waris > > diff --git a/dr

Re: [PATCH v10 21/33] counter: Rename counter_count_function to counter_function

2021-04-15 Thread Syed Nayyar Waris
nction" phrase > to make the intent of this code clearer. > > Cc: Syed Nayyar Waris > Cc: Patrick Havelange > Cc: Oleksij Rempel > Cc: Kamel Bouhara > Cc: Fabrice Gasnier > Cc: Maxime Coquelin > Cc: Alexandre Torgue > Cc: David Lechner > Signed-off-by:

Re: [PATCH v10 20/33] counter: Rename counter_signal_value to counter_signal_level

2021-04-15 Thread Syed Nayyar Waris
On Fri, Mar 19, 2021 at 08:00:39PM +0900, William Breathitt Gray wrote: > Signal values will always be levels so let's be explicit it about it to > make the intent of the code clear. > > Cc: Syed Nayyar Waris > Cc: Oleksij Rempel > Cc: Kamel Bouhara > Reviewed-by: David

Re: [PATCH v10 19/33] counter: Standardize to ERANGE for limit exceeded errors

2021-04-15 Thread Syed Nayyar Waris
On Fri, Mar 19, 2021 at 08:00:38PM +0900, William Breathitt Gray wrote: > ERANGE is a semantically better error code to return when an argument > value falls outside the supported limit range of a device. > > Cc: Syed Nayyar Waris > Cc: Oleksij Rempel > Cc: Fabrice Gas

Re: [PATCH v10 18/33] counter: Return error code on invalid modes

2021-04-15 Thread Syed Nayyar Waris
ut > it's good to define a default switch cases for the sake of making the > intent of the code clear. > > Cc: Syed Nayyar Waris > Cc: Kamel Bouhara > Cc: Fabrice Gasnier > Cc: Maxime Coquelin > Cc: Alexandre Torgue > Cc: David Lechner > Signed-off-by: William B

Re: [PATCH v10 12/33] counter: 104-quad-8: Add const qualifier for actions_list array

2021-04-15 Thread Syed Nayyar Waris
actions_list. > > Cc: Syed Nayyar Waris > Signed-off-by: William Breathitt Gray > --- > drivers/counter/104-quad-8.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c >

Re: [PATCH v10 07/33] counter: 104-quad-8: Add const qualifier for functions_list array

2021-04-15 Thread Syed Nayyar Waris
On Fri, Mar 19, 2021 at 08:00:26PM +0900, William Breathitt Gray wrote: > The struct counter_count functions_list member expects a const enum > counter_count_function array. This patch adds the const qualifier to the > quad8_count_functions_list to match functions_list. > > Cc: Sy

Re: [PATCH v10 06/33] counter: 104-quad-8: Add const qualifiers for quad8_preset_register_set

2021-04-15 Thread Syed Nayyar Waris
On Fri, Mar 19, 2021 at 08:00:25PM +0900, William Breathitt Gray wrote: > Add some safety by qualifying the quad8_preset_register_set() function > parameters as const. > > Cc: Syed Nayyar Waris > Signed-off-by: William Breathitt Gray > --- > drivers/counter/104-quad-8

Re: [PATCH v10 05/33] counter: 104-quad-8: Annotate hardware config module parameter

2021-04-15 Thread Syed Nayyar Waris
ote that we do still need to do the module initialisation because some > drivers have viable defaults set in case parameters aren't specified and > some drivers support automatic configuration (e.g. PNP or PCI) in addition > to manually coded parameters. > > This patch annotates the 10

Re: [PATCH v10 04/33] counter: 104-quad-8: Return error when invalid mode during ceiling_write

2021-04-15 Thread Syed Nayyar Waris
's report it as such by > returning -EINVAL. > > Fixes: fc069262261c ("counter: 104-quad-8: Add lock guards - generic > interface") > Cc: Syed Nayyar Waris > Signed-off-by: William Breathitt Gray > --- > drivers/counter/104-quad-8.c | 5 +++-- > 1 file changed, 3 insertions(+), 2

Re: [PATCH v10 03/33] counter: 104-quad-8: Remove pointless comment

2021-04-15 Thread Syed Nayyar Waris
On Fri, Mar 19, 2021 at 08:00:22PM +0900, William Breathitt Gray wrote: > It is obvious that devm_counter_register() is used to register a Counter > device, so a comment stating such is pointless here. > > Cc: Syed Nayyar Waris > Signed-off-by: William Breathitt Gray > ---

[RESEND PATCH v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-02 Thread Syed Nayyar Waris
can check each channel at a time and save cycles. Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpio-xilinx.c | 52 +++--- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git

[RESEND PATCH v4 2/3] gpio: thunderx: Utilize for_each_set_nbits macro

2021-04-02 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpio-thunderx.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c index 9f66deab46ea..4349e7393a1d 100644

[RESEND PATCH v4 1/3] gpiolib: Introduce the for_each_set_nbits macro

2021-04-02 Thread Syed Nayyar Waris
c: Linus Walleij Cc: Bartosz Gołaszewski Cc: Arnd Bergmann Cc: Andy Shevchenko Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpiolib.c | 90 ++ drivers/gpio/gpiolib.h | 28 + 2 files changed, 118 inser

[RESEND PATCH v4 0/3] Introduce the for_each_set_nbits macro

2021-04-02 Thread Syed Nayyar Waris
. - Remove tests from lib/test_bitmap.c as 'for_each_set_clump' is now localised inside gpio/ only. Syed Nayyar Waris (3): gpiolib: Introduce the for_each_set_nbits macro gpio: thunderx: Utilize for_each_set_nbits macro gpio: xilinx: Utilize generic bitmap_get_value and _set_value drivers/gpio

Re: [PATCH v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-02 Thread Syed Nayyar Waris
On Fri, Apr 2, 2021 at 3:42 PM Syed Nayyar Waris wrote: > > This patch reimplements the xgpio_set_multiple() function in > drivers/gpio/gpio-xilinx.c to use the new generic functions: > bitmap_get_value() and bitmap_set_value(). The code is now simpler > to read and understand. Mo

[PATCH v4 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-02 Thread Syed Nayyar Waris
can check each channel at a time and save cycles. Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpio-xilinx.c | 60 +++--- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git

[PATCH v4 2/3] gpio: thunderx: Utilize for_each_set_nbits macro

2021-04-02 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpio-thunderx.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c index 9f66deab46ea..4349e7393a1d 100644

[PATCH v4 1/3] gpiolib: Introduce the for_each_set_nbits macro

2021-04-02 Thread Syed Nayyar Waris
c: Linus Walleij Cc: Bartosz Gołaszewski Cc: Arnd Bergmann Cc: Andy Shevchenko Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpiolib.c | 90 ++ drivers/gpio/gpiolib.h | 28 + 2 files changed, 118 inser

[PATCH v4 0/3] Introduce the for_each_set_nbits macro

2021-04-02 Thread Syed Nayyar Waris
. - Remove tests from lib/test_bitmap.c as 'for_each_set_clump' is now localised inside gpio/ only. Syed Nayyar Waris (3): gpiolib: Introduce the for_each_set_nbits macro gpio: thunderx: Utilize for_each_set_nbits macro gpio: xilinx: Utilize generic bitmap_get_value and _set_value drivers/gpio

Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-02 Thread Syed Nayyar Waris
On Mon, Mar 29, 2021 at 8:54 PM Andy Shevchenko wrote: > > On Sat, Mar 06, 2021 at 07:36:30PM +0530, Syed Nayyar Waris wrote: > > This patch reimplements the xgpio_set_multiple() function in > > drivers/gpio/gpio-xilinx.c to use the new generic functions: &g

Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-02 Thread Syed Nayyar Waris
On Fri, Mar 26, 2021 at 11:27 PM Andy Shevchenko wrote: > > On Sat, Mar 6, 2021 at 4:08 PM Syed Nayyar Waris wrote: > > > > This patch reimplements the xgpio_set_multiple() function in > > drivers/gpio/gpio-xilinx.c to use the new generic functions: > > bitmap_ge

Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-01 Thread Syed Nayyar Waris
On Sat, Mar 27, 2021 at 10:05 PM Andy Shevchenko wrote: > > On Sat, Mar 27, 2021 at 2:02 PM William Breathitt Gray > wrote: > > On Sat, Mar 27, 2021 at 09:29:26AM +0200, Andy Shevchenko wrote: > > > On Saturday, March 27, 2021, Syed Nayyar Waris > > > wrote: &

Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-01 Thread Syed Nayyar Waris
On Mon, Mar 29, 2021 at 8:54 PM Andy Shevchenko wrote: > > On Sat, Mar 06, 2021 at 07:36:30PM +0530, Syed Nayyar Waris wrote: > > This patch reimplements the xgpio_set_multiple() function in > > drivers/gpio/gpio-xilinx.c to use the new generic functions: &g

Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-04-01 Thread Syed Nayyar Waris
On Wed, Mar 31, 2021 at 8:56 PM Srinivas Neeli wrote: > > Hi, > > > -Original Message- > > From: Bartosz Golaszewski > > Sent: Friday, March 26, 2021 10:58 PM > > To: Michal Simek > > Cc: Syed Nayyar Waris ; Srinivas Neeli > > ; Andy Shevc

Re: [PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-03-26 Thread Syed Nayyar Waris
On Fri, Mar 26, 2021 at 11:32 PM Andy Shevchenko wrote: > > On Sat, Mar 6, 2021 at 4:08 PM Syed Nayyar Waris wrote: > > > + bitmap_set_value(old, 64, state[0], 32, 0); > > + bitmap_set_value(old, 64, state[1], 32, 32); > > Isn't it ef

[PATCH v3 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-03-06 Thread Syed Nayyar Waris
can check each channel at a time and save cycles. Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpio-xilinx.c | 63 +++--- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git

[PATCH v3 2/3] gpio: thunderx: Utilize for_each_set_nbits macro

2021-03-06 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpio-thunderx.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c index 9f66deab46ea..4349e7393a1d 100644

[PATCH v3 1/3] gpiolib: Introduce the for_each_set_nbits macro

2021-03-06 Thread Syed Nayyar Waris
c: Linus Walleij Cc: Bartosz Gołaszewski Cc: Arnd Bergmann Cc: Andy Shevchenko Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- drivers/gpio/gpiolib.c | 90 ++ drivers/gpio/gpiolib.h | 28 + 2 files changed, 118 inser

[PATCH v3 0/3] Introduce the for_each_set_nbits macro

2021-03-06 Thread Syed Nayyar Waris
return statement. - Remove tests from lib/test_bitmap.c as 'for_each_set_clump' is now localised inside gpio/ only. Syed Nayyar Waris (3): gpiolib: Introduce the for_each_set_nbits macro gpio: thunderx: Utilize for_each_set_nbits macro gpio: xilinx: Utilize generic bitmap_get_value

Re: [PATCH v2 0/3] Introduce the for_each_set_clump macro

2021-03-06 Thread Syed Nayyar Waris
On Wed, Mar 3, 2021 at 8:13 PM Bartosz Golaszewski wrote: > > On Fri, Feb 12, 2021 at 2:19 PM Syed Nayyar Waris > wrote: > > > > Hello Bartosz, > > > > Since this patchset primarily affects GPIO drivers, would you like > > to pick it up through your

[PATCH v2 3/3] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2021-02-12 Thread Syed Nayyar Waris
can check each channel at a time and save cycles. Cc: William Breathitt Gray Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 63 +++--- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git

[PATCH v2 2/3] gpio: thunderx: Utilize for_each_set_clump macro

2021-02-12 Thread Syed Nayyar Waris
: Robert Richter Cc: Bartosz Golaszewski Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-thunderx.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c index 9f66deab46ea..0398b2d2af4b 100644

[PATCH v2 0/3] Introduce the for_each_set_clump macro

2021-02-12 Thread Syed Nayyar Waris
and simply use return statement. - Remove tests from lib/test_bitmap.c as 'for_each_set_clump' is now localised inside gpio/ only. Syed Nayyar Waris (3): gpiolib: : Introduce the for_each_set_clump macro gpio: thunderx: Utilize for_each_set_clump macro gpio: xilinx: Utilize generic

[PATCH v2 1/3] gpiolib: Introduce the for_each_set_clump macro

2021-02-12 Thread Syed Nayyar Waris
c: Linus Walleij Cc: Bartosz Gołaszewski Cc: Arnd Bergmann Cc: William Breathitt Gray Cc: Andy Shevchenko Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpiolib.c | 90 ++ drivers/gpio/gpiolib.h | 28 + 2 files changed, 118 insertions(+)

Re: [PATCH 2/5] lib/test_bitmap.c: Add for_each_set_clump test cases

2021-02-06 Thread Syed Nayyar Waris
On Thu, Feb 4, 2021 at 2:25 PM Syed Nayyar Waris wrote: > > On Sat, Dec 26, 2020 at 8:15 PM Andy Shevchenko > wrote: > > > > > > > > On Saturday, December 26, 2020, Syed Nayyar Waris > > wrote: > >> > >> The introduction of the generi

Re: [PATCH 2/5] lib/test_bitmap.c: Add for_each_set_clump test cases

2021-02-04 Thread Syed Nayyar Waris
On Sat, Dec 26, 2020 at 8:15 PM Andy Shevchenko wrote: > > > > On Saturday, December 26, 2020, Syed Nayyar Waris > wrote: >> >> The introduction of the generic for_each_set_clump macro need test >> cases to verify the implementation. This patch adds test case

[PATCH 5/5] gpio: xilinx: Add extra check if sum of widths exceed 64

2020-12-25 Thread Syed Nayyar Waris
Add extra check to see if sum of widths does not exceed 64. If it exceeds then return -EINVAL alongwith appropriate error message. Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpio/gpio

[PATCH 2/5] lib/test_bitmap.c: Add for_each_set_clump test cases

2020-12-25 Thread Syed Nayyar Waris
zeroes are present in the start and middle of bitmap. Cc: Andy Shevchenko Cc: William Breathitt Gray Signed-off-by: Syed Nayyar Waris --- lib/test_bitmap.c | 144 ++ 1 file changed, 144 insertions(+) diff --git a/lib/test_bitmap.c b/lib

[PATCH 4/5] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-12-25 Thread Syed Nayyar Waris
can check each channel at a time and save cycles. Cc: William Breathitt Gray Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 66 +++--- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git

[PATCH 3/5] gpio: thunderx: Utilize for_each_set_clump macro

2020-12-25 Thread Syed Nayyar Waris
: Robert Richter Cc: Bartosz Golaszewski Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-thunderx.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-thunderx.c b/drivers/gpio/gpio-thunderx.c index 9f66deab46ea..716b75ba7df6 100644

[PATCH 1/5] clump_bits: Introduce the for_each_set_clump macro

2020-12-25 Thread Syed Nayyar Waris
because we can avoid the latency of the conditional check entirely. Cc: Linus Walleij Cc: Arnd Bergmann Cc: William Breathitt Gray Cc: Andy Shevchenko Signed-off-by: Syed Nayyar Waris --- drivers/gpio/clump_bits.h | 101 ++ 1 file changed, 101 insertions(+)

[PATCH 0/5] Introduce the for_each_set_clump macro

2020-12-25 Thread Syed Nayyar Waris
off using __builtin_unreachable() here because we can avoid the latency of the conditional check entirely. Syed Nayyar Waris (5): clump_bits: Introduce the for_each_set_clump macro lib/test_bitmap.c: Add for_each_set_clump test cases gpio: thunderx: Utilize for_each_set_clump macro gpio

Re: [RESEND PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls

2020-12-12 Thread Syed Nayyar Waris
On Tue, Dec 1, 2020 at 9:03 PM Bartosz Golaszewski wrote: > > On Fri, Nov 20, 2020 at 7:46 PM Syed Nayyar Waris > wrote: > > > > Modify the bitmap_set_value() calls. bitmap_set_value() > > now takes an extra bitmap width as second argument and the width of > > v

[PATCH v2 2/2] gpio: xilinx: Add extra check if sum of widths exceed 64

2020-12-12 Thread Syed Nayyar Waris
Add extra check to see if sum of widths does not exceed 64. If it exceeds then return -EINVAL alongwith appropriate error message. Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpio/gpio

[PATCH v2 0/2] Modify bitmap_set_value() to suppress compiler warning

2020-12-12 Thread Syed Nayyar Waris
patches into one. Syed Nayyar Waris (2): bitmap: Modify bitmap_set_value() to check bitmap length gpio: xilinx: Add extra check if sum of widths exceed 64 drivers/gpio/gpio-xilinx.c | 18 -- include/linux/bitmap.h | 35 +-- lib/test_bitmap.c

[PATCH v2 1/2] bitmap: Modify bitmap_set_value() to check bitmap length

2020-12-12 Thread Syed Nayyar Waris
entirely. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray lib/test_bitmap.c: Modify for_each_set_clump test Modify the test where bitmap_set_value() is called. bitmap_set_value() now takes an extra bitmap-width as second argument and the width of value is now

Re: [PATCH 1/4] bitmap: Modify bitmap_set_value() to check bitmap length

2020-11-20 Thread Syed Nayyar Waris
On Fri, Nov 20, 2020 at 11:29 PM William Breathitt Gray wrote: > > On Fri, Nov 20, 2020 at 11:14:16PM +0530, Syed Nayyar Waris wrote: > > Add explicit check to see if the value being written into the bitmap > > does not fall outside the bitmap. > > The situation that it

[PATCH 4/4] gpio: xilinx: Add extra check to see if sum of widths exceed 64

2020-11-20 Thread Syed Nayyar Waris
Add extra check to see if sum of widths does not exceed 64. If it exceeds then return -EINVAL alongwith appropriate error message. Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpio/gpio

[PATCH 2/4] lib/test_bitmap.c: Modify for_each_set_clump test

2020-11-20 Thread Syed Nayyar Waris
Modify the test where bitmap_set_value() is called. bitmap_set_value() now takes an extra bitmap-width as second argument and the width of value is now present as the fourth argument. Signed-off-by: Syed Nayyar Waris --- lib/test_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls

2020-11-20 Thread Syed Nayyar Waris
Modify the bitmap_set_value() calls. bitmap_set_value() now takes an extra bitmap width as second argument and the width of value is now present as the fourth argument. Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 12 ++-- 1 file changed, 6

[PATCH 1/4] bitmap: Modify bitmap_set_value() to check bitmap length

2020-11-20 Thread Syed Nayyar Waris
for ensuring the boundaries are correct. This is just to suppress the GCC -Wtype-limits warnings. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Acked-by: William Breathitt Gray --- include/linux/bitmap.h | 35 +-- 1 file changed, 21 insertions(+), 14

[PATCH 0/4] Modify bitmap_set_value() to suppress compiler warning

2020-11-20 Thread Syed Nayyar Waris
. As such, we're better off using __builtin_unreachable() here because we can avoid the latency of the conditional check entirely. Michal, What do you think of [PATCH 4/4]? Is the conditional check needed, and also whether returning -EINVAL looks good? Syed Nayyar Waris (4): bitmap: Modify

Re: [PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-11-13 Thread Syed Nayyar Waris
On Wed, Nov 11, 2020 at 3:30 AM Syed Nayyar Waris wrote: > > On Tue, Nov 10, 2020 at 12:43:16PM -0500, William Breathitt Gray wrote: > > On Tue, Nov 10, 2020 at 10:52:42PM +0530, Syed Nayyar Waris wrote: > > > On Tue, Nov 10, 2020 at 6:05 PM William Breath

Re: [PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-11-10 Thread Syed Nayyar Waris
On Tue, Nov 10, 2020 at 12:43:16PM -0500, William Breathitt Gray wrote: > On Tue, Nov 10, 2020 at 10:52:42PM +0530, Syed Nayyar Waris wrote: > > On Tue, Nov 10, 2020 at 6:05 PM William Breathitt Gray > > wrote: > > > > > > On Tue, Nov 10, 2020 at 11:

Re: [PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-11-10 Thread Syed Nayyar Waris
> > >> On Mon, Nov 09, 2020 at 12:11:40PM -0500, William Breathitt Gray wrote: > > >>> On Mon, Nov 09, 2020 at 10:15:29PM +0530, Syed Nayyar Waris wrote: > > >>>> On Mon, Nov 09, 2020 at 03:41:53PM +0100, Arnd Bergmann wrote: > > &

Re: [PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-11-09 Thread Syed Nayyar Waris
On Mon, Nov 09, 2020 at 03:41:53PM +0100, Arnd Bergmann wrote: > On Mon, Nov 9, 2020 at 2:41 PM William Breathitt Gray > wrote: > > On Mon, Nov 09, 2020 at 06:04:11PM +0530, Syed Nayyar Waris wrote: > > > > One of my concerns is that we're incurring the latency two ad

Re: [PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-11-09 Thread Syed Nayyar Waris
On Mon, Nov 9, 2020 at 8:09 PM William Breathitt Gray wrote: > > On Mon, Nov 09, 2020 at 08:41:28AM -0500, William Breathitt Gray wrote: > > On Mon, Nov 09, 2020 at 06:04:11PM +0530, Syed Nayyar Waris wrote: > > > On Sun, Nov 01, 2020 at 09:08:29PM +0100, Arnd Bergmann wrote

Re: [PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-11-09 Thread Syed Nayyar Waris
On Sun, Nov 01, 2020 at 09:08:29PM +0100, Arnd Bergmann wrote: > On Sun, Nov 1, 2020 at 4:00 PM William Breathitt Gray > wrote: > > > > On Thu, Oct 29, 2020 at 11:44:47PM +0100, Arnd Bergmann wrote: > > > On Sun, Oct 18, 2020 at 11:44 PM Syed Nayyar Waris > > &g

Re: [PATCH v11 0/4] Introduce the for_each_set_clump macro

2020-10-23 Thread Syed Nayyar Waris
On Wed, Oct 7, 2020 at 2:09 PM Linus Walleij wrote: > > On Tue, Oct 6, 2020 at 11:20 AM Syed Nayyar Waris > wrote: > > > Since this patchset primarily affects GPIO drivers, would you like > > to pick it up through your GPIO tree? > > Definitely will, once we are

[PATCH v12 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-10-18 Thread Syed Nayyar Waris
can check each channel at a time and save cycles. Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v12: - Remove extra empty newline. Changes in v11: - Change variable name 'flag' to 'flags'. Changes in v10

[PATCH v12 3/4] gpio: thunderx: Utilize for_each_set_clump macro

2020-10-18 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v12: - No change. Changes in v11: - No change. Changes in v10: - No change. Changes in v9: - No change. Changes in v8: - No change. Changes in v7: - No change. Changes in v6: - No change

[PATCH v12 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-18 Thread Syed Nayyar Waris
. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray --- Changes in v12: - Format and modify comments. - Optimize code using '<<' operator with GENMASK. Changes in v11: - Document valid range of values that 'nbits'

[PATCH v12 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases

2020-10-18 Thread Syed Nayyar Waris
zeroes are present in the start and middle of bitmap. Signed-off-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray --- Changes in v12: - No change. Changes in v11: - No change. Changes in v10: - No change. Changes in v9: - No change. Changes in v8

[PATCH v12 0/4] Introduce the for_each_set_clump macro

2020-10-18 Thread Syed Nayyar Waris
nction thunderx_gpio_set_multiple. CHanges in v2: - [Patch 2/4]: Unify different tests for 'for_each_set_clump'. Pass test data as function parameters. - [Patch 2/4]: Remove unnecessary bitmap_zero calls. Syed Nayyar Waris (4): bitops: Introduce the for_each_set_clump macro lib/test_bitmap.

Re: [PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-16 Thread Syed Nayyar Waris
On Fri, Oct 16, 2020 at 2:46 PM Andy Shevchenko wrote: > > On Fri, Oct 16, 2020 at 04:23:05AM +0530, Syed Nayyar Waris wrote: > > On Tue, Oct 6, 2020 at 4:56 PM Andy Shevchenko > > wrote: > > > On Tue, Oct 06, 2020 at 02:52:16PM +05

Re: [PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-15 Thread Syed Nayyar Waris
On Tue, Oct 6, 2020 at 4:56 PM Andy Shevchenko wrote: > > On Tue, Oct 06, 2020 at 02:52:16PM +0530, Syed Nayyar Waris wrote: > > This macro iterates for each group of bits (clump) with set bits, > > within a bitmap memory region. For each iteration, "start"

[PATCH v11 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-10-06 Thread Syed Nayyar Waris
each channel at a time and save cycles. Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v11: - Change variable name 'flag' to 'flags'. Changes in v10: - No change. Changes in v9: - Remove looping

[PATCH v11 3/4] gpio: thunderx: Utilize for_each_set_clump macro

2020-10-06 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v11: - No change. Changes in v10: - No change. Changes in v9: - No change. Changes in v8: - No change. Changes in v7: - No change. Changes in v6: - No change. Changes in v5: - No change

[PATCH v11 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases

2020-10-06 Thread Syed Nayyar Waris
zeroes are present in the start and middle of bitmap. Signed-off-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray --- Changes in v11: - No change. Changes in v10: - No change. Changes in v9: - No change. Changes in v8: - [Patch 2/4]: Minor change

[PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-06 Thread Syed Nayyar Waris
s exceeding the word boundary, then it will divide itself such that some portion of it is stored in that word, while the remaining portion is stored in the next higher word. Similar situation occurs while retrieving the value from bitmap. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Reviewed

[PATCH v11 0/4] Introduce the for_each_set_clump macro

2020-10-06 Thread Syed Nayyar Waris
parameters. - [Patch 2/4]: Remove unnecessary bitmap_zero calls. Syed Nayyar Waris (4): bitops: Introduce the for_each_set_clump macro lib/test_bitmap.c: Add for_each_set_clump test cases gpio: thunderx: Utilize for_each_set_clump macro gpio: xilinx: Utilize generic bitmap_get_value

Re: [PATCH v10 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-03 Thread Syed Nayyar Waris
On Sat, Oct 3, 2020 at 6:32 PM Andy Shevchenko wrote: > > On Sat, Oct 3, 2020 at 3:56 PM William Breathitt Gray > wrote: > > On Sat, Oct 03, 2020 at 03:45:04PM +0300, Andy Shevchenko wrote: > > > On Sat, Oct 3, 2020 at 2:37 PM Syed Nayyar Waris > > > wrote: &g

Re: [PATCH v10 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-03 Thread Syed Nayyar Waris
On Sat, Oct 3, 2020 at 2:14 PM Andy Shevchenko wrote: > > On Sat, Oct 3, 2020 at 2:51 AM Syed Nayyar Waris wrote: > > Now I remember... > This needs to be revisited. > > > This macro iterates for each group of bits (clump) with set bits, > > within a bitmap mem

[PATCH v10 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value

2020-10-02 Thread Syed Nayyar Waris
each channel at a time and save cycles. Cc: Bartosz Golaszewski Cc: Michal Simek Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v10: - No change. Changes in v9: - Remove looping of 'for_each_set_clump' and instead process two halves of a 64-bit

[PATCH v10 3/4] gpio: thunderx: Utilize for_each_set_clump macro

2020-10-02 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v10: - No change. Changes in v9: - No change. Changes in v8: - No change. Changes in v7: - No change. Changes in v6: - No change. Changes in v5: - No change. Changes in v4: - Minor

[PATCH v10 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases

2020-10-02 Thread Syed Nayyar Waris
zeroes are present in the start and middle of bitmap. Signed-off-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray --- Changes in v10: - No change. Changes in v9: - No change. Changes in v8: - [Patch 2/4]: Minor change: Use '__initdata' for correct

[PATCH v10 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-02 Thread Syed Nayyar Waris
s exceeding the word boundary, then it will divide itself such that some portion of it is stored in that word, while the remaining portion is stored in the next higher word. Similar situation occurs while retrieving value of n-bits from bitmap. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Reviewed

[PATCH v10 0/4] Introduce the for_each_set_clump macro

2020-10-02 Thread Syed Nayyar Waris
to unsigned long in function thunderx_gpio_set_multiple. CHanges in v2: - [Patch 2/4]: Unify different tests for 'for_each_set_clump'. Pass test data as function parameters. - [Patch 2/4]: Remove unnecessary bitmap_zero calls. Syed Nayyar Waris (4): bitops: Introduce the for_each_set_clump macro

Re: [PATCH v9 0/4] Introduce the for_each_set_clump macro

2020-10-02 Thread Syed Nayyar Waris
71559.jsbgjxnw%25...@intel.com/ > > Yup. > > I tried to apply the patches again now to test it but now patch 2 > needs to be rebased. > > Sorry for all the trouble! > > Syed can you rebase the patch set on v5.9-rc1 and resend as v10? Sure Linus. I will send it as soon as possible. Thanks Syed Nayyar Waris

Re: [PATCH v9 0/4] Introduce the for_each_set_clump macro

2020-08-31 Thread Syed Nayyar Waris
On Thu, Jul 16, 2020 at 6:19 PM Linus Walleij wrote: > > Hi Syed, > > sorry for taking so long. I was on vacation and a bit snowed > under by work. > > On Sat, Jun 27, 2020 at 10:10 AM Syed Nayyar Waris > wrote: > > > Since this patchset primarily aff

Re: [PATCH v4 5/5] counter: 104-quad-8: Add IRQ support for the ACCES 104-QUAD-8

2020-07-30 Thread Syed Nayyar Waris
ow the enablement of interrupts for > a respective channel. Interrupts push Counter events as Event X, where > 'X' is the respective channel whose FLG1 activated. > > This patch adds IRQ support for the ACCES 104-QUAD-8. The interrupt line > numbers for the devices may be configured

Re: [PATCH v9 0/4] Introduce the for_each_set_clump macro

2020-07-10 Thread Syed Nayyar Waris
On Sat, Jun 27, 2020 at 1:40 PM Syed Nayyar Waris wrote: > > Hello Linus, > > Since this patchset primarily affects GPIO drivers, would you like > to pick it up through your GPIO tree? > > This patchset introduces a new generic version of for_each_set_clump. &

[PATCH v9 4/4] gpio: xilinx: Utilize generic bitmap_get_value and _set_value.

2020-06-27 Thread Syed Nayyar Waris
This patch reimplements the xgpio_set_multiple function in drivers/gpio/gpio-xilinx.c to use the new generic functions: bitmap_get_value and bitmap_set_value. The code is now simpler to read and understand. Moreover, instead of looping for each bit in xgpio_set_multiple function, now we can check

[PATCH v9 3/4] gpio: thunderx: Utilize for_each_set_clump macro

2020-06-27 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v9: - No change. Changes in v8: - No change. Changes in v7: - No change. Changes in v6: - No change. Changes in v5: - No change. Changes in v4: - Minor change: Inline value '64' in code

[PATCH v9 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases

2020-06-27 Thread Syed Nayyar Waris
zeroes are present in the start and middle of bitmap. Signed-off-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray --- Changes in v9: - No change. Changes in v8: - [Patch 2/4]: Minor change: Use '__initdata' for correct section mismatch

[PATCH v9 1/4] bitops: Introduce the for_each_set_clump macro

2020-06-27 Thread Syed Nayyar Waris
s exceeding the word boundary, then it will divide itself such that some portion of it is stored in that word, while the remaining portion is stored in the next higher word. Similar situation occurs while retrieving value of n-bits from bitmap. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Reviewed

[PATCH v9 0/4] Introduce the for_each_set_clump macro

2020-06-27 Thread Syed Nayyar Waris
thunderx_gpio_set_multiple. CHanges in v2: - [Patch 2/4]: Unify different tests for 'for_each_set_clump'. Pass test data as function parameters. - [Patch 2/4]: Remove unnecessary bitmap_zero calls. Syed Nayyar Waris (4): bitops: Introduce the for_each_set_clump macro lib/test_bitmap.c: Add for_each_set_clump

Re: [PATCH v8 1/4] bitops: Introduce the for_each_set_clump macro

2020-06-20 Thread Syed Nayyar Waris
On Tue, Jun 16, 2020 at 1:44 PM Andy Shevchenko wrote: > > On Mon, Jun 15, 2020 at 06:21:18PM +0530, Syed Nayyar Waris wrote: > > This macro iterates for each group of bits (clump) with set bits, > > within a bitmap memory region. For each iteration, "start"

Re: [PATCH v8 1/4] bitops: Introduce the for_each_set_clump macro

2020-06-20 Thread Syed Nayyar Waris
On Tue, Jun 16, 2020 at 1:44 PM Andy Shevchenko wrote: > > On Mon, Jun 15, 2020 at 06:21:18PM +0530, Syed Nayyar Waris wrote: > > This macro iterates for each group of bits (clump) with set bits, > > within a bitmap memory region. For each iteration, "start"

Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro

2020-06-19 Thread Syed Nayyar Waris
> > Hi Syed, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on 444fc5cde64330661bf59944c43844e7d4c2ccd8] > > url: > https://github.com/0day-ci/linux/commits/Syed-Nayyar-Waris/Introduce-the-for_each_set_clump-m

Re: [PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro

2020-06-15 Thread Syed Nayyar Waris
On Tue, Jun 16, 2020 at 1:39 AM kernel test robot wrote: > > Hi Syed, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on 444fc5cde64330661bf59944c43844e7d4c2ccd8] > > url: > https://github.com/0day-ci/linux/commits/

[PATCH v8 4/4] gpio: xilinx: Utilize for_each_set_clump macro

2020-06-15 Thread Syed Nayyar Waris
-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v8: - No change. Changes in v7: - No change. Changes in v6: - No change. Changes in v5: - Minor change: Inline values '32' and '64' in code for better code readability. Changes in v4: - Minor change: Inline

[PATCH v8 3/4] gpio: thunderx: Utilize for_each_set_clump macro

2020-06-15 Thread Syed Nayyar Waris
Golaszewski Signed-off-by: Syed Nayyar Waris Signed-off-by: William Breathitt Gray --- Changes in v8: - No change. Changes in v7: - No change. Changes in v6: - No change. Changes in v5: - No change. Changes in v4: - Minor change: Inline value '64' in code for better code readability

[PATCH v8 2/4] lib/test_bitmap.c: Add for_each_set_clump test cases

2020-06-15 Thread Syed Nayyar Waris
zeroes are present in the start and middle of bitmap. Signed-off-by: Syed Nayyar Waris Reviewed-by: Andy Shevchenko Signed-off-by: William Breathitt Gray --- Changes in v8: - [Patch 2/4]: Minor change: Use '__initdata' for correct section mismatch in 'clump_test_data' array. Changes in v7

[PATCH v8 1/4] bitops: Introduce the for_each_set_clump macro

2020-06-15 Thread Syed Nayyar Waris
s exceeding the word boundary, then it will divide itself such that some portion of it is stored in that word, while the remaining portion is stored in the next higher word. Similar situation occurs while retrieving value of n-bits from bitmap. Cc: Arnd Bergmann Signed-off-by: Syed Nayyar Waris Reviewed

[PATCH v8 0/4] Introduce the for_each_set_clump macro

2020-06-15 Thread Syed Nayyar Waris
. CHanges in v2: - [Patch 2/4]: Unify different tests for 'for_each_set_clump'. Pass test data as function parameters. - [Patch 2/4]: Remove unnecessary bitmap_zero calls. Syed Nayyar Waris (4): bitops: Introduce the for_each_set_clump macro lib/test_bitmap.c: Add for_each_set_clump test

Re: [PATCH v7 0/4] Introduce the for_each_set_clump macro

2020-06-15 Thread Syed Nayyar Waris
On Mon, May 25, 2020 at 3:06 PM Bartosz Golaszewski wrote: > > niedz., 24 maj 2020 o 07:00 Syed Nayyar Waris > napisał(a): > > > > Hello Linus, > > > > Since this patchset primarily affects GPIO drivers, would you like > > to pick it up through your GPIO

Re: [PATCH v5 1/3] counter: 104-quad-8: Add lock guards - generic interface

2020-06-06 Thread Syed Nayyar Waris
On Sun, Jun 7, 2020 at 9:39 AM William Breathitt Gray wrote: > > On Sun, Jun 07, 2020 at 09:28:40AM +0530, Syed Nayyar Waris wrote: > > On Sat, Apr 4, 2020 at 7:36 PM Jonathan Cameron wrote: > > > > > > On Mon, 30 Mar 2020 23:54:32 +0530 > > > Syed Nayyar

  1   2   >