aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-28 13:25:28 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-30 14:45:48 -0400
commitd24b69fc6b0aca41a205b2b5abaf3f243ad7d48b (patch)
tree58522e0beaabfc8e94dbace1e3db1c5af391e5bd
parentcfd0c77d0830d33288e9da17aa10db3a61de601a (diff)
[media] rc-main: allow raw protocol drivers to restrict the allowed protos
On some hardware (au0828/au8522), the hardware is broken with regards to the initial pulse detection. So, the driver needs to produce a fake start pulse. That limits the acceptable protocols, as it is not possible to produce a fake pulse that would cover all supported protocols. So, allow the driver to explicitly set the allowed protocols. If the driver doesn't specify, keep the old behavior. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/rc/rc-main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index dfceeb4e34a8..a7991c7d010a 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -859,10 +859,9 @@ static ssize_t show_protocols(struct device *device,
859 859
860 if (fattr->type == RC_FILTER_NORMAL) { 860 if (fattr->type == RC_FILTER_NORMAL) {
861 enabled = dev->enabled_protocols; 861 enabled = dev->enabled_protocols;
862 if (dev->raw) 862 allowed = dev->allowed_protocols;
863 if (dev->raw && !allowed)
863 allowed = ir_raw_get_allowed_protocols(); 864 allowed = ir_raw_get_allowed_protocols();
864 else
865 allowed = dev->allowed_protocols;
866 } else { 865 } else {
867 enabled = dev->enabled_wakeup_protocols; 866 enabled = dev->enabled_wakeup_protocols;
868 allowed = dev->allowed_wakeup_protocols; 867 allowed = dev->allowed_wakeup_protocols;