LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Sifan Naeem <Sifan.Naeem@imgtec.com>
To: James Hogan <James.Hogan@imgtec.com>,
	"mchehab@osg.samsung.com" <mchehab@osg.samsung.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	James Hartley <James.Hartley@imgtec.com>,
	Ezequiel Garcia <Ezequiel.Garcia@imgtec.com>
Subject: RE: [PATCH 3/5] rc: img-ir: biphase enabled with workaround
Date: Fri, 12 Dec 2014 12:35:35 +0000	[thread overview]
Message-ID: <A0E307549471DA4DBAF2DE2DE6CBFB7E4956495A@hhmail02.hh.imgtec.org> (raw)
In-Reply-To: <548AC9A4.5020802@imgtec.com>



> -----Original Message-----
> From: James Hogan
> Sent: 12 December 2014 10:56
> To: Sifan Naeem; mchehab@osg.samsung.com
> Cc: linux-kernel@vger.kernel.org; linux-media@vger.kernel.org; James
> Hartley; Ezequiel Garcia
> Subject: Re: [PATCH 3/5] rc: img-ir: biphase enabled with workaround
> 
> Hi Sifan,
> 
> On 11/12/14 18:54, Sifan Naeem wrote:
> >>> +/*
> >>> + * Timer function to re-enable the current protocol after it had
> >>> +been
> >>> + * cleared when invalid interrupts were generated due to a quirk in
> >>> +the
> >>> + * img-ir decoder.
> >>> + */
> >>> +static void img_ir_suspend_timer(unsigned long arg) {
> >>> +	struct img_ir_priv *priv = (struct img_ir_priv *)arg;
> >>> +
> >>> +	img_ir_write(priv, IMG_IR_IRQ_CLEAR,
> >>> +			IMG_IR_IRQ_ALL & ~IMG_IR_IRQ_EDGE);
> >>> +
> >>> +	/* Don't set IRQ if it has changed in a different context. */
> >>
> >> Should you even be clearing IRQs in that case? Maybe safer to just
> >> treat that case as a "return immediately without touching anything" sort
> of situation.
> >>
> > don't have to clear it for this work around to work, so will remove.
> >
> >>> +	if ((priv->hw.suspend_irqen & IMG_IR_IRQ_EDGE) ==
> >>> +				img_ir_read(priv, IMG_IR_IRQ_ENABLE))
> >>> +		img_ir_write(priv, IMG_IR_IRQ_ENABLE, priv-
> >>> hw.suspend_irqen);
> >>> +	/* enable */
> >>> +	img_ir_write(priv, IMG_IR_CONTROL, priv->hw.reg_timings.ctrl); }
> 
> To clarify, I was only referring to the case where the irq mask has changed
> unexpectedly. If it hasn't changed then it would seem to make sense to clear
> pending interrupts (i.e. the ones we've been intentionally ignoring) before
> re-enabling them.
> 
> When you say it works without, do you mean there never are pending
> interrupts (if you don't press any other buttons on the remote)?
> 
Nope, with the change I submitted in v2 (removed the clearing IRQ) there are no pending interrupts at the end.
But as before it goes through the workaround couple of times for each interrupt before settling down.

Thanks,
Sifan

> Cheers
> James


  reply	other threads:[~2014-12-12 12:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 15:38 [PATCH 0/5] rc: img-ir: rc5 and rc6 support added Sifan Naeem
2014-12-04 15:38 ` [PATCH 1/5] rc: img-ir: add scancode requests to a struct Sifan Naeem
2014-12-08 16:47   ` James Hogan
2014-12-04 15:38 ` [PATCH 2/5] rc: img-ir: pass toggle bit to the rc driver Sifan Naeem
2014-12-08 16:49   ` James Hogan
2014-12-04 15:38 ` [PATCH 3/5] rc: img-ir: biphase enabled with workaround Sifan Naeem
2014-12-08 17:17   ` James Hogan
2014-12-11 18:54     ` Sifan Naeem
2014-12-12 10:55       ` James Hogan
2014-12-12 12:35         ` Sifan Naeem [this message]
2014-12-04 15:38 ` [PATCH 4/5] rc: img-ir: add philips rc5 decoder module Sifan Naeem
2014-12-08 17:41   ` James Hogan
2014-12-04 15:38 ` [PATCH 5/5] rc: img-ir: add philips rc6 " Sifan Naeem
2014-12-08 17:45   ` James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A0E307549471DA4DBAF2DE2DE6CBFB7E4956495A@hhmail02.hh.imgtec.org \
    --to=sifan.naeem@imgtec.com \
    --cc=Ezequiel.Garcia@imgtec.com \
    --cc=James.Hartley@imgtec.com \
    --cc=James.Hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --subject='RE: [PATCH 3/5] rc: img-ir: biphase enabled with workaround' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).