From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:56312 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388132AbeGWOs2 (ORCPT ); Mon, 23 Jul 2018 10:48:28 -0400 From: Sakari Ailus To: linux-media@vger.kernel.org Cc: devicetree@vger.kernel.org, slongerbeam@gmail.com, niklas.soderlund@ragnatech.se Subject: [PATCH 04/21] v4l: fwnode: The CSI-2 clock is continuous if it's not non-continuous Date: Mon, 23 Jul 2018 16:46:49 +0300 Message-Id: <20180723134706.15334-5-sakari.ailus@linux.intel.com> In-Reply-To: <20180723134706.15334-1-sakari.ailus@linux.intel.com> References: <20180723134706.15334-1-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org List-ID: The continuous clock flag was only set if there was a clock or data lanes. This isn't needed as such a configuration is invalid to begin with. Always set the continuous clock flag if the non-continuous property is not found. Still don't consider the continuous clock flag as an indication that this is CSI-2 as it's set in the absence of the property. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-fwnode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 55214ff5a616..291b3dcc19f3 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -107,11 +107,12 @@ static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode, if (fwnode_property_present(fwnode, "clock-noncontinuous")) { flags |= V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK; pr_debug("non-continuous clock\n"); - } else if (have_clk_lane || bus->num_data_lanes > 0) { + } else { flags |= V4L2_MBUS_CSI2_CONTINUOUS_CLOCK; } - if (lanes_used || have_clk_lane || flags) { + if (lanes_used || have_clk_lane || + (flags & ~V4L2_MBUS_CSI2_CONTINUOUS_CLOCK)) { bus->flags = flags; vep->bus_type = V4L2_MBUS_CSI2; } -- 2.11.0