Allow CCP2 receiver to read the crc configuration from the device tree.
Default value of 1 is used to maintain backward compatibility with
existing device trees that don't specify the crc property.
Signed-off-by: Alex Tran <alex.t.tran@gmail.com>
---
drivers/media/platform/ti/omap3isp/isp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c
index 8ac2bdcdf..cd10589ed 100644
--- a/drivers/media/platform/ti/omap3isp/isp.c
+++ b/drivers/media/platform/ti/omap3isp/isp.c
@@ -2102,7 +2102,10 @@ static void isp_parse_of_csi1_endpoint(struct device *dev,
buscfg->bus.ccp2.ccp2_mode = vep->bus_type == V4L2_MBUS_CCP2;
buscfg->bus.ccp2.vp_clk_pol = 1;
- buscfg->bus.ccp2.crc = 1;
+ u32 use_crc = 1;
+
+ fwnode_property_read_u32(vep->base.local_fwnode, "crc", &use_crc);
+ buscfg->bus.ccp2.crc = use_crc;
}
static struct {
--
2.51.0