diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2015-02-25 14:51:01 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-07-19 15:31:45 -0400 |
commit | e07a41f985898b9dae97c99bbb5d3d415b9ecd6c (patch) | |
tree | f5a16bf73083f3681bdef0398a8e4665a07525a8 | |
parent | f3112735ebe4f097142da0ad02fca1fc82a50f02 (diff) | |
download | linux-stable-e07a41f985898b9dae97c99bbb5d3d415b9ecd6c.tar.gz linux-stable-e07a41f985898b9dae97c99bbb5d3d415b9ecd6c.tar.bz2 linux-stable-e07a41f985898b9dae97c99bbb5d3d415b9ecd6c.zip |
media: v4l: fwnode: Obtain data bus type from FW
Just obtain it. It'll actually get used soon with CSI-1/CCP2.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-fwnode.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 8df26010d006..d71dd3913cd9 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -28,6 +28,14 @@ #include <media/v4l2-fwnode.h> +enum v4l2_fwnode_bus_type { + V4L2_FWNODE_BUS_TYPE_GUESS = 0, + V4L2_FWNODE_BUS_TYPE_CSI2_CPHY, + V4L2_FWNODE_BUS_TYPE_CSI1, + V4L2_FWNODE_BUS_TYPE_CCP2, + NR_OF_V4L2_FWNODE_BUS_TYPE, +}; + static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep) { @@ -168,6 +176,7 @@ static void v4l2_fwnode_endpoint_parse_parallel_bus( int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode, struct v4l2_fwnode_endpoint *vep) { + u32 bus_type = 0; int rval; fwnode_graph_parse_endpoint(fwnode, &vep->base); @@ -176,6 +185,8 @@ int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode, memset(&vep->bus_type, 0, sizeof(*vep) - offsetof(typeof(*vep), bus_type)); + fwnode_property_read_u32(fwnode, "bus-type", &bus_type); + rval = v4l2_fwnode_endpoint_parse_csi2_bus(fwnode, vep); if (rval) return rval; |