]> git.baikalelectronics.ru Git - kernel.git/commit
[media] rc: change wakeup_protocols to list all protocol variants
authorSean Young <sean@mess.org>
Mon, 5 Dec 2016 19:08:35 +0000 (17:08 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 30 Jan 2017 14:15:12 +0000 (12:15 -0200)
commit5ce420f421772dfb4235a8b4e78fa111131b5d69
tree6af68207a2a32c3d188d9ecb881e9f73706ab18c
parent2d6d09dc265c5fcea25fa314ba1ce5e04270a8d8
[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 <sean@mess.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Sifan Naeem <sifan.naeem@imgtec.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Documentation/ABI/testing/sysfs-class-rc
Documentation/media/uapi/rc/rc-sysfs-nodes.rst
drivers/media/rc/img-ir/img-ir-hw.c
drivers/media/rc/img-ir/img-ir-nec.c
drivers/media/rc/img-ir/img-ir-sony.c
drivers/media/rc/rc-ir-raw.c
drivers/media/rc/rc-main.c
include/media/rc-core.h