Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-02-07 Thread Bryan O'Donoghue
On 07/02/17 14:19, Johan Hovold wrote: > On Mon, Jan 23, 2017 at 01:04:14PM +0100, Johan Hovold wrote: >> Add a struct timer_list to struct gb_operation and use that to implement >> generic operation timeouts. >> >> This simplifies the synchronous operation handling somewhat while also >>

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-02-08 Thread Bryan O'Donoghue
On 08/02/17 09:43, Johan Hovold wrote: > On Tue, Feb 07, 2017 at 02:31:04PM +0000, Bryan O'Donoghue wrote: >> On 07/02/17 14:19, Johan Hovold wrote: >>> On Mon, Jan 23, 2017 at 01:04:14PM +0100, Johan Hovold wrote: >>>> Add a struct timer_list to struct gb_opera

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-02-08 Thread Bryan O'Donoghue
On 08/02/17 11:55, Johan Hovold wrote: > On Wed, Feb 08, 2017 at 11:43:57AM +0000, Bryan O'Donoghue wrote: >> On 08/02/17 09:43, Johan Hovold wrote: >>> On Tue, Feb 07, 2017 at 02:31:04PM +, Bryan O'Donoghue wrote: >>>> On 07/02/17 14:19, Johan Hovold wrote: >&

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-02-08 Thread Bryan O'Donoghue
On 08/02/17 14:16, Johan Hovold wrote: > On Wed, Feb 08, 2017 at 02:05:15PM +0000, Bryan O'Donoghue wrote: >> On 08/02/17 11:55, Johan Hovold wrote: >>> On Wed, Feb 08, 2017 at 11:43:57AM +, Bryan O'Donoghue wrote: >>>> On 08/02/17 09:43, Johan Hovold wrote: >&

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-01-23 Thread Bryan O'Donoghue
On 23/01/17 12:04, Johan Hovold wrote: > +static void gb_operation_timeout(unsigned long arg) > +{ > + struct gb_operation *operation = (void *)arg; > + > + if (gb_operation_result_set(operation, -ETIMEDOUT)) { > + /* > + * A stuck request message will be

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-01-23 Thread Bryan O'Donoghue
On 23/01/17 15:13, Johan Hovold wrote: > On Mon, Jan 23, 2017 at 02:32:48PM +0000, Bryan O'Donoghue wrote: >> On 23/01/17 12:04, Johan Hovold wrote: >> >>> +static void gb_operation_timeout(unsigned long arg) >>> +{ >>> + st

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-01-24 Thread Bryan O'Donoghue
On 24/01/17 15:09, Johan Hovold wrote: > Bryan, if you could consider my review feedback and respin your last > three patches on top of my timeout patch, I think we should be good. Sure thing ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH] staging: greybus: operation: add generic timeout support

2017-01-30 Thread Bryan O'Donoghue
On 27/01/17 09:55, Greg Kroah-Hartman wrote: > On Tue, Jan 24, 2017 at 03:57:54PM +0000, Bryan O'Donoghue wrote: >> On 24/01/17 15:09, Johan Hovold wrote: >> >>> Bryan, if you could consider my review feedback and respin your last >>> three patches on top of my

Re: [PATCH] staging: greybus: loopback: fix broken udelay

2017-01-30 Thread Bryan O'Donoghue
if (us_wait < 2) > + usleep_range(us_wait, us_wait + 100); > + else > + msleep(us_wait / 1000); > + } > } > > gb_pm_runtime_put_autosuspend(bundle); > Makes sense to me, thanks. Acked

Re: [PATCH] greybus: fw-management: Replace strncpy with strlcpy

2017-02-15 Thread Bryan O'Donoghue
On 15/02/17 00:09, Tobin C. Harding wrote: > Greybus currently uses strncpy() coupled with a check for '\0' on the > last byte of various buffers. strncpy() is passed size parameter equal > to the size of the buffer in all instances. If the source string is > larger than the destination buffer the

[PATCH 4/6] staging: greybus/loopback: convert loopback to use generic async operations

2016-11-21 Thread Bryan O'Donoghue
max=0 average=0.00 jitter=0 gbphy-latency usec:min=0 max=0 average=0.00 jitter=0 Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Signed-off-by: Mitchell Tasman <tas...@leaflabs.com> --- drivers/staging/greybus/loopback.c | 172 -

[PATCH 5/6] staging: greybus/loopback: convert to use msecs internally

2016-11-21 Thread Bryan O'Donoghue
as opposed to one jiffy. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/loopback.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 3dd26af..d

[PATCH 6/6] staging: greybus/loopback: Hold gb->mutex across loopback operations

2016-11-21 Thread Bryan O'Donoghue
w/r to the controlling sysfs interface. This patch fixes by holding gb->mutex between gb->send_count == gb->iteration_max and udelay() divide - in the sending kthread. Testing on DVT shows there's no adverse performance impact. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --

[PATCH 2/6] staging: greybus/operation: add generic asynchronous operation support

2016-11-21 Thread Bryan O'Donoghue
for operation.c to provide it with the appropriate status code for a given operation. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/operation.c | 50 + drivers/staging/greybus/operation.h | 4 +++ 2 files chang

[PATCH 3/6] staging: greybus/operation: add async_private data with get/set accessors

2016-11-21 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to operation.h and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue <pure.lo...@ne

[PATCH 1/6] staging: greybus/operation: add delayed worker for async timeouts

2016-11-21 Thread Bryan O'Donoghue
This patch adds a delayed workqueue which will be used in later patches to provide a timeout mechanism for asynchronous operations. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/operation.c | 15 +++ drivers/staging/greybus/opera

[PATCH 0/6] drivers/staging/greybus: add async operations

2016-11-21 Thread Bryan O'Donoghue
cancel timeout workqueue @ operation completion point - Viresh/Bryan Bryan O'Donoghue (6): staging: greybus/operation: add delayed worker for async timeouts staging: greybus/operation: add generic asynchronous operation support staging: greybus/operation: add async_private data with g

Re: [PATCH 0/6] drivers/staging/greybus: add async operations

2016-11-22 Thread Bryan O'Donoghue
On Tue, 2016-11-22 at 13:17 +0100, Johan Hovold wrote: > [ Resend with Greg's address fixed. ] > > On Mon, Nov 21, 2016 at 05:22:13PM +0000, Bryan O'Donoghue wrote: > > > > McCOY: You've got him, Jim! You've got him where you want him. > Hey, I ended up watching th

Re: Greybus Future

2016-11-01 Thread Bryan O'Donoghue
On Mon, 2016-10-31 at 08:50 -0500, Alex Elder wrote: > My suggestion is to create a majordomo list: >     grey...@kernel.org I think this is a great idea. We need a forum where we can discuss changes to the specification and the firmware - it would be a bit anti- social to be blitzing 

Re: [PATCH] staging: greybuis: fix permission style warnings

2016-11-26 Thread Bryan O'Donoghue
On Sat, 2016-11-26 at 22:50 +0100, Andrea Ghittino wrote: > Fixes greybus user/groups permission style warnings  > found by checkpatch.pl tool > > Signed-off-by: Andrea Ghittino > --- > diff --git a/drivers/staging/greybus/camera.c > b/drivers/staging/greybus/camera.c > index 1c5b41a..4424f63

Re: [PATCH v2 1/5] staging: greybus: operation: add asynchronous gb_operation_cancel

2017-01-03 Thread Bryan O'Donoghue
On 02/01/17 16:16, Johan Hovold wrote: > On Tue, Dec 27, 2016 at 01:01:35PM +0000, Bryan O'Donoghue wrote: >> Later patches don't want or need to serialize the cancellation of an >> operation. This patch adds gb_operation_cancel_async() as a simple subset >> of the existin

Re: [PATCH] staging: greybus: remove timesync protocol support

2017-01-05 Thread Bryan O'Donoghue
m. > > Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> > --- > > Sorry Bryan, I know it was a lot of work, and it's a great protocol and > implementation, but it never made it into a device :( Kill it. One less tur

Re: [PATCH v2 2/2] staging: greybus: loopback_test: Fix race preventing test completion

2017-01-03 Thread Bryan O'Donoghue
On 03/01/17 10:17, Axel Haslam wrote: > as i see it, a successful test means: > 1- each interfaces should send an event upon completion. yes > 2- the iteration count should equal iteration_max on each of the interfaces yes > what am i missing? count == max implies the kernel thread is still

Re: [PATCH v2 2/2] staging: greybus: loopback_test: Fix race preventing test completion

2017-01-03 Thread Bryan O'Donoghue
On 02/01/17 17:27, Axel Haslam wrote: > Hi Bryan, > > On Mon, Jan 2, 2017 at 3:32 PM, Johan Hovold <jo...@kernel.org> wrote: >> Adding Axel on CC. >> >> On Thu, Dec 22, 2016 at 12:37:29AM +, Bryan O'Donoghue wrote: >>> commit 9250c0ee2626

[PATCH v3 1/4] staging: greybus: operation: add generic asynchronous timeout operation support

2017-01-03 Thread Bryan O'Donoghue
timeout mechanisms, it just waits for operation.c to provide it with the appropriate status code for a given operation. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/operation.c | 66 + drivers/staging/greybus/opera

[PATCH v3 0/4] drivers/staging/greybus: add async operations

2017-01-03 Thread Bryan O'Donoghue
ion_request_send_async() - Greg Using existing gb_operation_completion_wq - Viresh Split out gb_operation_cancel() - timeout need not wait synchronously on cancellation queue - Bryan Move timeout to work-queue - Greg/Viresh cancel timeout workqueue @ operation completion point - Viresh/Br

[PATCH v3 4/4] staging: greybus: loopback: convert to use msecs internally

2017-01-03 Thread Bryan O'Donoghue
as opposed to one jiffy. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/loopback.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 5cdd8d0..8

[PATCH v3 3/4] staging: greybus: loopback: convert loopback to use generic async operations

2017-01-03 Thread Bryan O'Donoghue
max=0 average=0.00 jitter=0 gbphy-latency usec:min=0 max=0 average=0.00 jitter=0 Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Signed-off-by: Mitchell Tasman <tas...@leaflabs.com> --- drivers/staging/greybus/loopback.c | 167 +++--

[PATCH v3 2/4] staging: greybus: operation: add private data with get/set accessors

2017-01-03 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to operation.h and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue <pure.lo...@ne

Re: [PATCH 1/2] staging: greybus: loopback: fix gb_pm_runtime_get_sync error handling

2017-01-09 Thread Bryan O'Donoghue
On January 9, 2017 11:57:36 AM GMT+00:00, Johan Hovold <jo...@kernel.org> wrote: >On Mon, Jan 09, 2017 at 11:29:50AM +0000, Bryan O'Donoghue wrote: >> On January 9, 2017 11:19:09 AM GMT+00:00, Johan Hovold ><jo...@kernel.org> wrote: >> >On Sun, Jan 08, 2017 at 0

Re: [PATCH 1/2] staging: greybus: loopback: fix gb_pm_runtime_get_sync error handling

2017-01-09 Thread Bryan O'Donoghue
On January 9, 2017 11:19:09 AM GMT+00:00, Johan Hovold <jo...@kernel.org> wrote: >On Sun, Jan 08, 2017 at 03:27:18PM +0000, Bryan O'Donoghue wrote: >> commit e854ff58ed70 ("greybus: loopback: add runtime pm support") >> introduces pm runti

[PATCH 1/2] staging: greybus: loopback: fix gb_pm_runtime_get_sync error handling

2017-01-08 Thread Bryan O'Donoghue
Bailon <abai...@baylibre.com> Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/loopback.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 83f3b9f..88d

[PATCH 0/2] staging: greybus: loopback: Fix two oops paths in gb_loopback

2017-01-08 Thread Bryan O'Donoghue
to removal of gb_dev.root. This series fixes both issues. Bryan O'Donoghue (2): staging: greybus: loopback: fix gb_pm_runtime_get_sync error handling staging: greybus: loopback: fix oops on rmmod gb_loopback drivers/staging/greybus/loopback.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH 2/2] staging: greybus: loopback: fix oops on rmmod gb_loopback

2017-01-08 Thread Bryan O'Donoghue
opback then will not re-run gb_loopback_disconnect(). On project Ara the second module removal flow was the only practiced flow hence it's only now in gbsim where we have more freedom to rmmod that this bug is apparent. The fix itself is pretty straight-forward. Signed-off-by: Bryan O'Donoghue <pure.lo

Re: [PATCH] staging: greybus: add host device function pointer checks

2016-12-21 Thread Bryan O'Donoghue
>dev, "%s: failed to clear host cport: %d\n", > Looks obviously correct to me i.e. it's never a bad idea to sanity check a function pointer before dereferencing it. Reviewed-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [greybus-dev] [PATCH 1/2] staging: greybus: loopback: use gb_loopback_async_wait_all don't spin

2016-12-20 Thread Bryan O'Donoghue
On 20/12/16 10:28, Johan Hovold wrote: > On Tue, Dec 20, 2016 at 01:12:08AM +0000, Bryan O'Donoghue wrote: >> Currently the greybus-loopback thread logic spins around waiting for >> send_count == iteration_max which on real hardware doesn't make a >> difference to

[PATCH v2 5/5] staging: greybus: loopback: convert to use msecs internally

2016-12-27 Thread Bryan O'Donoghue
as opposed to one jiffy. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/loopback.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c index 5cdd8d0..8

[PATCH v2 2/5] staging: greybus: operation: add generic asynchronous timeout operation support

2016-12-27 Thread Bryan O'Donoghue
timeout mechanisms, it just waits for operation.c to provide it with the appropriate status code for a given operation. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/operation.c | 66 + drivers/staging/greybus/opera

[PATCH v2 4/5] staging: greybus: loopback: convert loopback to use generic async operations

2016-12-27 Thread Bryan O'Donoghue
max=0 average=0.00 jitter=0 gbphy-latency usec:min=0 max=0 average=0.00 jitter=0 Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Signed-off-by: Mitchell Tasman <tas...@leaflabs.com> --- drivers/staging/greybus/loopback.c | 167 +++--

[PATCH v2 0/5] drivers/staging/greybus: add async operations

2016-12-27 Thread Bryan O'Donoghue
ellation queue - Bryan Move timeout to work-queue - Greg/Viresh cancel timeout workqueue @ operation completion point - Viresh/Bryan Bryan O'Donoghue (5): staging: greybus: operation: add asynchronous gb_operation_cancel staging: greybus: operation: add generic asynchronous timeout operatio

[PATCH v2 1/5] staging: greybus: operation: add asynchronous gb_operation_cancel

2016-12-27 Thread Bryan O'Donoghue
Later patches don't want or need to serialize the cancellation of an operation. This patch adds gb_operation_cancel_async() as a simple subset of the existing gb_operation_cancel() sans the synchronous wait on the cancellation queue. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software

[PATCH v2 3/5] staging: greybus: operation: add private data with get/set accessors

2016-12-27 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to operation.h and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue <pure.lo...@ne

[PATCH v2 1/2] staging: greybus: loopback: use gb_loopback_async_wait_all don't spin

2016-12-21 Thread Bryan O'Donoghue
when the send_count == iteration_max and go to sleep until there's something worthwhile to-do. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/loopback.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/greybus/loopbac

[PATCH v2 2/2] staging: greybus: loopback_test: Fix race preventing test completion

2016-12-21 Thread Bryan O'Donoghue
patch fixes the race by ensuring the poll() loop waits for all active Interfaces to complete - as opposed to the first active Interface before breaking the loop. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/tools/loopback_test.c | 10 +- 1 file

[PATCH v2 0/2] staging: greybus: loopback fixes and updates

2016-12-21 Thread Bryan O'Donoghue
printout - Johan Bryan O'Donoghue (2): staging: greybus: loopback: use gb_loopback_async_wait_all don't spin staging: greybus: loopback_test: Fix race preventing test completion drivers/staging/greybus/loopback.c| 11 +++ drivers/staging/greybus/tools/loopback_test.c | 10

[PATCH 0/2] staging: greybus: loopback fixes and updates

2016-12-19 Thread Bryan O'Donoghue
Two simple patches here resulting from using greybus on gbsim and developing support for async. I found a bug in the user-space tool and while doing that decided to update the kernel thread to be better behaved when waiting for test completions. Bryan O'Donoghue (2): staging: greybus: loopback

[PATCH 1/2] staging: greybus: loopback: use gb_loopback_async_wait_all don't spin

2016-12-19 Thread Bryan O'Donoghue
when the send_count == iteration_max and go to sleep until there's something worthwhile to-do. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/loopback.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/staging/greybus/loop

[PATCH 2/2] staging: greybus: loopback_test: Fix race preventing test completion

2016-12-19 Thread Bryan O'Donoghue
patch fixes the race by ensuring the poll() loop waits for all active Interfaces to complete - as opposed to the first active Interface before breaking the loop. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- drivers/staging/greybus/tools/loopback_test.c | 10 +- 1 file

Re: [PATCH] staging: greybus: loopback: Enclose multiple macro statements in do-while loop

2017-07-18 Thread Bryan O'Donoghue
On 18/07/17 11:56, kart...@techveda.org wrote: From: Karthik Tummala Enclosed multiple macro statements in a do - while loop as per kernel coding standard, pointed by checkpatch. Signed-off-by: Karthik Tummala ---

Re: [PATCH v2] Staging: greybus: Match alignment with open parenthesis.

2017-08-01 Thread Bryan O'Donoghue
issue. Signed-off-by: Shreeya Patel <shreeya.patel23...@gmail.com> Reviewed-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> --- Changes in v2: -Rebase the patch. drivers/staging/greybus/tools/loopback_test.c | 35 --- 1 file changed, 16 inser

Re: [PATCH 1/2] staging: greybus: arche: remove timesync remains

2017-05-15 Thread Bryan O'Donoghue
On 15/05/17 17:10, Johan Hovold wrote: On Mon, May 15, 2017 at 04:17:55PM +0100, Bryan O'Donoghue wrote: On 15/05/17 15:26, Johan Hovold wrote: Remove the remaining timesync bits that were left in the arche platform driver and which prevented the driver from being compiled. Fixes

Re: [PATCH 1/2] staging: greybus: arche: remove timesync remains

2017-05-15 Thread Bryan O'Donoghue
On 15/05/17 15:26, Johan Hovold wrote: Remove the remaining timesync bits that were left in the arche platform driver and which prevented the driver from being compiled. Fixes: bdfb95c4baab ("staging: greybus: remove timesync protocol support") Signed-off-by: Johan Hovold I

Re: [PATCH] staging: greybus: Convert timers to use timer_setup()

2017-10-24 Thread Bryan O'Donoghue
On 24/10/17 10:35, Bryan O'Donoghue wrote: On 24/10/17 09:25, Kees Cook wrote: In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman

Re: [PATCH] staging: greybus: Convert timers to use timer_setup()

2017-10-24 Thread Bryan O'Donoghue
goto err_request; } - setup_timer(>timer, gb_operation_timeout, - (unsigned long)operation); + timer_setup(>timer, gb_operation_timeout, 0); } operation->flags = op_flags; Other than that, the rest look

Re: [PATCH 1/2] staging: greybus: remove unused kfifo_ts

2017-11-03 Thread Bryan O'Donoghue
le *bundle) kthread_stop(gb->task); kfifo_free(>kfifo_lat); - kfifo_free(>kfifo_ts); gb_connection_latency_tag_disable(gb->connection); debugfs_remove(gb->file); This looks right to me Reviewed-by: Bryan O'Donoghue <p

Re: [PATCH 2/2] staging: greybus/loopback: use ktime_get() for time intervals

2017-11-03 Thread Bryan O'Donoghue
On 02/11/17 14:32, Arnd Bergmann wrote: This driver is the only one using the deprecated timeval_to_ns() helper. Changing it from do_gettimeofday() to ktime_get() makes the code more efficient, more robust against concurrent settimeofday(), more accurate and lets us get rid of that helper in the

Re: [PATCH 2/2] staging: greybus/loopback: use ktime_get() for time intervals

2017-11-04 Thread Bryan O'Donoghue
timeofday(>ts); + if (ktime_to_ns(gb->ts) == 0) + gb->ts = ktime_get(); mutex_unlock(>mutex); /* Else operations to perform */ Fine with this change too. Acked-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> _

Re: [PATCH 2/2] staging: greybus: loopback: convert loopback to use generic async operations

2017-11-05 Thread Bryan O'Donoghue
On 05/11/17 12:24, Johan Hovold wrote: + if (error) { gb->error++; + gb->iteration_count++; + } And this looks like an unrelated bug fix that should go in it's own patch, right? I pinged

[PATCH v2 3/4] staging: greybus: operation: add private data with get/set accessors

2017-11-05 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to struct gb_operation and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue <pure

[PATCH v2 4/4] staging: greybus: loopback: convert loopback to use generic async operations

2017-11-05 Thread Bryan O'Donoghue
and the cringe-worthy 'pending' flag. The completion callback triggered by operation.c will provide an authoritative result code - including -ETIMEDOUT for asynchronous operations. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Johan Hovold <jo...@kernel.org> Cc: Al

[PATCH v2 1/4] staging: greybus: loopback: Hold per-connection mutex across operations

2017-11-05 Thread Bryan O'Donoghue
ult several members of the per connection struct gb_loopback are racy. The solution is restoring the old location of mutex_unlock(>mutex) as it was in commit d9fb3754ecf8 ("greybus: loopback: Relax locking during loopback operations"). Fixes: 8e1d6c336d74 ("greybus: loopback: drop b

[PATCH v2 0/4] Convert greybus loopback to core async API

2017-11-05 Thread Bryan O'Donoghue
ronous API - Getting rid of the timer code in loopback which will unblock what Kees is doing. Bryan O'Donoghue (4): staging: greybus: loopback: Hold per-connection mutex across operations staging: greybus: loopback: Fix iteration count on async path staging: greybus: operation: add pr

[PATCH v2 2/4] staging: greybus: loopback: Fix iteration count on async path

2017-11-05 Thread Bryan O'Donoghue
asynchronous operation error. This patch fixes that omission. Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Reported-by: Mitch Tasman <tas...@leaflabs.com> Cc: Johan Hovold &l

[PATCH v3 3/4] staging: greybus: operation: add private data with get/set accessors

2017-11-05 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to struct gb_operation and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue <pure

[PATCH v3 4/4] staging: greybus: loopback: convert loopback to use generic async operations

2017-11-05 Thread Bryan O'Donoghue
and the cringe-worthy 'pending' flag. The completion callback triggered by operation.c will provide an authoritative result code - including -ETIMEDOUT for asynchronous operations. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Johan Hovold <jo...@kernel.org> Cc: Al

[PATCH v3 2/4] staging: greybus: loopback: Fix iteration count on async path

2017-11-05 Thread Bryan O'Donoghue
asynchronous operation error. This patch fixes that omission. Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Reported-by: Mitch Tasman <tas...@leaflabs.com> Cc: Johan Hovold &l

[PATCH v3 1/4] staging: greybus: loopback: Hold per-connection mutex across operations

2017-11-05 Thread Bryan O'Donoghue
ult several members of the per connection struct gb_loopback are racy. The solution is restoring the old location of mutex_unlock(>mutex) as it was in commit d9fb3754ecf8 ("greybus: loopback: Relax locking during loopback operations"). Fixes: 8e1d6c336d74 ("greybus: loopback: drop b

[PATCH v3 0/4] Convert greybus loopback to core async API

2017-11-05 Thread Bryan O'Donoghue
r, two stones (no aggression to birds intended) namely: - Converting over to the core asynchronous API - Getting rid of the timer code in loopback which will unblock what Kees is doing. Bryan O'Donoghue (4): staging: greybus: loopback: Hold per-connection mutex across operations staging: grey

[PATCH 1/2] staging: greybus: operation: add private data with get/set accessors

2017-11-04 Thread Bryan O'Donoghue
Asynchronous operation completion handler's lives are made easier if there is a generic pointer that can store private data associated with the operation. This patch adds a pointer field to operation.h and get/set methods to access that pointer. Signed-off-by: Bryan O'Donoghue <pure.lo...@ne

[PATCH 0/2] Convert greybus loopback to core async API

2017-11-04 Thread Bryan O'Donoghue
with err, two stones (no aggression to birds intended) namely: - Converting over to the core asynchronous API - Getting rid of the timer code in loopback which will unblock what Kees is doing. Bryan O'Donoghue (2): staging: greybus: operation: add private data with get/set accessors staging

[PATCH 2/2] staging: greybus: loopback: convert loopback to use generic async operations

2017-11-04 Thread Bryan O'Donoghue
and the cringe-worthy 'pending' flag. The completion callback triggered by operation.c will provide an authoritative result code - including -ETIMEDOUT for asynchronous operations. Signed-off-by: Bryan O'Donoghue <pure.lo...@nexus-software.ie> Cc: Johan Hovold <jo...@kernel.org> Cc: Al

Re: [PATCH 02/11] staging: greybus: Remove redundant license text

2017-11-08 Thread Bryan O'Donoghue
..@gmail.com> Cc: David Lin <dtw...@gmail.com> Cc: "Bryan O'Donoghue" <pure.lo...@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org> --- drivers/staging/greybus/arche-apb-ctrl.c| 2 -- drivers/staging/greybus/arche-pl

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-11-03 Thread Bryan O'Donoghue
On 03/11/17 20:21, Kees Cook wrote: On Mon, Oct 30, 2017 at 5:05 PM, Kees Cook wrote: On Mon, Oct 30, 2017 at 5:01 PM, wrote: There's a separate change to loopback.c an old patch ARAIR that will subtract use of the timer from

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-30 Thread Bryan O'Donoghue
On 30/10/17 11:32, Johan Hovold wrote: The right thing to do here is to respin your patch from last year which converts the loopback driver to use the timeout handling in greybus core. Actually I wasn't clear if you wanted to to that yourself aswell as the rest if it. But sure I can do that

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-30 Thread Bryan O'Donoghue
On 30/10/17 11:38, Johan Hovold wrote: On Mon, Oct 30, 2017 at 11:35:50AM +, Bryan O'Donoghue wrote: On 30/10/17 11:32, Johan Hovold wrote: The right thing to do here is to respin your patch from last year which converts the loopback driver to use the timeout handling in greybus core

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-24 Thread Bryan O'Donoghue
nconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: "Bryan O'Donoghue" <pure.lo...@nexus-software.ie>

Re: [PATCH] staging: greybus: Convert timers to use timer_setup()

2017-10-24 Thread Bryan O'Donoghue
On 24/10/17 13:47, Kees Cook wrote: On Tue, Oct 24, 2017 at 2:40 AM, Bryan O'Donoghue <pure.lo...@nexus-software.ie> wrote: On 24/10/17 10:35, Bryan O'Donoghue wrote: On 24/10/17 09:25, Kees Cook wrote: In preparation for unconditionally passing the struct timer_list pointer to all

Re: [PATCH] staging: greybus: Convert timers to use timer_setup()

2017-10-24 Thread Bryan O'Donoghue
On 24/10/17 14:14, Kees Cook wrote: On Tue, Oct 24, 2017 at 5:52 AM, Bryan O'Donoghue <pure.lo...@nexus-software.ie> wrote: On 24/10/17 13:47, Kees Cook wrote: On Tue, Oct 24, 2017 at 2:40 AM, Bryan O'Donoghue <pure.lo...@nexus-software.ie> wrote: On 24/10/17 10:35, Bryan O'Do

Re: [PATCH 2/3] staging: greybus: loopback.c: do insertion in O(n) instead of O(n lg n)

2018-10-23 Thread Bryan O'Donoghue
On 23/10/2018 17:20, Rasmus Villemoes wrote: On 2018-10-11 01:03, Bryan O'Donoghue wrote: On 05/10/2018 15:28, Rasmus Villemoes wrote: Signed-off-by: Rasmus Villemoes --- I have no idea if the performance matters (it probably doesn't). Feel free to ignore this and the followup cleanup

Re: [PATCH 1/3] staging: greybus: loopback.c: remove unused gb_loopback::lbid

2018-10-10 Thread Bryan O'Donoghue
On 05/10/2018 15:28, Rasmus Villemoes wrote: Since lbid isn't mentioned anywhere else in greybus/, it's hard to figure out how it was meant to be used. It does seem like entirely dead (write-only) code. yep, dead code Reviewed-by: Bryan O'Donoghue

Re: [PATCH 2/3] staging: greybus: loopback.c: do insertion in O(n) instead of O(n lg n)

2018-10-10 Thread Bryan O'Donoghue
On 05/10/2018 15:28, Rasmus Villemoes wrote: Signed-off-by: Rasmus Villemoes --- I have no idea if the performance matters (it probably doesn't). Feel free to ignore this and the followup cleanup. What's the problem you're fixing here ? Is it tested ?

Re: [PATCH 2/2] staging: greybus: Added space between string concatenated

2018-12-05 Thread Bryan O'Donoghue
On 04/12/2018 20:58, Cristian Sicilia wrote: Some concatenated strings are now spaced. Signed-off-by: Cristian Sicilia --- drivers/staging/greybus/loopback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/greybus/loopback.c

Re: [PATCH 2/2] staging: greybus: Added space between string concatenated

2018-12-06 Thread Bryan O'Donoghue
On 05/12/2018 21:00, Sicilia Cristian wrote: It doesn't change the result string So why do it then ? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/2] staging: greybus: Added space between string concatenated

2018-12-06 Thread Bryan O'Donoghue
On 06/12/2018 15:05, Greg Kroah-Hartman wrote: On Thu, Dec 06, 2018 at 09:43:46AM +, Bryan O'Donoghue wrote: On 05/12/2018 21:00, Sicilia Cristian wrote: It doesn't change the result string So why do it then ? Because it is easier to read this way and odds are checkpatch is happier

Re: [PATCH 2/2] staging: greybus: Added space between string concatenated

2018-12-06 Thread Bryan O'Donoghue
On 06/12/2018 16:23, Greg Kroah-Hartman wrote: On Thu, Dec 06, 2018 at 04:14:53PM +, Bryan O'Donoghue wrote: On 06/12/2018 15:05, Greg Kroah-Hartman wrote: On Thu, Dec 06, 2018 at 09:43:46AM +, Bryan O'Donoghue wrote: On 05/12/2018 21:00, Sicilia Cristian wrote: It doesn't change

Re: [RESEND PATCH v6 0/5] Add i.MX8MM OCOTP support

2019-05-04 Thread Bryan O'Donoghue
On 04/05/2019 09:39, Greg KH wrote: On Fri, May 03, 2019 at 05:53:37PM +0100, Bryan O'Donoghue wrote: V6 RESEND: - Adding Greg to sender list. Greg looks like you are the right person to apply this. $ ./scripts/get_maintainer.pl --file drivers/nvmem/imx-ocotp.c Srinivas Kandagatla

[PATCH v6 3/5] nvmem: imx-ocotp: Change TIMING calculation to u-boot algorithm

2019-05-03 Thread Bryan O'Donoghue
. This patch inherits the u-boot timings for the OCOTP_TIMING calculation on the i.MX6 and i.MX8. Those timings are known to work and critically specify values such as STROBE_PROG as a minimum timing. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue

[PATCH v6 2/5] nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing

2019-05-03 Thread Bryan O'Donoghue
ch ensures that the relevant field is read and written back to the timing register. Fixes: 0642bac7da42 ("nvmem: imx-ocotp: add write support") Signed-off-by: Bryan O'Donoghue Reviewed-by: Leonard Crestez --- drivers/nvmem/imx-ocotp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v6 4/5] nvmem: imx-ocotp: Add i.MX8MM support

2019-05-03 Thread Bryan O'Donoghue
to 256 registers. We map the entire putative 256 OTP registers. Signed-off-by: Bryan O'Donoghue --- drivers/nvmem/imx-ocotp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index 2c5009691dd6..189fd5f334f4 100644 --- a/drivers/nvmem

[PATCH v6 5/5] dt-bindings: imx-ocotp: Add i.MX8MM compatible

2019-05-03 Thread Bryan O'Donoghue
Add compatible for i.MX8MM as per arch/arm64/boot/dts/freescale/imx8mm.dtsi Signed-off-by: Bryan O'Donoghue Cc: Rob Herring Reviewed-by: Leonard Crestez --- Documentation/devicetree/bindings/nvmem/imx-ocotp.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[RESEND PATCH v6 0/5] Add i.MX8MM OCOTP support

2019-05-03 Thread Bryan O'Donoghue
the failure state. Bryan O'Donoghue (5): nvmem: imx-ocotp: Elongate OCOTP_CTRL ADDR field to eight bits nvmem: imx-ocotp: Ensure WAIT bits are preserved when setting timing nvmem: imx-ocotp: Change TIMING calculation to u-boot algorithm nvmem: imx-ocotp: Add i.MX8MM support dt-bindings: imx

[PATCH v6 1/5] nvmem: imx-ocotp: Elongate OCOTP_CTRL ADDR field to eight bits

2019-05-03 Thread Bryan O'Donoghue
for their respective RSVD0 bits and ignore a write-back of zero where i.MX8 will make use of the full range. This patch expands the bit-field definition for all users to eight bits, which is safe due to RSVD0 being a no-op for the i.MX6 and i.MX7. Signed-off-by: Bryan O'Donoghue Reviewed-by: Leonard Crestez

Re: [RESEND PATCH v6 0/5] Add i.MX8MM OCOTP support

2019-05-04 Thread Bryan O'Donoghue
On 04/05/2019 18:10, Srinivas Kandagatla wrote: Normally I don't take patches that are sent after rc5 into next merge window. Unless there is an urgent fix. In this case I will be applying these series to nvmem next branch once rc1 is released for 5.3 merge window. Great, that'll done fine

Re: [PATCH] staging: greybus: tools: Remove function log_csv_error()

2019-06-26 Thread Bryan O'Donoghue
log_csv_error(int len, int err) -{ - fprintf(stderr, "unable to write %d bytes to csv %s\n", len, - strerror(err)); -} - int format_output(struct loopback_test *t, struct loopback_results *r, const char *dev_name, Reviewed