diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2022-01-03 19:24:11 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-02-17 11:51:23 +0300 |
commit | 6a7bdd89f50d399dd02847e6f398d408b086df50 (patch) | |
tree | 1dede8bfb5a4dce794161fbdcaee21368eb3e180 /drivers/media/i2c/tvp5150.c | |
parent | 44e756fa56e209cfbf694583589f5f3cd97ec67c (diff) | |
download | linux-6a7bdd89f50d399dd02847e6f398d408b086df50.tar.xz |
media: v4l2-mediabus: Use structures to describe bus configuration
The media bus configuration is specified through a set of flags, some of
which being mutually exclusive. This doesn't scale to express more
complex configurations. Improve the API by replacing the single flags
field in v4l2_mbus_config by a union of v4l2_mbus_config_* structures.
The flags themselves are still used in those structures, so they are
kept here. Drivers are however updated to use structure fields instead
of flags when already possible.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c/tvp5150.c')
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 4b16ffcaef98..65472438444b 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1198,8 +1198,10 @@ static int tvp5150_get_mbus_config(struct v4l2_subdev *sd, struct tvp5150 *decoder = to_tvp5150(sd); cfg->type = decoder->mbus_type; - cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_PCLK_SAMPLE_RISING - | V4L2_MBUS_FIELD_EVEN_LOW | V4L2_MBUS_DATA_ACTIVE_HIGH; + cfg->bus.parallel.flags = V4L2_MBUS_MASTER + | V4L2_MBUS_PCLK_SAMPLE_RISING + | V4L2_MBUS_FIELD_EVEN_LOW + | V4L2_MBUS_DATA_ACTIVE_HIGH; return 0; } |