media: tc358743: fix connected/active CSI-2 lane reporting
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 21 Sep 2017 15:30:24 +0000 (17:30 +0200)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:32:49 +0000 (16:32 +0100)
commitb80ff22b3140612dfc0da2baa690c36e7fa7ff87
tree1e0897806e606131f4ee95694ae1cca5712528cb
parentc04271233b95b74a96ce25a760a0fd3b827ad8e0
media: tc358743: fix connected/active CSI-2 lane reporting

g_mbus_config was supposed to indicate all supported lane numbers, not
only the number of those currently in active use. Since the TC358743
can dynamically reduce the number of active lanes if the required
bandwidth allows for it, report all lane numbers up to the connected
number of lanes as supported in pdata mode.
In device tree mode, do not report lane count and clock mode at all, as
the receiver driver can determine these from the device tree.

To allow communicating the number of currently active lanes, add a new
bitfield to the v4l2_mbus_config flags. This is a temporary fix, to be
used only until a better solution is found.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/media/i2c/tc358743.c
include/media/v4l2-mediabus.h