Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1960879rwn; Fri, 9 Sep 2022 06:43:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR6a25j5HB9zDRxlXPB2foOKfQLJdSFQsj8RIX2sYppNoBtXLaIqj1l2aT1nAluDAIhpNv06 X-Received: by 2002:a05:651c:482:b0:26b:e964:3f00 with SMTP id s2-20020a05651c048200b0026be9643f00mr345920ljc.464.1662731007282; Fri, 09 Sep 2022 06:43:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662731007; cv=none; d=google.com; s=arc-20160816; b=Kl9gOEy93GfnL0DIHKUmxh/rKrsa8PPFqvvCIUTylG4YPX24zTsO7n59Gw5+QeS+GN twjek4NdcHvdh8yYPkPbR2C6ARCdm658ZCpI05XKWh4r8VOTw+0WTOI/FBR9WNOmP4ZH bB5t17OqW8TJaiErbogLY6PLkBOxeaKuaWchrC6CBjJTVXTNvsgjeOir9MNv1T2wGff8 O1o9Gk521m73DFJ4NtkDLVrssWXN3IckYFHIdznOa4OJDqpU+wuP9jecL1xQwp/z3lZN xfbI6szHXyCqPzpQ8zBNw+EbKWAIBoGDP5A+9BZEpZGV9Hs7VoVzK7ucgZMkewtNV3rc i4dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wnsPpYWGZuTk1tpyFk296/+SYVaoumCMjKuS00DqX7w=; b=cCwWujKkPoYsuNbXh7QClp+um6CzVJ5TqkYBWEh0w3bq15QFqvSgvD20Y4KHCGprtp ma5bvrIQY03Waa+5PGYJb/7TsIxaCawJktIbaToQnNChtUUSixZiduhlzm2xtk3qJIxc KEL8gPe7EaQ4YhD9EOKSCKy1nodKvnG1l9cZfu3AIwl9qdczi1uSq9K/hKT7Yz9Pb7cl gKitNi+fsm/VrC+NWq1FlGlQig3m1FgCHGDUbNAuywtTJ3YcHgGnePKh1fQCS0GPC33w O2gvpvqg/D0lQmHFV8QOQIXPVbND8OBI+p9OoHLnSfwrXDDclVAW3h1P8zytiUwO6jNz bePg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gpmwwK+J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a0565123f9200b00498f2fa1d68si253579lfa.148.2022.09.09.06.42.57; Fri, 09 Sep 2022 06:43:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gpmwwK+J; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231488AbiIINlW (ORCPT + 99 others); Fri, 9 Sep 2022 09:41:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbiIINkn (ORCPT ); Fri, 9 Sep 2022 09:40:43 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 407207E828; Fri, 9 Sep 2022 06:40:32 -0700 (PDT) Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 2C18F1C0010; Fri, 9 Sep 2022 13:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1662730831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wnsPpYWGZuTk1tpyFk296/+SYVaoumCMjKuS00DqX7w=; b=gpmwwK+JKNadGBF56nUYxyD0cs9NIIXnD4P+WuEi8JtDfqzW/QDPy3cCS7v68WOKXPtqM8 pa3cRg3L5ss2Sj+YgwFeefyn6JUyXuSeWg0HCdjp4AsrHTxL18ucm4IsbChm1MRp9n54BB dm/zLMqP0kj33LAiUJBXV1p8XkkRpHpQlBG9YSojyugEHU9kYtaHYlCMTJQSOqBPWq9cht CBna6stCsAVPjpxDprIXpGe1EA+cPxRr22+sI3imsmcaJfuj3vAYvgaPBeYKa1UBvE9MWt dpfXNyjopsaarQBCBIRzkWOyXAe2IpEY7OvIEQoVCOrMCMGIaLuH/14QOh/AbA== From: Paul Kocialkowski To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Hans Verkuil , Maxime Ripard , Thomas Petazzoni , Laurent Pinchart Subject: [PATCH 2/4] media: sun8i-a83t-mipi-csi2: Require both pads to be connected for streaming Date: Fri, 9 Sep 2022 15:39:52 +0200 Message-Id: <20220909133954.97010-3-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220909133954.97010-1-paul.kocialkowski@bootlin.com> References: <20220909133954.97010-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The bridge needs both its pads connected to be able to stream data. Enforcing this is useful to produce an error when no sensor is connected. Fixes: 576d196c522b ("media: sunxi: Add support for the A83T MIPI CSI-2 controller") Signed-off-by: Paul Kocialkowski --- .../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c index b032ec13a683..5e1c25db7bc4 100644 --- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c +++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c @@ -557,8 +557,10 @@ sun8i_a83t_mipi_csi2_bridge_setup(struct sun8i_a83t_mipi_csi2_device *csi2_dev) /* Media Pads */ - pads[SUN8I_A83T_MIPI_CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK; - pads[SUN8I_A83T_MIPI_CSI2_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE; + pads[SUN8I_A83T_MIPI_CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK | + MEDIA_PAD_FL_MUST_CONNECT; + pads[SUN8I_A83T_MIPI_CSI2_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE | + MEDIA_PAD_FL_MUST_CONNECT; ret = media_entity_pads_init(&subdev->entity, SUN8I_A83T_MIPI_CSI2_PAD_COUNT, pads); -- 2.37.3