Message ID | f6113028e0f22e319172f2f074e64250f0238263.1604589023.git.michael@fossekall.de |
---|---|
State | New |
Headers | show |
Series | media: rc: gpio-ir-recv: add timeout property | expand |
diff --git a/drivers/media/rc/gpio-ir-recv.c b/drivers/media/rc/gpio-ir-recv.c index 22e524b69806..eb3e56c27c29 100644 --- a/drivers/media/rc/gpio-ir-recv.c +++ b/drivers/media/rc/gpio-ir-recv.c @@ -99,7 +99,8 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) rcdev->dev.parent = dev; rcdev->driver_name = KBUILD_MODNAME; rcdev->min_timeout = 1; - rcdev->timeout = IR_DEFAULT_TIMEOUT; + if (of_property_read_u32(np, "linux,timeout-us", &rcdev->timeout)) + rcdev->timeout = IR_DEFAULT_TIMEOUT; rcdev->max_timeout = 10 * IR_DEFAULT_TIMEOUT; rcdev->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER; rcdev->map_name = of_get_property(np, "linux,rc-map-name", NULL);
This optional property allows to set the recorder timeout via the devicetree: - linux,timeout-us: set the length of a space at which the recorder goes idle, specified in microseconds. Signed-off-by: Michael Klein <michael@fossekall.de> --- drivers/media/rc/gpio-ir-recv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)