Em Wed, 19 Jul 2017 23:53:30 +0300 Sakari Ailus <sakari.ailus@xxxxxx> escreveu: > On Wed, Jul 19, 2017 at 04:37:51PM -0300, Mauro Carvalho Chehab wrote: > > Em Thu, 6 Jul 2017 02:00:16 +0300 > > Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> escreveu: > > > > > From: Sakari Ailus <sakari.ailus@xxxxxx> > > > > > > CCP2 and CSI-1, are older single data lane serial busses. > > > > > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > > > Signed-off-by: Pavel Machek <pavel@xxxxxx> > > > --- > > > drivers/media/platform/pxa_camera.c | 3 ++ > > > drivers/media/platform/soc_camera/soc_mediabus.c | 3 ++ > > > drivers/media/v4l2-core/v4l2-fwnode.c | 58 +++++++++++++++++++----- > > > include/media/v4l2-fwnode.h | 19 ++++++++ > > > include/media/v4l2-mediabus.h | 4 ++ > > > 5 files changed, 76 insertions(+), 11 deletions(-) > > > > > > diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c > > > index 399095170b6e..17e797c9559f 100644 > > > --- a/drivers/media/platform/pxa_camera.c > > > +++ b/drivers/media/platform/pxa_camera.c > > > @@ -638,6 +638,9 @@ static unsigned int pxa_mbus_config_compatible(const struct v4l2_mbus_config *cf > > > mipi_clock = common_flags & (V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK | > > > V4L2_MBUS_CSI2_CONTINUOUS_CLOCK); > > > return (!mipi_lanes || !mipi_clock) ? 0 : common_flags; > > > + default: > > > + __WARN(); > > > + return -EINVAL; > > > } > > > return 0; > > > } > > > diff --git a/drivers/media/platform/soc_camera/soc_mediabus.c b/drivers/media/platform/soc_camera/soc_mediabus.c > > > index 57581f626f4c..43192d80beef 100644 > > > --- a/drivers/media/platform/soc_camera/soc_mediabus.c > > > +++ b/drivers/media/platform/soc_camera/soc_mediabus.c > > > @@ -508,6 +508,9 @@ unsigned int soc_mbus_config_compatible(const struct v4l2_mbus_config *cfg, > > > mipi_clock = common_flags & (V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK | > > > V4L2_MBUS_CSI2_CONTINUOUS_CLOCK); > > > return (!mipi_lanes || !mipi_clock) ? 0 : common_flags; > > > + default: > > > + __WARN(); > > > + return -EINVAL; > > > } > > > return 0; > > > } > > > diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c > > > index d71dd3913cd9..76a88f210cb6 100644 > > > --- a/drivers/media/v4l2-core/v4l2-fwnode.c > > > +++ b/drivers/media/v4l2-core/v4l2-fwnode.c > > > @@ -154,6 +154,31 @@ static void v4l2_fwnode_endpoint_parse_parallel_bus( > > > > > > } > > > > > > +void v4l2_fwnode_endpoint_parse_csi1_bus(struct fwnode_handle *fwnode, > > > + struct v4l2_fwnode_endpoint *vep, > > > + u32 bus_type) > > > +{ > > > + struct v4l2_fwnode_bus_mipi_csi1 *bus = &vep->bus.mipi_csi1; > > > + u32 v; > > > + > > > + if (!fwnode_property_read_u32(fwnode, "clock-inv", &v)) > > > + bus->clock_inv = v; > > > + > > > + if (!fwnode_property_read_u32(fwnode, "strobe", &v)) > > > + bus->strobe = v; > > > + > > > + if (!fwnode_property_read_u32(fwnode, "data-lanes", &v)) > > > + bus->data_lane = v; > > > + > > > + if (!fwnode_property_read_u32(fwnode, "clock-lanes", &v)) > > > + bus->clock_lane = v; > > > + > > > + if (bus_type == V4L2_FWNODE_BUS_TYPE_CCP2) > > > + vep->bus_type = V4L2_MBUS_CCP2; > > > + else > > > + vep->bus_type = V4L2_MBUS_CSI1; > > > +} > > > + > > > > This function is indented with whitespaces! Next time, please check with > > checkpatch. > > > > I fixed when merging it upstream. > > Well, what can I say? > > Apologies for the collateral damage, and thanks! :-) Nevermind. From time to time, I end fixing small things like this while merging ;) I suspect that you cut and paste this function from some other place, as all lines inside it started with 7 spaces... Regards, Mauro