From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "David Härdeman" <david@hardeman.nu>
Cc: linux-media@vger.kernel.org, jwilson@redhat.com, sean@mess.org
Subject: Re: [PATCH 4/8] rc-core: don't throw away protocol information
Date: Tue, 25 Sep 2012 15:40:22 -0300 [thread overview]
Message-ID: <20120925154022.0d6b44c4@redhat.com> (raw)
In-Reply-To: <20120825214708.22603.30247.stgit@localhost.localdomain>
Em Sat, 25 Aug 2012 23:47:08 +0200
David Härdeman <david@hardeman.nu> escreveu:
Pathes 1 to 3 are OK. Applied, thanks!
...
> +#define RC_SCANCODE_UNKNOWN(x) (x)
> +#define RC_SCANCODE_OTHER(x) (x)
> +#define RC_SCANCODE_NEC(addr, cmd) (((addr) << 8) | (cmd))
> +#define RC_SCANCODE_NECX(addr, cmd) (((addr) << 8) | (cmd))
> +#define RC_SCANCODE_NEC32(data) ((data) & 0xffffffff)
> +#define RC_SCANCODE_RC5(sys, cmd) (((sys) << 8) | (cmd))
> +#define RC_SCANCODE_RC5_SZ(sys, cmd) (((sys) << 8) | (cmd))
> +#define RC_SCANCODE_RC6_0(sys, cmd) (((sys) << 8) | (cmd))
> +#define RC_SCANCODE_RC6_6A(vendor, sys, cmd) (((vendor) << 16) | ((sys) << 8) | (cmd))
Huh? You're defining the same code for NEC, NECX, RC5, ...
Why? It seems better to have one macro for (up to) 16 bit protocols,
and another one for the two 32 bit ones.
Btw, on several drivers, you're using the wrong macro name. It doesn't seem
fine to miss-use it.
For example, see the generic I2C driver: several of the remote controllers
there are NEC[1]. Yet, you're using there the RC5 variant.
[1] Currently, they're using "other" because we don't have that IR's or the
devices that use it here, in order to make it scan the full NEC (or NEC
variant) code.
--
Regards,
Mauro
next prev parent reply other threads:[~2012-09-25 18:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-25 21:46 [PATCH 0/8] rc-core: patches for 3.7 David Härdeman
2012-08-25 21:46 ` [PATCH 1/8] winbond-cir: correctness fix David Härdeman
2012-08-25 21:46 ` [PATCH 2/8] winbond-cir: asynchronous tx David Härdeman
2012-08-25 21:47 ` [PATCH 3/8] rc-core: add separate defines for protocol bitmaps and numbers David Härdeman
2012-09-25 20:19 ` Mauro Carvalho Chehab
2012-08-25 21:47 ` [PATCH 4/8] rc-core: don't throw away protocol information David Härdeman
2012-09-25 18:40 ` Mauro Carvalho Chehab [this message]
2012-08-25 21:47 ` [PATCH 5/8] rc-core: use the full 32 bits for NEC scancodes David Härdeman
2012-08-25 21:47 ` [PATCH 6/8] rc-core: merge rc5 and streamzap decoders David Härdeman
2012-08-25 21:47 ` [PATCH 7/8] rc-core: rename ir_input_class to rc_class David Härdeman
2012-08-25 21:47 ` [PATCH 8/8] rc-core: initialize rc-core earlier if built-in David Härdeman
2012-08-30 19:56 ` [PATCH 0/8] rc-core: patches for 3.7 Jarod Wilson
2012-09-03 21:55 ` David Härdeman
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=20120925154022.0d6b44c4@redhat.com \
--to=mchehab@redhat.com \
--cc=david@hardeman.nu \
--cc=jwilson@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=sean@mess.org \
/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 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).