From patchwork Mon Jul 31 13:24:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 128700 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2029906vqg; Mon, 31 Jul 2023 06:55:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqxv2qQVnEMZ9ELdYmacsCJd6eR5KdIf++jQiknTa5Y70vErOqdaWpOIZvGj3pLTZjawvF X-Received: by 2002:a17:906:319b:b0:99b:c35a:8865 with SMTP id 27-20020a170906319b00b0099bc35a8865mr7298359ejy.1.1690811725037; Mon, 31 Jul 2023 06:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690811725; cv=none; d=google.com; s=arc-20160816; b=cic7wOR08WyRn7uKPTuRff/4RqIQNFtuSm+1lA21x26frjqNikvkMRBgcBs3MZ7y/U c25HpmbxKP/QR5cLSBxu7hXsL2RAzgp/+xHHlTVZbTn1iW5IV0CoVtSsQBdb+sPP3bQC CfB56IFJXQUlfaZmSiOuzTGibkVOHx7FyPEem1h2IzupCVVKuvoe9y8Jmm9fniPkdnzq oQY35x8HIfJ99+l0FlXCHCw0Z6r3THuPukc/Bh93f8Jdmu7J6AhfZ71jfLJfw2phPda8 RCUJhX5y+ecydSd92S1q29Q5AtNzScNWS7uDm7JvavHj17AgYskKY1MF+TWLlOMNwyRb 5VNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=0NlLC6DdOpTTuE6J0emuXBGXEucZ+FuaMeF+7beA2X8=; fh=cL8V8cgQpxlbGU1a/BFb9J43s+fdNyaB+cfzJFyBZIE=; b=wczKUSrD4x70a6abe4YakneE8payRHasFd6q0EC7EkzwafrJDh9Ty4N3EXTgQxRx9E VLpANT+6D1Hn/W5y5ik9oLMnGy1KHTGXV8x4ncpkTOF2l/Lyx0KBsoibkEA893WL2DOz ptgfKon1/q+gmAFGi5rRNaDT22ekBA3cKd18Tq3lIyl0sMByL+NCUzbocB3jc7CqNBfC YLR4tJWvFauIftoSBpAeUZBApzhYUGYgLhtfxZABEtXCXZBdgqnPi1DK0R/oViSJEMHA +K4MZucS4iro+t1vtZYx6/hXVEch2NZg7SAtfUqIT4PXQb3jB/Zr4ZeHoEF3DrPXg9/5 CfUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=uj97Fj0A; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p26-20020a17090635da00b0098e1627c0e4si3529299ejb.777.2023.07.31.06.55.00; Mon, 31 Jul 2023 06:55:25 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=uj97Fj0A; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232939AbjGaNZb (ORCPT + 99 others); Mon, 31 Jul 2023 09:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230256AbjGaNZ1 (ORCPT ); Mon, 31 Jul 2023 09:25:27 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA43210F2; Mon, 31 Jul 2023 06:25:24 -0700 (PDT) Received: from [127.0.1.1] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 81B99E79; Mon, 31 Jul 2023 15:24:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1690809861; bh=CWOBqaJNAdPeoqe+d1O2pTibjSWEKIHUROFn5FDzjlc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uj97Fj0AquY7+dycLBMnUIAsyW/KYOWHfetX+nhMWQVVVcsfbjN+6DcJzGpv/+EF3 dss5/WoW6JJLi7Iu8oeX7pcMEMRJT3hWwi8XYNUqNdpCD7gRMnPOrs1glp9f5sq0qP IIi2DT00KTxCg5Q0AOK2Xe81Vm0mxg/cXphVGH30= From: Tomi Valkeinen Date: Mon, 31 Jul 2023 16:24:35 +0300 Subject: [PATCH v3 1/9] media: i2c: ds90ub9x3: Fix sub-device matching MIME-Version: 1.0 Message-Id: <20230731-fpdlink-additions-v3-1-8acfc49c215a@ideasonboard.com> References: <20230731-fpdlink-additions-v3-0-8acfc49c215a@ideasonboard.com> In-Reply-To: <20230731-fpdlink-additions-v3-0-8acfc49c215a@ideasonboard.com> To: Mauro Carvalho Chehab , Luca Ceresoli , Andy Shevchenko , Laurent Pinchart , Sakari Ailus , Hans Verkuil , Satish Nagireddy , Matti Vaittinen Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2787; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=CWOBqaJNAdPeoqe+d1O2pTibjSWEKIHUROFn5FDzjlc=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBkx7Y+TUX873kNfc2kqlxacUFaCJCdj0rl0gcBx +XPewlcZkuJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZMe2PgAKCRD6PaqMvJYe 9XmdD/4505K8ecg5yJrvfd8RMFYwdHnvVGDzcBoWm3hXxKtBSZpBYAx5oSEh6AqAUFiq0NDWClh K52xiBqaZaQpUEiNazezljNI/sGcuezkaPPG449gesylTdCv/soXgLBW5POM3bj017D1lyzdLk8 X33fy1Z7j/fVqYntfHwtcV26IulJlo4n9HeOc5i/8RmlBdqX7oK0Voy+3KuAmJ22qmcaV0AlS03 o1XBlULGtvMxARv092nyHLIiduYyQUocQbfrqIrOLYslan5Us9ofmJMKt+q3IDTh3Yr6bG5/hXT xkR5AOI/sUQVd/IdwtvKZZis6YVbi9zeqqvwdyT9nihll5rUZfX2yTyOxYuOQPf2l2KLFjNG9QU dlg65B8UyknkzlU7/YDOh+j6raHl/acxJEihh17T3upXuGGd8xc746NQOSYTAwvSsoMuv61XJZx VT1bN4+0OTOIXIV6nypyAmPmDu3eGpG/obMUZJR0BLKKDVm16uSeSB+ldnUTp2VBh3LmGeIs4Gt P/Hq1j5OpLaXnciQQ8JV4n/xf4wDP8r4EkeE+I8ArYj6cx6f5EaMTfjwmoVX9XpD16fGQTliqGE eeYiBLjq6fFcZ9H+pjac5yHblinte7WJxqQQ64IfyzKkpN4t4j9P5Ipzqeg+q7SqXVpd/+pSkhp 7LFOfw0d6rSSZqQ== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772944595669223831 X-GMAIL-MSGID: 1772944595669223831 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching") recently changed how async sub-device matching works. This breaks the UB9x3 drivers, as they set the subdev.fwnode to an endpoint. Afaiu, the fix is simply to not set subdev.fwnode at all. Fixes: 1029939b3782 ("media: v4l: async: Simplify async sub-device fwnode matching") Signed-off-by: Tomi Valkeinen Cc: Sakari Ailus --- drivers/media/i2c/ds90ub913.c | 14 +------------- drivers/media/i2c/ds90ub953.c | 13 +------------ 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/drivers/media/i2c/ds90ub913.c b/drivers/media/i2c/ds90ub913.c index 80d9cf6dd945..5410ccb54057 100644 --- a/drivers/media/i2c/ds90ub913.c +++ b/drivers/media/i2c/ds90ub913.c @@ -749,19 +749,9 @@ static int ub913_subdev_init(struct ub913_data *priv) if (ret) return dev_err_probe(dev, ret, "Failed to init pads\n"); - priv->sd.fwnode = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), - UB913_PAD_SOURCE, 0, - 0); - - if (!priv->sd.fwnode) { - ret = -ENODEV; - dev_err_probe(dev, ret, "Missing TX endpoint\n"); - goto err_entity_cleanup; - } - ret = v4l2_subdev_init_finalize(&priv->sd); if (ret) - goto err_fwnode_put; + goto err_entity_cleanup; ret = ub913_v4l2_notifier_register(priv); if (ret) { @@ -782,8 +772,6 @@ static int ub913_subdev_init(struct ub913_data *priv) ub913_v4l2_nf_unregister(priv); err_subdev_cleanup: v4l2_subdev_cleanup(&priv->sd); -err_fwnode_put: - fwnode_handle_put(priv->sd.fwnode); err_entity_cleanup: media_entity_cleanup(&priv->sd.entity); diff --git a/drivers/media/i2c/ds90ub953.c b/drivers/media/i2c/ds90ub953.c index cadf75eb0773..20b9cf893f74 100644 --- a/drivers/media/i2c/ds90ub953.c +++ b/drivers/media/i2c/ds90ub953.c @@ -1221,18 +1221,9 @@ static int ub953_subdev_init(struct ub953_data *priv) if (ret) return dev_err_probe(dev, ret, "Failed to init pads\n"); - priv->sd.fwnode = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), - UB953_PAD_SOURCE, 0, - 0); - if (!priv->sd.fwnode) { - ret = -ENODEV; - dev_err_probe(dev, ret, "Missing TX endpoint\n"); - goto err_entity_cleanup; - } - ret = v4l2_subdev_init_finalize(&priv->sd); if (ret) - goto err_fwnode_put; + goto err_entity_cleanup; ret = ub953_v4l2_notifier_register(priv); if (ret) { @@ -1253,8 +1244,6 @@ static int ub953_subdev_init(struct ub953_data *priv) ub953_v4l2_notifier_unregister(priv); err_free_state: v4l2_subdev_cleanup(&priv->sd); -err_fwnode_put: - fwnode_handle_put(priv->sd.fwnode); err_entity_cleanup: media_entity_cleanup(&priv->sd.entity);