mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
[media] rc: rc-core: Add support for encode_wakeup drivers
Add support in rc-core for drivers which implement the wakeup scancode filter by encoding the scancode using the raw IR encoders. This is by way of rc_dev::encode_wakeup which should be set to true and rc_dev::allowed_wakeup_protocols should be set to the raw IR encoders. We also do not permit the mask to be set as we cannot generate IR which would match that. Signed-off-by: James Hogan <james@albanarts.com> Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
103293be9d
commit
f423ccc1a3
@@ -83,6 +83,8 @@ enum rc_filter_type {
|
||||
* @input_dev: the input child device used to communicate events to userspace
|
||||
* @driver_type: specifies if protocol decoding is done in hardware or software
|
||||
* @idle: used to keep track of RX state
|
||||
* @encode_wakeup: wakeup filtering uses IR encode API, therefore the allowed
|
||||
* wakeup protocols is the set of all raw encoders
|
||||
* @allowed_protocols: bitmask with the supported RC_BIT_* protocols
|
||||
* @enabled_protocols: bitmask with the enabled RC_BIT_* protocols
|
||||
* @allowed_wakeup_protocols: bitmask with the supported RC_BIT_* wakeup protocols
|
||||
@@ -147,6 +149,7 @@ struct rc_dev {
|
||||
struct input_dev *input_dev;
|
||||
enum rc_driver_type driver_type;
|
||||
bool idle;
|
||||
bool encode_wakeup;
|
||||
u64 allowed_protocols;
|
||||
u64 enabled_protocols;
|
||||
u64 allowed_wakeup_protocols;
|
||||
|
||||
@@ -106,6 +106,15 @@ enum rc_type {
|
||||
RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | RC_BIT_SHARP | \
|
||||
RC_BIT_XMP)
|
||||
|
||||
#define RC_BIT_ALL_IR_ENCODER \
|
||||
(RC_BIT_RC5 | RC_BIT_RC5X_20 | RC_BIT_RC5_SZ | \
|
||||
RC_BIT_JVC | \
|
||||
RC_BIT_SONY12 | RC_BIT_SONY15 | RC_BIT_SONY20 | \
|
||||
RC_BIT_NEC | RC_BIT_NECX | RC_BIT_NEC32 | \
|
||||
RC_BIT_SANYO | \
|
||||
RC_BIT_RC6_0 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | \
|
||||
RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | \
|
||||
RC_BIT_SHARP)
|
||||
|
||||
#define RC_SCANCODE_UNKNOWN(x) (x)
|
||||
#define RC_SCANCODE_OTHER(x) (x)
|
||||
|
||||
Reference in New Issue
Block a user