Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a2d1dc5 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

media: smiapp: Query the V4L2 endpoint for a specific bus type



Instead of opportunistically trying to gather some information from the
V4L2 endpoint, set the bus type and let the V4L2 fwnode framework figure
out the configuration.

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: default avatarSteve Longerbeam <steve_longerbeam@mentor.com>
Tested-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 2e6e3932
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2771,7 +2771,13 @@ static struct smiapp_hwconfig *smiapp_get_hwconfig(struct device *dev)
	if (!ep)
		return NULL;

	bus_cfg.bus_type = V4L2_MBUS_CSI2_DPHY;
	rval = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
	if (rval == -ENXIO) {
		bus_cfg = (struct v4l2_fwnode_endpoint)
			{ .bus_type = V4L2_MBUS_CCP2 };
		rval = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
	}
	if (rval)
		goto out_err;