Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-20 Thread Thierry Reding
On Thu, Feb 07, 2019 at 09:27:51AM +0100, Thierry Reding wrote: > On Wed, Feb 06, 2019 at 07:12:04PM +0100, Philipp Zabel wrote: > > On Wed, 2019-02-06 at 17:00 +0100, Thierry Reding wrote: > [...] > > > That way we operate on the same reset control, but we wouldn't need to > > > iterate over all

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-07 Thread Thierry Reding
On Wed, Feb 06, 2019 at 07:12:04PM +0100, Philipp Zabel wrote: > On Wed, 2019-02-06 at 17:00 +0100, Thierry Reding wrote: [...] > > That way we operate on the same reset control, but we wouldn't need to > > iterate over all existing reset controls in order to determine whether > > we can acquire

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-06 Thread Philipp Zabel
On Wed, 2019-02-06 at 17:00 +0100, Thierry Reding wrote: [...] > > reset_control_get_exclusive() // implicitly acquires, may fail > > reset_control_acquire() // optional, just makes acquire explicit (no-op) > > reset_control_assert/deassert() > > reset_control_release() > > I don't think we can

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-06 Thread Thierry Reding
On Wed, Feb 06, 2019 at 03:46:30PM +0100, Philipp Zabel wrote: > Hi Thierry, > > On Wed, 2019-02-06 at 12:38 +0100, Thierry Reding wrote: > [...] > > I see, that's a very good point. So it sounds indeed like we'll need to > > add some sort of implicit acquire to request_exclusive() to make this >

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-06 Thread Philipp Zabel
Hi Thierry, On Wed, 2019-02-06 at 12:38 +0100, Thierry Reding wrote: [...] > I see, that's a very good point. So it sounds indeed like we'll need to > add some sort of implicit acquire to request_exclusive() to make this > work. See below. > However, that's going to make the API a bit awkward

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-06 Thread Thierry Reding
On Wed, Feb 06, 2019 at 11:28:05AM +0100, Philipp Zabel wrote: > On Tue, 2019-02-05 at 23:13 +0100, Thierry Reding wrote: > [...] > > > Drivers that never call _acquire()/_release() must continue to work as > > > they are, so exclusive reset controls have to be acquired by default. > > > > I

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-06 Thread Philipp Zabel
On Tue, 2019-02-05 at 23:13 +0100, Thierry Reding wrote: [...] > > Drivers that never call _acquire()/_release() must continue to work as > > they are, so exclusive reset controls have to be acquired by default. > > I don't think they have to. See below. Currently the API makes guarantees about

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-05 Thread Thierry Reding
On Tue, Feb 05, 2019 at 07:05:41PM +0100, Philipp Zabel wrote: > Hi Thierry, > > On Fri, 2019-02-01 at 15:00 +0100, Thierry Reding wrote: > [...] > > It sounds pretty good and elegant actually. Let me try to restate to see > > if I understand correctly: > > > > So basically what you're saying is

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-05 Thread Philipp Zabel
Hi Thierry, On Fri, 2019-02-01 at 15:00 +0100, Thierry Reding wrote: [...] > It sounds pretty good and elegant actually. Let me try to restate to see > if I understand correctly: > > So basically what you're saying is that we would be changing the > definition of exclusive resets to make them

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-02-01 Thread Thierry Reding
On Wed, Jan 30, 2019 at 01:03:28PM +0100, Philipp Zabel wrote: > Hi Thierry, > > On Mon, 2019-01-28 at 15:58 +0100, Thierry Reding wrote: > > On Mon, Jan 28, 2019 at 12:26:48PM +0100, Philipp Zabel wrote: > > > Hi Thierry, > > > > > > On Fri, 2019-01-25 at 11:15 +0100, Thierry Reding wrote: > >

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-01-30 Thread Philipp Zabel
Hi Thierry, On Mon, 2019-01-28 at 15:58 +0100, Thierry Reding wrote: > On Mon, Jan 28, 2019 at 12:26:48PM +0100, Philipp Zabel wrote: > > Hi Thierry, > > > > On Fri, 2019-01-25 at 11:15 +0100, Thierry Reding wrote: > > > From: Thierry Reding > > > > > > When requesting a reset control for

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-01-28 Thread Thierry Reding
On Mon, Jan 28, 2019 at 12:26:48PM +0100, Philipp Zabel wrote: > Hi Thierry, > > On Fri, 2019-01-25 at 11:15 +0100, Thierry Reding wrote: > > From: Thierry Reding > > > > When requesting a reset control for exclusive use that's already in use, > > an -EBUSY error code is returned. Users can

Re: [PATCH] reset: Don't WARN if trying to get a used reset control

2019-01-28 Thread Philipp Zabel
Hi Thierry, On Fri, 2019-01-25 at 11:15 +0100, Thierry Reding wrote: > From: Thierry Reding > > When requesting a reset control for exclusive use that's already in use, > an -EBUSY error code is returned. Users can react accordingly when they > receive that error code, so there is no need to

[PATCH] reset: Don't WARN if trying to get a used reset control

2019-01-25 Thread Thierry Reding
From: Thierry Reding When requesting a reset control for exclusive use that's already in use, an -EBUSY error code is returned. Users can react accordingly when they receive that error code, so there is no need to loudly complain. Signed-off-by: Thierry Reding --- drivers/reset/core.c | 2 +-