media: sunxi-cir: allow timeout to be set at runtime
authorSean Young <sean@mess.org>
Tue, 10 Nov 2020 08:30:38 +0000 (09:30 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 25 Nov 2020 13:51:34 +0000 (14:51 +0100)
commit371443de3c991f7b025d5203754a3497b7ea7c32
tree9fac2f917b4ecca5799beae4b939b1e0343d7c11
parent3f56df4c8ffeb120ed41906d3aae71799b7e726a
media: sunxi-cir: allow timeout to be set at runtime

This allows the timeout to be set with the LIRC_SET_REC_TIMEOUT ioctl.

The timeout was hardcoded at just over 20ms, but returned 120ms when
queried with the LIRC_GET_REC_TIMEOUT ioctl.

This also ensures the idle threshold is set correctly with a base clock
other than 8Mhz.

Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/rc/sunxi-cir.c