From: James Hogan <james.hogan@imgtec.com>
To: Sifan Naeem <sifan.naeem@imgtec.com>, <mchehab@osg.samsung.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-media@vger.kernel.org>,
<james.hartley@imgtec.com>, <ezequiel.garcia@imgtec.com>
Subject: Re: [PATCH 2/5] rc: img-ir: pass toggle bit to the rc driver
Date: Mon, 8 Dec 2014 16:49:07 +0000 [thread overview]
Message-ID: <5485D683.2010100@imgtec.com> (raw)
In-Reply-To: <1417707523-7730-3-git-send-email-sifan.naeem@imgtec.com>
[-- Attachment #1: Type: text/plain, Size: 2389 bytes --]
On 04/12/14 15:38, Sifan Naeem wrote:
> Add toggle bit to struct img_ir_scancode_req so that protocols can
> provide it to img_ir_handle_data(), and pass that toggle bit up to
> rc_keydown instead of 0.
>
> This is nedded for the upcoming rc-5 and rc-6 patches.
Typo (nedded).
Otherwise:
Acked-by: James Hogan <james.hogan@imgtec.com>
Cheers
James
>
> Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
> ---
> drivers/media/rc/img-ir/img-ir-hw.c | 8 +++++---
> drivers/media/rc/img-ir/img-ir-hw.h | 2 ++
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/rc/img-ir/img-ir-hw.c b/drivers/media/rc/img-ir/img-ir-hw.c
> index 61850a6..4a1407b 100644
> --- a/drivers/media/rc/img-ir/img-ir-hw.c
> +++ b/drivers/media/rc/img-ir/img-ir-hw.c
> @@ -792,6 +792,7 @@ static void img_ir_handle_data(struct img_ir_priv *priv, u32 len, u64 raw)
> struct img_ir_scancode_req request;
>
> request.protocol = RC_TYPE_UNKNOWN;
> + request.toggle = 0;
>
> if (dec->scancode)
> ret = dec->scancode(len, raw, hw->enabled_protocols, &request);
> @@ -802,9 +803,10 @@ static void img_ir_handle_data(struct img_ir_priv *priv, u32 len, u64 raw)
> dev_dbg(priv->dev, "data (%u bits) = %#llx\n",
> len, (unsigned long long)raw);
> if (ret == IMG_IR_SCANCODE) {
> - dev_dbg(priv->dev, "decoded scan code %#x\n",
> - request.scancode);
> - rc_keydown(hw->rdev, request.protocol, request.scancode, 0);
> + dev_dbg(priv->dev, "decoded scan code %#x, toggle %u\n",
> + request.scancode, request.toggle);
> + rc_keydown(hw->rdev, request.protocol, request.scancode,
> + request.toggle);
> img_ir_end_repeat(priv);
> } else if (ret == IMG_IR_REPEATCODE) {
> if (hw->mode == IMG_IR_M_REPEATING) {
> diff --git a/drivers/media/rc/img-ir/img-ir-hw.h b/drivers/media/rc/img-ir/img-ir-hw.h
> index 1fc9583..5e59e8e 100644
> --- a/drivers/media/rc/img-ir/img-ir-hw.h
> +++ b/drivers/media/rc/img-ir/img-ir-hw.h
> @@ -138,10 +138,12 @@ struct img_ir_timing_regvals {
> * RC_TYPE_UNKNOWN).
> * @scancode: Scan code of received message (must be written by
> * handler if IMG_IR_SCANCODE is returned).
> + * @toggle: Toggle bit (defaults to 0).
> */
> struct img_ir_scancode_req {
> enum rc_type protocol;
> u32 scancode;
> + u8 toggle;
> };
>
> /**
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-12-08 16:49 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 [this message]
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
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=5485D683.2010100@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=ezequiel.garcia@imgtec.com \
--cc=james.hartley@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=sifan.naeem@imgtec.com \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.