diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2018-04-16 16:56:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-10-04 16:24:25 -0400 |
commit | 4a2d1dc51bebeab3543c812c83e031a789e08e65 (patch) | |
tree | a8676b3f4be19774c0bb3f6562c87c83054f7295 /drivers/media/i2c | |
parent | 2e6e39324aecd10dbf66819b137a5ee73298b931 (diff) | |
download | linux-stable-4a2d1dc51bebeab3543c812c83e031a789e08e65.tar.gz linux-stable-4a2d1dc51bebeab3543c812c83e031a789e08e65.tar.bz2 linux-stable-4a2d1dc51bebeab3543c812c83e031a789e08e65.zip |
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: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/smiapp/smiapp-core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 2d6059e3a577..58a45c353e27 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -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; |