[media] rc: change wakeup_protocols to list all protocol variants

For IR wakeup, a driver has to program the hardware to wakeup at a
specific IR sequence, so it makes no sense to allow multiple wakeup
protocols to be selected. In the same manner the sysfs interface only
allows one scancode to be provided.

In addition, we need to know the specific variant of the protocol.

In short, these changes are made to the wakeup_protocols sysfs entry:
 - list all the protocol variants rather than the protocol groups,
   e.g. "nec nec-x nec-32" rather than just "nec".
 - only allow one protocol variant to be selected rather than multiple
 - wakeup_filter can only be set once a protocol has been selected in
   wakeup_protocols.

This is an API change, however the only user of this API is the img-ir,
but the wakeup code was never merged to mainline, so it was never used.

Signed-off-by: Sean Young <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Sifan Naeem <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Sean Young 2016-12-05 17:08:35 -02:00 • committed by Mauro Carvalho Chehab
commit 0751d33c27
8 changed files with 262 additions and 91 deletions

View file

@ -92,15 +92,16 @@ This value may be reset to 0 if the current protocol is altered.
Reading this file returns a list of available protocols to use for the
wakeup filter, something like:
``rc5 rc6 nec jvc [sony]``
``rc-5 nec nec-x rc-6-0 rc-6-6a-24 [rc-6-6a-32] rc-6-mce``
Note that protocol variants are listed, so "nec", "sony", "rc-5", "rc-6"
have their different bit length encodings listed if available.
Note that all protocol variants are listed.
The enabled wakeup protocol is shown in [] brackets.
Writing "+proto" will add a protocol to the list of enabled wakeup
protocols.
Writing "-proto" will remove a protocol from the list of enabled wakeup
protocols.
Only one protocol can be selected at a time.
Writing "proto" will use "proto" for wakeup events.