Re: [PATCH 3/3] media: rc: nuvoton: Keep device enabled during reg init

2018-05-25 Thread Michał Winiarski
On Fri, May 25, 2018 at 02:59:41PM +0100, Sean Young wrote: > On Fri, May 25, 2018 at 03:35:23PM +0200, Michał Winiarski wrote: > > On Thu, May 24, 2018 at 12:31:40PM +0100, Sean Young wrote: > > > On Mon, May 21, 2018 at 04:38:03PM +0200, Michał Winiarski wrote: > &g

[PATCH v2 3/3] media: rc: nuvoton: Keep device enabled during reg init

2018-05-25 Thread Michał Winiarski
Doing writes when the device is disabled seems to be a NOOP. For CIR device, we should enable it, intialize it, and then disable it until it's opened. CIR_WAKE should always be enabled. Signed-off-by: Michał Winiarski <michal.winiar...@intel.com> Cc: Jarod Wilson <ja...@redhat.com> Cc

Re: [PATCH 3/3] media: rc: nuvoton: Keep device enabled during reg init

2018-05-25 Thread Michał Winiarski
On Thu, May 24, 2018 at 12:31:40PM +0100, Sean Young wrote: > On Mon, May 21, 2018 at 04:38:03PM +0200, Michał Winiarski wrote: > > Doing writes when the device is disabled seems to be a NOOP. > > Let's enable the device, write the values, and then disable it on init. > > This

Re: [PATCH 1/3] media: rc: nuvoton: Tweak the interrupt enabling dance

2018-05-21 Thread Michał Winiarski
On Mon, May 21, 2018 at 04:54:07PM +0100, Sean Young wrote: > On Mon, May 21, 2018 at 04:38:01PM +0200, Michał Winiarski wrote: > > It appears that we need to enable CIR device before attempting to touch > > some of the registers. Previously, this was not a big issue, since we

[PATCH 1/3] media: rc: nuvoton: Tweak the interrupt enabling dance

2018-05-21 Thread Michał Winiarski
ow_bug.cgi?id=199597 Signed-off-by: Michał Winiarski <michal.winiar...@intel.com> Cc: Jarod Wilson <ja...@redhat.com> Cc: Sean Young <s...@mess.org> --- drivers/media/rc/nuvoton-cir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/nuvo

[PATCH 2/3] media: rc: nuvoton: Keep track of users on CIR enable/disable

2018-05-21 Thread Michał Winiarski
Core rc keeps track of the users - let's use it to tweak the code and use the common code path on suspend/resume. Signed-off-by: Michał Winiarski <michal.winiar...@intel.com> Cc: Jarod Wilson <ja...@redhat.com> Cc: Sean Young <s...@mess.org> --- drivers/media/rc/

[PATCH 3/3] media: rc: nuvoton: Keep device enabled during reg init

2018-05-21 Thread Michał Winiarski
Doing writes when the device is disabled seems to be a NOOP. Let's enable the device, write the values, and then disable it on init. This changes the behavior for wake device, which is now being disabled after init. Signed-off-by: Michał Winiarski <michal.winiar...@intel.com> Cc: Jarod Wils