From patchwork Wed Oct 26 13:06:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020566 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E72BEC38A2D for ; Wed, 26 Oct 2022 13:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MhbVGeJ013lL8FEpZB2uKYkFsUbZs3U6+2xi1mZ/bA8=; b=aO9smHv5f0vyls PhzQs4cVHRlnkUyTB+CalEfYHjvcEQqgoG3SyCwwKwNjcDWscQp7J5Jf1J9x2AD3Q4x0hAoqdFLaP XfemA7M0hQQf6Jpre9UVdHzE9pRZibpYVp0w4dQ4VYsPri6Cpsd5/vH+FQz/6tKsf6k0aUWFdcwsi KocL4rGEAof30iOn5qCXyzlcOSYpMfeVfBzgBqWAQ8SoySJn4iXhp9sX47/gIiDQL+dtV0xZ0IPWY Zih5+nefWoDIzVOmUxKM6cpB3Y++YQBkA8zboPP6HH/e93eCCQRwzVt5ABgjoBzcip+mDfBhclUXW Kmp6PbWi5DPL8GTL2tBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong8C-009NWt-8t; Wed, 26 Oct 2022 13:07:40 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7r-009NKe-5x for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:26 +0000 Received: by mail-wr1-x431.google.com with SMTP id j15so15712341wrq.3 for ; Wed, 26 Oct 2022 06:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nyVNISqKQi9jXd38wQpw8MDXfXd5f1BICV0pIG254pc=; b=U/tL7gRoPuAUkGJ6rjM8DuHdAsQkYwzQ6cXMYcI1bN3yzkj4m7DrrkVuRNujMOWmP6 cky4BTcDrY4w8N7ExDcfz4pdyc+/ir9rcUZUPfkW3atK5e2/NxqksC4tuVG5ylJ5DNSm Vg+W7KPYaPLk3oYsp8/+T34ReQ/w4itM5E9PQ+lVLArhrF58+g2QsMSsGwIKFTpzJe7W CR1kMgtPLTLanukzhavxHsRAexhFCOPruKYxK8f351dO0Boqjm9MUCZuVsUAeXQ71N6k G8+4gwGSKDlEM+m4Nonjj647CRiJzGW+x3wWq6FYln4NSQtZ8c6lKZVlMGXdAb2dE1sS Yd1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nyVNISqKQi9jXd38wQpw8MDXfXd5f1BICV0pIG254pc=; b=1MhFPhdply38BFGjDEs9iz11wj4DXvxsMRO9flSOskZa1z+1ZHqPtVxRdpIKsc6Pbn SuInK0ygojcEvzKTifCj26fwn1coHap0cyBavWi2rss8XZ65Ow+ldJoKInmYvMR4153u PqmXc/Rj63q3cKmgMhCi49k5jNLqvKsvVBi8A7jpBSjL00B17xdITj4lh2ixLKTSH1E5 itTE4v3ocuEz6cJ6BUTdkdov3B4cKeAJtJEGNZ/3dYiTL0IunqyKoBpWDnsLodL9bO/I fIt2LgcVrGxXe4opOKlcaZAmv3GyLb3nnMzSVvtveYPXJJNsyg8zSniiTUk+V4owvL3q MB2w== X-Gm-Message-State: ACrzQf3MriIFg877dxKFhOAuOLfADCqO0PJrli8aZ7/x6AmaFsbVJC6c R5Y/iDfD/sHcbA6Ch8d3GeA= X-Google-Smtp-Source: AMsMyM6dkyokXKAuIfga7S2q7xmvYNtJBmrXeJK+/bn7qRQKvEt6c1fmeUaVN2JXqblEZTrTjUdFlQ== X-Received: by 2002:adf:e785:0:b0:236:5998:67a0 with SMTP id n5-20020adfe785000000b00236599867a0mr17412045wrm.414.1666789636745; Wed, 26 Oct 2022 06:07:16 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:16 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar , Laurent Pinchart Subject: [PATCH v3 1/9] media: i2c: ov5645: Drop fetching the clk reference by name Date: Wed, 26 Oct 2022 14:06:50 +0100 Message-Id: <20221026130658.45601-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060719_247164_9A24B371 X-CRM114-Status: GOOD ( 13.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar The OV5645 sensor has a single clock source, so just drop fetching the clk reference by name. This is in preparation to drop the "clock-names" property from the DT binding. Suggested-by: Laurent Pinchart Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart --- v1->v3 * No change v1: https://patchwork.kernel.org/project/linux-media/patch/20220919143350.176746-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ --- drivers/media/i2c/ov5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 81e4e87e1821..47451238ca05 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1090,7 +1090,7 @@ static int ov5645_probe(struct i2c_client *client) } /* get system clock (xclk) */ - ov5645->xclk = devm_clk_get(dev, "xclk"); + ov5645->xclk = devm_clk_get(dev, NULL); if (IS_ERR(ov5645->xclk)) { dev_err(dev, "could not get xclk"); return PTR_ERR(ov5645->xclk); From patchwork Wed Oct 26 13:06:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020567 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04C15C433FE for ; Wed, 26 Oct 2022 13:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wdgxm603LrP7BY5OOp3xCDyIqeiMTaiFQfRNU+PVuX4=; b=YdjTUbK+dIpk+1 S+O7iePZk4ovPRJ1RqcrqxkK9iLu6rHu55aA6I+/OefniqHNU06uyj909fqj9fBHfqsRm0sKCF2GC +HNV0A2T4bsIRJV4QVFKoGeRTmGKcNHcleL0oWGbat43d5pDnNRJavBzpw/iuZEsunpjQKWZ336Qc GkjuaWj8T00GxjH1Xf4oTXf8m6Uh5kSwYrUaTctv90MkpG3PXdMr8XGKHdrdclAHtGwxJDkcVI5v+ NqIovaIjzuBm4iXV8j0G0Qcneobygh/qdb1pQ61t5YGNUkTuWDeBxiTm/z/1a5JWxXVKEQrh8wlbN ZIWqqrGmGvoHMiwPR92g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong8L-009NZG-QU; Wed, 26 Oct 2022 13:07:50 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7u-009NLA-4I for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:27 +0000 Received: by mail-wm1-x333.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so1535113wmb.0 for ; Wed, 26 Oct 2022 06:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tf2UiB+zU3vDS2ZGfH6hKqDtwI6lpc4PY4He6vWYvz4=; b=aIxFQBtFoxypKmy5lP8Nk86z3bdDwR6XHd2uN35GLGvO4nMZmd2FErn67JwqbYpBWt +w/SOEytlOjUuruWyuUDKeVuPM/jN8PTP/9ZEg2L4iQGNe5RFifhUuM/B0PVNdYTa3aB RCuaRApl4YUM/Wh3oKFZ1ISx8D3j28ak+R9j1oXvWD/t3r7q4bg1r33D4LRyAXhS2f7O +Uu7eiwFTfBGK4z9rWApu8K8EQRNonxcVptAougeAOE+8JnGOnQVING/umzElmbhFOe3 xd2LrVB6wGxKCQ+OsP2QZ0gWCmePRIiaVFD181HMrWF9GloQ/YnJh/rzXHGkuJJ9FOJp PCsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tf2UiB+zU3vDS2ZGfH6hKqDtwI6lpc4PY4He6vWYvz4=; b=c+n849mN//a7NgNyl/IV3hvxQC4FMsSuZ8VnSHVjtgqxl9XOyrVnCsyDZiCGrnf3Y+ 7nub33/zcPG79rfnP6Za8KRVifQz4158caIIDqCpKaW9EhMzus5vbF3NVPpldrCZO/bx spebdKJ1K4v/DNR2VFZUxP1lbQEmum8aFoZf6czbW1wHuR9BVE5ZeGTeop5pyoyvNo3z llPw9YElNGkFuR1XxRhEiud6IeAfuEyP/2pTspU8ie3mgOsdwawg8ptsRPA16bzfejRN G/uetGKujAgCH5ZJ/CHi4CIHxZlQIl9TgSy6mfKTuHaJOSJweAIqY4jDEbxT6WgmS516 VWvA== X-Gm-Message-State: ACrzQf2LEZIeFUnokk7dRUZ0s3qR5J+haVJgR1dUoiLqYHxsHS2IvzP4 pJED9FmwiZS+i/Pu6l7CvWA= X-Google-Smtp-Source: AMsMyM6nJq7LNPFc/VDVJBW42THSzVzYdGTV/smjB+OZhSvemg+8pvORx1sIduEukfTnMxeR5SiCpw== X-Received: by 2002:a05:600c:3548:b0:3c6:f7cb:1567 with SMTP id i8-20020a05600c354800b003c6f7cb1567mr2370839wmq.161.1666789638051; Wed, 26 Oct 2022 06:07:18 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:17 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 2/9] ARM: dts: imx6qdl-pico: Drop clock-names property Date: Wed, 26 Oct 2022 14:06:51 +0100 Message-Id: <20221026130658.45601-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060722_174571_7ED0743D X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Now that the driver has been updated to drop fetching the clk reference by name we no longer need the clock-names property in the ov5645 sensor node. This is in preparation for removal for clock-names property from the DT binding. Signed-off-by: Lad Prabhakar --- v3 * New patch --- arch/arm/boot/dts/imx6qdl-pico.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6qdl-pico.dtsi b/arch/arm/boot/dts/imx6qdl-pico.dtsi index f7a56d6b160c..c39a9ebdaba1 100644 --- a/arch/arm/boot/dts/imx6qdl-pico.dtsi +++ b/arch/arm/boot/dts/imx6qdl-pico.dtsi @@ -233,7 +233,6 @@ camera@3c { pinctrl-0 = <&pinctrl_ov5645>; reg = <0x3c>; clocks = <&clks IMX6QDL_CLK_CKO2>; - clock-names = "xclk"; clock-frequency = <24000000>; vdddo-supply = <®_1p8v>; vdda-supply = <®_2p8v>; From patchwork Wed Oct 26 13:06:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 05480C433FE for ; Wed, 26 Oct 2022 13:09:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ni+b+NG+j1lOWG8SC0t9kuT4R0IGPjGy6Ra71v+nnKA=; b=sFpVDIA+XMILRi o9VYU/qN+8f489RdtLgGCYOi9YFrC6pXGFZpb5n3HvQ08aCPdXburwRTUYzGC13MQgUs3Y/eKmFvt /zCUNrhjz1ZpLfPqvwPHefsJWbr/HX/0mVzL4tNF4vf+XoWqn51JQl7N7HDBfnPatDojO4McEHLdJ Ecxre/S2MDl830QzoGnRyxNAUmyQHYprko/Nb3KlOqdTTy//bf4YkArLm3dp2JQKsBcidwWTdvqGt gjuNJrUi5wPOaKW8wIjczXZd7+JoexCKi7/ZlQiO45pAbWLWZEpL4e7azIEFvdeevmrEaQZkhfeb0 tp409dNEdsdoWh7BwdPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong8j-009Ngz-8T; Wed, 26 Oct 2022 13:08:13 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7w-009NLv-08 for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:29 +0000 Received: by mail-wm1-x332.google.com with SMTP id bh7-20020a05600c3d0700b003c6fb3b2052so1507352wmb.2 for ; Wed, 26 Oct 2022 06:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SIVy3GeRA5OkZZu6xDvDHdm1GOthqotFd5U/fgk56CY=; b=PC0PsXNpaGDc04Hd6MeOzRXUfr7dc58xEoLjm25RZbla2XenW7dqPyzgi4Ybnnr6PB Y7sQA9NPE9i+gORdw2J7k3jx1VIG8uBbhJzMFxLM0sJP5b2yu9C4T8iux39YOJgLAAzg 7S2TA1vaSGvXt2nyD4qDUO0qiyRKvyVMOoQyucHEQIaKMmd94+ocFfAIwrY4P88CAkis qpawzaU+7sYnMSCHJj4xNV0DftzA8w7jSZtCw+V+RuWKylc2ERdre6pYkyhhUoszd3ju 1lNDoq13+5THiZSh2N/hAlSBPqxEnH+rdseCpYVQt/j4P/Muld2eHZ29QMl519j2y5cx GgAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SIVy3GeRA5OkZZu6xDvDHdm1GOthqotFd5U/fgk56CY=; b=778JxutE42Yab2agc27hiwShUpuS4qClurawdaZt6L120GSjWZ6y//zRnos1ENPNeR wZh4KIrwLc0ceG7CEqSBY8PWWJYI/773Xpsob3gT4+EsmYSZkB/u2ES0eFwvBqnJkhby JfkJFlol7JTs3/Gx8CedqYSyvhym0zHMxWlS90FOyUT/Itxr9MYcBjroaS+YUsALUOv/ /qmOrXAmY1QBqXXRQxOa0aIYtDEky2295Pp+OJRB8F90jtHRHwP5yzVfcnV+7VKeO5Td YncAODXhaPXpoUCKm/X58HZhS7Em8QdDj841vddijW0LBBmodbhF7Vi/S+zi99vPO3cM b2ZA== X-Gm-Message-State: ACrzQf1nUj03CGPd9OijYAZB2hTc2tmCrsvdBdEYNdWwCdMty2qdXq+U QL1lKtROTqsufqnr32how9c= X-Google-Smtp-Source: AMsMyM6BXVgmVVcTF7eixvSAbS1wL0OVZiVY3Q/JhtfJEZVGiXULG1OOLs18zbfllXGuFtCIDsZHKg== X-Received: by 2002:a05:600c:154a:b0:3c9:f0df:1cc with SMTP id f10-20020a05600c154a00b003c9f0df01ccmr2417925wmg.200.1666789639448; Wed, 26 Oct 2022 06:07:19 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:18 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 3/9] ARM: dts: imx6qdl-wandboard: Drop clock-names property Date: Wed, 26 Oct 2022 14:06:52 +0100 Message-Id: <20221026130658.45601-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060724_081273_F132B500 X-CRM114-Status: GOOD ( 13.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Now that the driver has been updated to drop fetching the clk reference by name we no longer need the clock-names property in the ov5645 sensor node. This is in preparation for removal for clock-names property from the DT binding. Signed-off-by: Lad Prabhakar --- v3 * New patch --- arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi index ec6fba5ee8fd..e4f63423d8ee 100644 --- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi +++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi @@ -131,7 +131,6 @@ camera@3c { pinctrl-0 = <&pinctrl_ov5645>; reg = <0x3c>; clocks = <&clks IMX6QDL_CLK_CKO2>; - clock-names = "xclk"; clock-frequency = <24000000>; vdddo-supply = <®_1p8v>; vdda-supply = <®_2p8v>; From patchwork Wed Oct 26 13:06:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020568 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF54DC433FE for ; Wed, 26 Oct 2022 13:09:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8STDgV88Xlsb/NjFD+3IbOMd4XBsQIGu70GJM1gpHps=; b=zi1m1SKPoJmIH1 mxrVRY2R/D4HITN/Gp2c+b+gC2E8JnfIVTZ6+75De8NBP/jhNMsn9JjT4KM4tT94zvJHQWH2m6kew t3jlsbV17MU6D7Khs37ZEYrKeXGuFXsGqeERoMXeI7aYD2AX0YGIUol1zA/zuGjidvMfXzvz389Ol PG7lfK0OxnGh8h/HwP7xFsUp8muP6tbXKCisww1CaIcVVhatAsYApI+qrF3Ef612Sq9drDRGUfOVS 5SvBiyv9DmYmu68JRl+YPicjm3d1B/JsZWTuSLt5NWsWazQxGFxiSh+zfCCSu8z7wroHLktR/gNvi x2fn620XstoRfPs9ssDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong8V-009NcA-F9; Wed, 26 Oct 2022 13:07:59 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7t-009NME-Ve for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:28 +0000 Received: by mail-wm1-x32a.google.com with SMTP id n14so5904766wmq.3 for ; Wed, 26 Oct 2022 06:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GE9e2apMACasyKGOaqFNr+Yuli9PwHdn/ViP61o5ChA=; b=DzuBSWVlLD7Oq2PImHUCrXgRbDGGp9aYU77BavLFQ3bCrrGI08yyDVWeHV2bS2gDS5 hOwzt8ovcCCRrwSqXCUvkeUJapL5tfr7FjzKiTZfYYXHj2MrGVM7593qH0kodTEUDT25 +J4OIQVXYJBc63ts7t/LtzOPKmx4zRHSRiIyOjnB5VIoNledCy4or+AOj444a/6LyEXt hPY3vXkLIK/DUZvA+aY78X5kHZy4Dca81o7U8lI63zBPteba+6PBo59xjkO+IZvF/40s NZGO9Bd3b8NcKtSi8+OVeX/c63kVVERbll9Mg/a93JP6Zl0FVS397/Q9+UtO4plX+cdl pm/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GE9e2apMACasyKGOaqFNr+Yuli9PwHdn/ViP61o5ChA=; b=BiYMMuCPIHXk4iy157dWKkRBZEga/GAn5ACJavznrsywklq45HNA3afnZBtznSCzYU pXiGYKFK2m1v6uZUFgVlwXdWNc0/kZJx90yPpux9OIcd8k6D2ByzEdBd3NGQx1FwGCeT 9YTumjQgnq1GJQSZNowgi4QwehvESL2Vsb946z2p0cH8tT77EXiQhhU6FC/GuRUYcQAi zr+6ydfqwxMr5TdD4t3pXlt+fdLLZYsx1tPnyq3hcH30LQ3UJ1LKLGJS0OjzPcr+w4xK wqZXDX6alsN0TmeFu3CpSOVMAWxRhQwDWjRHapQ32POWTZVhycg9MHEZ5FhgiJmY3lhG G5LQ== X-Gm-Message-State: ACrzQf2xZRa1mJjvUfIK0t6qeRGDQ/d7TIv+QnMBpxobMhr9JFFanvFL yKNe/RHacnP05mRDf4uc74w= X-Google-Smtp-Source: AMsMyM4Wy+0BYeCpFF6l/kAV/9w1zSxx1LDnrH0dVe7Zmx/8AAQcEx+931gBjxR0/Tk1Xj4ND8ACxg== X-Received: by 2002:a05:600c:46ca:b0:3c6:f3e3:df99 with SMTP id q10-20020a05600c46ca00b003c6f3e3df99mr2409066wmo.77.1666789640706; Wed, 26 Oct 2022 06:07:20 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:20 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 4/9] arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Drop clock-names property Date: Wed, 26 Oct 2022 14:06:53 +0100 Message-Id: <20221026130658.45601-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060722_060779_D0176C49 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Now that the driver has been updated to drop fetching the clk reference by name we no longer need the clock-names property in the ov5645 sensor node. This is in preparation for removal for clock-names property from the DT binding. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven --- v3 * New patch --- arch/arm64/boot/dts/renesas/aistarvision-mipi-adapter-2.1.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/aistarvision-mipi-adapter-2.1.dtsi b/arch/arm64/boot/dts/renesas/aistarvision-mipi-adapter-2.1.dtsi index 7ce986f0a06f..7cb5c958aece 100644 --- a/arch/arm64/boot/dts/renesas/aistarvision-mipi-adapter-2.1.dtsi +++ b/arch/arm64/boot/dts/renesas/aistarvision-mipi-adapter-2.1.dtsi @@ -65,7 +65,6 @@ &MIPI_OV5645_PARENT_I2C { ov5645: ov5645@3c { compatible = "ovti,ov5645"; reg = <0x3c>; - clock-names = "xclk"; clocks = <&osc25250_clk>; clock-frequency = <24000000>; vdddo-supply = <&ov5645_vdddo_1v8>; From patchwork Wed Oct 26 13:06:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D0E3C433FE for ; Wed, 26 Oct 2022 13:10:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=evLvpH46AkHuzKOQhgnI/IK034ewTcnMAw6bX8ujzj8=; b=zT1rPWEGGC/cJl YqD67mOLtvByw1OcO7VdHBiYiTsZgmF0yNxeIP2TT2XDVddp2QtsemDgVEKXWQ49Fp3tO6nZ6TTNn WPitHq1fQ+pAI71qxrlS6PM8B0TEW9TCwTXxG4NTR5vdbbHowi5aTNNlbhJRmSq6k6Tee8URrdDtH rK9yP3o2ne1hWbaYaScaC/hWF3cr4Rn4GnlBOfqGeOf2fF93bk525gxj47h8e3ebbWlNbFzMkWCiO lAsR52jWAAeAZVqezokFTK6KRtH+mt3miTN5tL1E4yAgb+7wQG4K8wPZA4mb5GHjHdnlmWQOG8m/3 XPOTRvnQobLSc0uNIXWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong9d-009O5a-8T; Wed, 26 Oct 2022 13:09:10 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7x-009NN8-Sc for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:33 +0000 Received: by mail-wm1-x32e.google.com with SMTP id r6-20020a1c4406000000b003cf4d389c41so484167wma.3 for ; Wed, 26 Oct 2022 06:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lDixN45FQzRM4eL6eFYAjPKPemRI5INigTEGaTugYlA=; b=onkP9wdppZZacCT6Z9KKGtpAWE+hslCjl6YmzVIV0SCNTZAGYAqabtJiPPq5nVtkBz MmwQ7FtZFJ/uCrJs6mpT7Ow4hYymSAFoVB/L3ZampIybWfuCyYhYc7EhIPjJOXdCMKq9 fo5dCcibav3Rz8BxGsT+FOeJQFkJt8eaU6NuVuLWdOVYKyfo8wmvwI/TZC1QtPeFJ/9B +p7XHwFWg0ml3j/2mF4B3n4PX5XwbrhFQ4iIrKjcKT8YiirHgQ5gMcYYx+cKLzUW5nP1 x2fHhDPNIREUtXh8H9BKvxnzSxkf5hm0MEadc2Segk0KtSUWt1CHfrianxt9vFcA6VSf ACUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lDixN45FQzRM4eL6eFYAjPKPemRI5INigTEGaTugYlA=; b=i/Gt27SWQUc6PtZnFgY2XyZFldH/yHibDyA6ghcGqmf0iyBP0mZyYIwayK3PNsy3Cx 95A+zRhtnXktneJeVefXuwh3PgYld6ZWs3JGRbqtsVSdRxo3AcGSYV6AY5dhzkUqa2Nx ttm06JLv4/Vc2ye08NTEDHTv3pVIRVmHnckFXOTTjbXVWyfmgzTcZCQGarDIyHw9mxtW gqeo3v3DYiz+9CchxrAroS+go8FaRxN5jN/4BHfwNky4mD0nRX64XTmhngMX+PfkWkvU 1j+O+uA88CQQ3zeNx/AewLi5LA9k2zvzzchgkVYLVgiBTA1oTYN3v11BCQOZNRXi59yC Xseg== X-Gm-Message-State: ACrzQf38YfiJh1rEzyKbyz4EFqxXUjdy8vwUxtt6prUIOvz11zPYYxP0 lY7WS5vcnlgBVQUyo8ri+lw= X-Google-Smtp-Source: AMsMyM6u3Ye4gpQjONstdTJ8pbIJLJ8JFwU1jCjEQHFkurGFdJDlBdIiAzEQwwDWp2PlKdE9AGwhNQ== X-Received: by 2002:a05:600c:474a:b0:3c6:ff98:624c with SMTP id w10-20020a05600c474a00b003c6ff98624cmr2450917wmo.26.1666789641895; Wed, 26 Oct 2022 06:07:21 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:21 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 5/9] media: dt-bindings: ov5645: Convert OV5645 binding to a schema Date: Wed, 26 Oct 2022 14:06:54 +0100 Message-Id: <20221026130658.45601-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060725_976380_E4993BBC X-CRM114-Status: GOOD ( 22.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Convert the simple OV5645 Device Tree binding to json-schema. The previous binding marked the below properties as required which was a driver requirement and not the device requirement so just drop them from the required list during the conversion. - clock-frequency - enable-gpios - reset-gpios Also drop the "clock-names" property as we have a single clock source for the sensor and the driver has been updated to drop the clk referencing by name. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart --- Resend v3: * No change v2 -> v3 * Dropped clock-names property * Marked power supplies as mandatory * Dropped the comment for voltage power supplies * Included RB tag from Laurent * Driver change to drop clock-names [0] [0] https://lore.kernel.org/linux-media/Yyh%2F3uzOJOu3drEB@pendragon.ideasonboard.com/T/#t v1 -> v2 * Dropped ref to video-interface-devices.yaml# * Dropped driver specific required items from the list * Updated commit message * Dropped clock-lanes and bus-type from the port and example node * Marked data-lanes as required in port node --- .../devicetree/bindings/media/i2c/ov5645.txt | 54 --------- .../bindings/media/i2c/ovti,ov5645.yaml | 104 ++++++++++++++++++ 2 files changed, 104 insertions(+), 54 deletions(-) delete mode 100644 Documentation/devicetree/bindings/media/i2c/ov5645.txt create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov5645.yaml diff --git a/Documentation/devicetree/bindings/media/i2c/ov5645.txt b/Documentation/devicetree/bindings/media/i2c/ov5645.txt deleted file mode 100644 index 72ad992f77be..000000000000 --- a/Documentation/devicetree/bindings/media/i2c/ov5645.txt +++ /dev/null @@ -1,54 +0,0 @@ -* Omnivision 1/4-Inch 5Mp CMOS Digital Image Sensor - -The Omnivision OV5645 is a 1/4-Inch CMOS active pixel digital image sensor with -an active array size of 2592H x 1944V. It is programmable through a serial I2C -interface. - -Required Properties: -- compatible: Value should be "ovti,ov5645". -- clocks: Reference to the xclk clock. -- clock-names: Should be "xclk". -- clock-frequency: Frequency of the xclk clock. -- enable-gpios: Chip enable GPIO. Polarity is GPIO_ACTIVE_HIGH. This corresponds - to the hardware pin PWDNB which is physically active low. -- reset-gpios: Chip reset GPIO. Polarity is GPIO_ACTIVE_LOW. This corresponds to - the hardware pin RESETB. -- vdddo-supply: Chip digital IO regulator. -- vdda-supply: Chip analog regulator. -- vddd-supply: Chip digital core regulator. - -The device node must contain one 'port' child node for its digital output -video port, in accordance with the video interface bindings defined in -Documentation/devicetree/bindings/media/video-interfaces.txt. - -Example: - - &i2c1 { - ... - - ov5645: ov5645@3c { - compatible = "ovti,ov5645"; - reg = <0x3c>; - - enable-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; - reset-gpios = <&gpio5 20 GPIO_ACTIVE_LOW>; - pinctrl-names = "default"; - pinctrl-0 = <&camera_rear_default>; - - clocks = <&clks 200>; - clock-names = "xclk"; - clock-frequency = <24000000>; - - vdddo-supply = <&camera_dovdd_1v8>; - vdda-supply = <&camera_avdd_2v8>; - vddd-supply = <&camera_dvdd_1v2>; - - port { - ov5645_ep: endpoint { - clock-lanes = <1>; - data-lanes = <0 2>; - remote-endpoint = <&csi0_ep>; - }; - }; - }; - }; diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov5645.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov5645.yaml new file mode 100644 index 000000000000..0b10483cd267 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov5645.yaml @@ -0,0 +1,104 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/i2c/ovti,ov5645.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: OmniVision OV5645 Image Sensor Device Tree Bindings + +maintainers: + - Lad Prabhakar + +properties: + compatible: + const: ovti,ov5645 + + reg: + maxItems: 1 + + clocks: + description: XCLK Input Clock + + clock-frequency: + description: Frequency of the xclk clock in Hz. + + vdda-supply: + description: Analog voltage supply, 2.8 volts + + vddd-supply: + description: Digital core voltage supply, 1.5 volts + + vdddo-supply: + description: Digital I/O voltage supply, 1.8 volts + + enable-gpios: + maxItems: 1 + description: + Reference to the GPIO connected to the PWDNB pin, if any. + + reset-gpios: + maxItems: 1 + description: + Reference to the GPIO connected to the RESETB pin, if any. + + port: + description: Digital Output Port + $ref: /schemas/graph.yaml#/$defs/port-base + additionalProperties: false + + properties: + endpoint: + $ref: /schemas/media/video-interfaces.yaml# + unevaluatedProperties: false + + properties: + data-lanes: + minItems: 1 + maxItems: 2 + items: + enum: [1, 2] + + required: + - data-lanes + +required: + - compatible + - reg + - clocks + - vdddo-supply + - vdda-supply + - vddd-supply + - port + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + camera@3c { + compatible = "ovti,ov5645"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5645>; + reg = <0x3c>; + clocks = <&clks 1>; + clock-frequency = <24000000>; + vdddo-supply = <&ov5645_vdddo_1v8>; + vdda-supply = <&ov5645_vdda_2v8>; + vddd-supply = <&ov5645_vddd_1v5>; + enable-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; + + port { + ov5645_ep: endpoint { + remote-endpoint = <&csi0_ep>; + data-lanes = <1 2>; + }; + }; + }; + }; +... From patchwork Wed Oct 26 13:06:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E423EC38A2D for ; Wed, 26 Oct 2022 13:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5ncq5BmUUxzLsGwwaoU9xhKchb5Yqkt5m2lZ/gESsxA=; b=tcGziP8k0W2fZK MRE/esXk3HINQqrdltCoO+Z6fCIL1Eiy6hlrh+GfGEavMNrJB/OKrxXlsq8FhEcw2NyhmY7SCt7PB /TKm3bVFoRqSsForiyqBlxZohUM0MEefxSRGikBvGH3RENS8GhP/KFq1WEkm1MFUW9GeDRkihiMMu JA7oewqHsIyFRv0a1TFQhQ73iWLLApMkWKvrJU2WTw/9UhEZAwOrzF0vCtGlP+8a8hfwyjr/mcPMF C4vVAIE6cKhZxaGvUvJBEYoDKrTL+eEEylm1yzoK9VJJJ1cszsJfpmPpy+jGzo42C9U+8zBRqe8RX eqxj3vrkrk2qBU4ra5DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong9A-009NsS-Uk; Wed, 26 Oct 2022 13:08:41 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7w-009NNU-Cj for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:32 +0000 Received: by mail-wm1-x332.google.com with SMTP id n14so5904849wmq.3 for ; Wed, 26 Oct 2022 06:07:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CwvKLKSqMthyzzSWLO4mWRJEjUUkvsBl0HFYEMFrtl0=; b=Lux9WNWaO3jnUVWbhgyhcrkig3UpivW3J9wVcoltiaG/W6o1IYnIXW64vq+K5iK/Ug lpcxSN0mKNVkBOPBR4mQ7R8j1C9PFHpxcPaMhSPvlGneg6qH4RYkmRqAYiqqOWbjWBXV tDOPasbvF3kqD56iR7g3lLgiD0V4U3lRN8QOWYZfKS0tsRH8+Y4VL3dVoB0u5/X5l0e2 wsMqfwsduBi42yKR1tP3lvXwV/enznejPV/kvfC3Ad6toweGDBIzGA9yJqAu5lZ3zG9w Gr7LsiHQ8CcNDXnG0uXR9S0jzsAxRrZtLjuMX4JU76DWuhrZuptzO6Zcw1JfCvyC7+xo e02w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CwvKLKSqMthyzzSWLO4mWRJEjUUkvsBl0HFYEMFrtl0=; b=vQOlAu9bBDZI/d/+jOpHhyc8ykMJuleEeae72l3hPCBrrLDf1KiCfNv/mfIwHjYWsy doWqd559Yz2B0zS78EHXs7ZKGUu5bPG4iCSdlLxw1XGbKX17t09BdpVT2lAaS25L1MtJ cHxLlK2Qf8+7lT+CR9zzU1Ipjtoduo2SbQvW8pl9RcBkpi4EHSkiYWXhUWzm9Jtdthg4 EGp9in5REVefFUetWQvrbYZFhmMBIhiSkd/RA15YZFSh3WfZ4S4X2qWJ+FROfVc1hAKJ jyIhq5VUUXRfrOpmgtAsNsf5duYn6OqXSa+XaDZbZYMasT9uNUPH+i5oL9EUZ8OLjvGU Vrjw== X-Gm-Message-State: ACrzQf2/XHcuU2h/c5ugPC3KJGbqvVaxAjpx8X6aG28Oq+nuCIhSeXzr lVJ6lyTo9UL9o8xeSzCvJk8= X-Google-Smtp-Source: AMsMyM7ABNHOTdbIJgsES00b8S9pBsZ9IQRs992cklo3xcmKPbAQViEsmxyeW42rtTbihUPLW9nYPQ== X-Received: by 2002:a05:600c:6019:b0:3c6:e21e:4e9d with SMTP id az25-20020a05600c601900b003c6e21e4e9dmr2439315wmb.53.1666789643160; Wed, 26 Oct 2022 06:07:23 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:22 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 6/9] media: i2c: ov5645: Use runtime PM Date: Wed, 26 Oct 2022 14:06:55 +0100 Message-Id: <20221026130658.45601-7-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060724_589228_690B6634 X-CRM114-Status: GOOD ( 25.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Switch to using runtime PM for power management. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart --- v2->v3 * Jumped to err_pm_runtime label in case of sd register failure * Now calling pm_runtime_mark_last_busy() before pm_runtime_put_autosuspend() call * Now calling pm_runtime_put_sync() in case s_stream(1) fails * In s_stream(0) no calling pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend() * Included RB tag from Laurent. v1->v2 * Moved pm_runtime_*_autosuspend() calls after registering the subdev. --- drivers/media/i2c/Kconfig | 2 +- drivers/media/i2c/ov5645.c | 141 +++++++++++++++++++------------------ 2 files changed, 73 insertions(+), 70 deletions(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 7806d4b81716..c0edd1017fe8 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -459,7 +459,7 @@ config VIDEO_OV5640 config VIDEO_OV5645 tristate "OmniVision OV5645 sensor support" depends on OF - depends on I2C && VIDEO_DEV + depends on I2C && PM && VIDEO_DEV select MEDIA_CONTROLLER select VIDEO_V4L2_SUBDEV_API select V4L2_FWNODE diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 47451238ca05..4438dc91b82a 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -108,7 +109,6 @@ struct ov5645 { u8 timing_tc_reg21; struct mutex power_lock; /* lock to protect power state */ - int power_count; struct gpio_desc *enable_gpio; struct gpio_desc *rst_gpio; @@ -635,8 +635,24 @@ static int ov5645_set_register_array(struct ov5645 *ov5645, return 0; } -static int ov5645_set_power_on(struct ov5645 *ov5645) +static int ov5645_set_power_off(struct device *dev) { + struct v4l2_subdev *sd = dev_get_drvdata(dev); + struct ov5645 *ov5645 = to_ov5645(sd); + + ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x58); + gpiod_set_value_cansleep(ov5645->rst_gpio, 1); + gpiod_set_value_cansleep(ov5645->enable_gpio, 0); + clk_disable_unprepare(ov5645->xclk); + regulator_bulk_disable(OV5645_NUM_SUPPLIES, ov5645->supplies); + + return 0; +} + +static int ov5645_set_power_on(struct device *dev) +{ + struct v4l2_subdev *sd = dev_get_drvdata(dev); + struct ov5645 *ov5645 = to_ov5645(sd); int ret; ret = regulator_bulk_enable(OV5645_NUM_SUPPLIES, ov5645->supplies); @@ -658,57 +674,19 @@ static int ov5645_set_power_on(struct ov5645 *ov5645) msleep(20); - return 0; -} - -static void ov5645_set_power_off(struct ov5645 *ov5645) -{ - gpiod_set_value_cansleep(ov5645->rst_gpio, 1); - gpiod_set_value_cansleep(ov5645->enable_gpio, 0); - clk_disable_unprepare(ov5645->xclk); - regulator_bulk_disable(OV5645_NUM_SUPPLIES, ov5645->supplies); -} - -static int ov5645_s_power(struct v4l2_subdev *sd, int on) -{ - struct ov5645 *ov5645 = to_ov5645(sd); - int ret = 0; - - mutex_lock(&ov5645->power_lock); - - /* If the power count is modified from 0 to != 0 or from != 0 to 0, - * update the power state. - */ - if (ov5645->power_count == !on) { - if (on) { - ret = ov5645_set_power_on(ov5645); - if (ret < 0) - goto exit; - - ret = ov5645_set_register_array(ov5645, - ov5645_global_init_setting, + ret = ov5645_set_register_array(ov5645, ov5645_global_init_setting, ARRAY_SIZE(ov5645_global_init_setting)); - if (ret < 0) { - dev_err(ov5645->dev, - "could not set init registers\n"); - ov5645_set_power_off(ov5645); - goto exit; - } - - usleep_range(500, 1000); - } else { - ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x58); - ov5645_set_power_off(ov5645); - } + if (ret < 0) { + dev_err(ov5645->dev, "could not set init registers\n"); + goto exit; } - /* Update the power count. */ - ov5645->power_count += on ? 1 : -1; - WARN_ON(ov5645->power_count < 0); + usleep_range(500, 1000); -exit: - mutex_unlock(&ov5645->power_lock); + return 0; +exit: + ov5645_set_power_off(dev); return ret; } @@ -795,7 +773,7 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl) int ret; mutex_lock(&ov5645->power_lock); - if (!ov5645->power_count) { + if (!pm_runtime_get_if_in_use(ov5645->dev)) { mutex_unlock(&ov5645->power_lock); return 0; } @@ -827,6 +805,8 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl) break; } + pm_runtime_mark_last_busy(ov5645->dev); + pm_runtime_put_autosuspend(ov5645->dev); mutex_unlock(&ov5645->power_lock); return ret; @@ -991,6 +971,10 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable) int ret; if (enable) { + ret = pm_runtime_resume_and_get(ov5645->dev); + if (ret < 0) + return ret; + ret = ov5645_set_register_array(ov5645, ov5645->current_mode->data, ov5645->current_mode->data_size); @@ -998,22 +982,22 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable) dev_err(ov5645->dev, "could not set mode %dx%d\n", ov5645->current_mode->width, ov5645->current_mode->height); - return ret; + goto err_rpm_put; } ret = v4l2_ctrl_handler_setup(&ov5645->ctrls); if (ret < 0) { dev_err(ov5645->dev, "could not sync v4l2 controls\n"); - return ret; + goto err_rpm_put; } ret = ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x45); if (ret < 0) - return ret; + goto err_rpm_put; ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0, OV5645_SYSTEM_CTRL0_START); if (ret < 0) - return ret; + goto err_rpm_put; } else { ret = ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x40); if (ret < 0) @@ -1023,14 +1007,17 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable) OV5645_SYSTEM_CTRL0_STOP); if (ret < 0) return ret; + + pm_runtime_mark_last_busy(ov5645->dev); + pm_runtime_put_autosuspend(ov5645->dev); } return 0; -} -static const struct v4l2_subdev_core_ops ov5645_core_ops = { - .s_power = ov5645_s_power, -}; +err_rpm_put: + pm_runtime_put_sync(ov5645->dev); + return ret; +} static const struct v4l2_subdev_video_ops ov5645_video_ops = { .s_stream = ov5645_s_stream, @@ -1046,7 +1033,6 @@ static const struct v4l2_subdev_pad_ops ov5645_subdev_pad_ops = { }; static const struct v4l2_subdev_ops ov5645_subdev_ops = { - .core = &ov5645_core_ops, .video = &ov5645_video_ops, .pad = &ov5645_subdev_pad_ops, }; @@ -1188,11 +1174,9 @@ static int ov5645_probe(struct i2c_client *client) goto free_ctrl; } - ret = ov5645_s_power(&ov5645->sd, true); - if (ret < 0) { - dev_err(dev, "could not power up OV5645\n"); + ret = ov5645_set_power_on(dev); + if (ret) goto free_entity; - } ret = ov5645_read_reg(ov5645, OV5645_CHIP_ID_HIGH, &chip_id_high); if (ret < 0 || chip_id_high != OV5645_CHIP_ID_HIGH_BYTE) { @@ -1209,12 +1193,16 @@ static int ov5645_probe(struct i2c_client *client) dev_info(dev, "OV5645 detected at address 0x%02x\n", client->addr); + pm_runtime_set_active(dev); + pm_runtime_get_noresume(dev); + pm_runtime_enable(dev); + ret = ov5645_read_reg(ov5645, OV5645_AEC_PK_MANUAL, &ov5645->aec_pk_manual); if (ret < 0) { dev_err(dev, "could not read AEC/AGC mode\n"); ret = -ENODEV; - goto power_down; + goto err_pm_runtime; } ret = ov5645_read_reg(ov5645, OV5645_TIMING_TC_REG20, @@ -1222,7 +1210,7 @@ static int ov5645_probe(struct i2c_client *client) if (ret < 0) { dev_err(dev, "could not read vflip value\n"); ret = -ENODEV; - goto power_down; + goto err_pm_runtime; } ret = ov5645_read_reg(ov5645, OV5645_TIMING_TC_REG21, @@ -1230,23 +1218,29 @@ static int ov5645_probe(struct i2c_client *client) if (ret < 0) { dev_err(dev, "could not read hflip value\n"); ret = -ENODEV; - goto power_down; + goto err_pm_runtime; } - ov5645_s_power(&ov5645->sd, false); - ret = v4l2_async_register_subdev(&ov5645->sd); if (ret < 0) { dev_err(dev, "could not register v4l2 device\n"); - goto free_entity; + goto err_pm_runtime; } + pm_runtime_set_autosuspend_delay(dev, 1000); + pm_runtime_use_autosuspend(dev); + pm_runtime_mark_last_busy(dev); + pm_runtime_put_autosuspend(dev); + ov5645_entity_init_cfg(&ov5645->sd, NULL); return 0; +err_pm_runtime: + pm_runtime_disable(dev); + pm_runtime_put_noidle(dev); power_down: - ov5645_s_power(&ov5645->sd, false); + ov5645_set_power_off(dev); free_entity: media_entity_cleanup(&ov5645->sd.entity); free_ctrl: @@ -1264,6 +1258,10 @@ static void ov5645_remove(struct i2c_client *client) v4l2_async_unregister_subdev(&ov5645->sd); media_entity_cleanup(&ov5645->sd.entity); v4l2_ctrl_handler_free(&ov5645->ctrls); + pm_runtime_disable(ov5645->dev); + if (!pm_runtime_status_suspended(ov5645->dev)) + ov5645_set_power_off(ov5645->dev); + pm_runtime_set_suspended(ov5645->dev); mutex_destroy(&ov5645->power_lock); } @@ -1279,10 +1277,15 @@ static const struct of_device_id ov5645_of_match[] = { }; MODULE_DEVICE_TABLE(of, ov5645_of_match); +static const struct dev_pm_ops ov5645_pm_ops = { + SET_RUNTIME_PM_OPS(ov5645_set_power_off, ov5645_set_power_on, NULL) +}; + static struct i2c_driver ov5645_i2c_driver = { .driver = { .of_match_table = ov5645_of_match, .name = "ov5645", + .pm = &ov5645_pm_ops, }, .probe_new = ov5645_probe, .remove = ov5645_remove, From patchwork Wed Oct 26 13:06:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020572 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2232C433FE for ; Wed, 26 Oct 2022 13:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4a7QqdBaGUuCXXbmRRF1TqvcOnR+/UaEDLoGlURBZKk=; b=xX6F7hZIpAdRhB NsNY1WrpeJ+QfWExiwiXig7Bg0gGKCq3xpZS1gorVt/Adp9X0QsLYl0KnvdtorIJYudKAU+/OKQyh Q/xtDlx/HPN9w53iMMmlZVB1Vgu7wpOTBMcjuyWPZjFpTaEIsQ8F9kJjVnrfHex7LGWanhZ3d2HIK GthCFG8VbO3YcfHPNdUGnEnEsHGBKIYOtGqRRCysBZCrNvSecJazFcsLgzvQiAs7d0MO+hixilcy8 s529Av0JrKYgwyrDfNxa0pw+xIHhs3fox1gi7b4PxuqD86i3Cj2VdPnag1IzViVbrthInMET5ZNoB IUMKRteZ20F9rlmJPnqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ongAB-009OMv-Ui; Wed, 26 Oct 2022 13:09:44 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7z-009NOn-Dt for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:34 +0000 Received: by mail-wm1-x336.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so1535359wmb.0 for ; Wed, 26 Oct 2022 06:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wxRC9RqaS1c9UqAzgAjR/6HB40jvkl82ja8m7OxvWYI=; b=b9CHI4NyN6AJ5o3IRt1rX44jbx9hcjoCG9050hdq7BJLXQTaJmDsPCktJXfbZ1sg6S aZMubcJ1MxV9Tl2ebZgpE/ES/ypJp6DGYcWW2rtwvYH8aYfY8TQzd00b/V3OHspGT1r1 04GNZsdDqwD1rTgDCXEqamnPGENFwD02z0Uwe383xNhfrrhAPLYHfu4zDO88fwkzHuDf pWP4nddoqqDuJ+g4ZfIDhWW9jKkIdb7pRgJC0RgNAIgcudRAO3kbOBYvQrx7qQsRU35J S5A5VTzeEMYtJ/uAeUst3JUIZWNeCMbWq0loeIwjGHw/TKLOIAT8x1vFJLVpXV5lSpjc 7tUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wxRC9RqaS1c9UqAzgAjR/6HB40jvkl82ja8m7OxvWYI=; b=AQizBTge2QBWvPvjXqauQJqQcBwM+6dNWbgsLZdeI9FeDN6Rr4/0HF99LBC2TueqRN Cqe94e0Vhk60VfamnT80rrDAit7UFuLC9hUr8dCu8q6i5TE3yBGJ61VgMEJexOx1ZR0u cCqVlQH6bf7SbgJXOxURcv+IZbEpZu1I2NajbeRBumdzD7V4xZ37pZY13lNRCXCuewji 0EjF3eXkngQ0eC0q83SldP2o82WrPTrwfGDDhQOEE+4fRGdNUqZQOTbrDTWKUCBM7Wp2 zEr4HyvFLDIFU+/pKIRGmI2j2OjZhw4Iv3WuVV9HUOaVE1MyzV/PxX+gxQgmrdMfIFn9 8RAg== X-Gm-Message-State: ACrzQf0uNMPwLm7oHclHa+hbP/C6Vas50nVn9EXwu+eWRLglSHQgUi9S DYdDtG6hM/qOoENifzjilGQ= X-Google-Smtp-Source: AMsMyM4reJ5wMrEmwNg10iO1tCZCR+GX/b7zV+73elxVnOvmcKJhdIg2cgqJLHgdcy53oG7GZKkC8w== X-Received: by 2002:a05:600c:502c:b0:3ce:794f:d664 with SMTP id n44-20020a05600c502c00b003ce794fd664mr2416031wmr.33.1666789644646; Wed, 26 Oct 2022 06:07:24 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:23 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 7/9] media: i2c: ov5645: Drop empty comment Date: Wed, 26 Oct 2022 14:06:56 +0100 Message-Id: <20221026130658.45601-8-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060727_504869_9BBAC5EB X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Drop empty multiline comment. Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart --- v2->v3 * Included RB tag from Laurent. v1->v2 * No change --- drivers/media/i2c/ov5645.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 4438dc91b82a..eea3067ddc8b 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -14,9 +14,6 @@ * https://www.mail-archive.com/linux-media%40vger.kernel.org/msg92671.html */ -/* - */ - #include #include #include From patchwork Wed Oct 26 13:06:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020573 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D4CCC38A2D for ; Wed, 26 Oct 2022 13:11:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=70OaaHoPUCxEqlNFXyhjBW5xOZFXB/Z/FG1YEvDTwjs=; b=l09GdVrpAW7ffk tBwzGRund+FV2dVCkg2oyDXFzVskGpo1znDT7CGOG+qcL3sANd49n77nZvEsbDPNz0Z2oVex96d+7 S3N2vsWds3iN29WJJ0vjpykxQod8uxBCjFy2zRfo6jgQzUwD17ZOAgiDECiNxYitutMS2Gnicojq1 x/S9w++hLzjOucnQs2R46Ryo9RAN+kCbGe9jUs+fU1P93z/sczEX84jKcl3GOaHRREcvkuRRCItY3 DXwr5SMR9HQAHCXJEUtwPAkNKCXnBDaEnVOB6YYpOpm3PCjaOE2oieVe0EyC11yIOeYAyltMgqbw5 4EpJaLTelCVMbcHTiFCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ongAX-009OXt-Qe; Wed, 26 Oct 2022 13:10:06 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong7z-009NPK-Du for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:36 +0000 Received: by mail-wm1-x336.google.com with SMTP id c7-20020a05600c0ac700b003c6cad86f38so1451442wmr.2 for ; Wed, 26 Oct 2022 06:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mEu7I9A+1d1yBU6Am+OewhMcYYZSOczpTnlVQrd1DYM=; b=cjJngFxaJaLl708ZHAdh+fxZXdLGT/ZiLDibcXXYBuerYzqM9/tyfJBWfNrMzuNe9z T973GjsyzcMJcuDxy1bfyy0r3+27tKl1mU7rOPvIL0E+L70YfuVk5qQX4GS8n3xrD5BL 7SLD3WnQZmINrOU90gL3aMB1ylLzppKrD+1WhOhtRLOngmLO91oNbeB4nH9i/2jVCKR0 cjoJ2OVRresDZKJWx93l14R8dMGAEZRJAfPSFRQETjHB69lWPdW75cHwsVK2iO6BqLFe KXEZuD+DRc7jbNHxSF56p33bZPIwKo2u3AhKMshoNYfdHMjdT6RJTZt7EOrGVf5uX3Wh /vrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mEu7I9A+1d1yBU6Am+OewhMcYYZSOczpTnlVQrd1DYM=; b=i5STTbVRnT4l905Jx7moyGV2r7dfHQWV58netNsDzkZ3V3RJBlxooooHLHdbYaZmGz roi155wd/Lu05m8r/2nqre9uUOLNH8Az5cKb2B2oiSUwdMHeiTpx+eBSjFFxvnyKJvDU mB5SoP8oURbs4j6B8uZc1cnIYyf/p7QIhusSgyIrZvs05JUmj/R9+zCspU4HwLghk+qq KNvsn0GyCgrPkOHfFJbJTF4xrebuM9nzk8brNMhyCFKiW2IKSmt5P0N9Pwa7uzGGbG2A 8mWXrBgJ0LW2m6jazwroyc/jRiKEWndVrLAK0ABb8gPTUrrGYGGKjl81tLjXI9p89JWe rGXQ== X-Gm-Message-State: ACrzQf3iLuPsXyrGeyWWdE0wbBts1wQzDVvu9yB+YSh2vWGp+elaMpqE mFq0zkM4pfY/ZBpHx7IvHK8= X-Google-Smtp-Source: AMsMyM5cKNni+vS1VdAMcU0kGbWUB5mxeo7A5g4R+eDKuIjEUyZL8tXaPGk7kVdX3RAfayb2IlMuEQ== X-Received: by 2002:a05:600c:3d08:b0:3c6:fb56:ac9f with SMTP id bh8-20020a05600c3d0800b003c6fb56ac9fmr2471277wmb.193.1666789645913; Wed, 26 Oct 2022 06:07:25 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:25 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 8/9] media: i2c: ov5645: Don't return early on failures for s_stream(0) Date: Wed, 26 Oct 2022 14:06:57 +0100 Message-Id: <20221026130658.45601-9-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060727_529228_EBEFE93D X-CRM114-Status: GOOD ( 18.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Make sure we dont stop the code flow in case of errors while stopping the stream and return the error code of the first error case if any. v4l2-core takes care of warning the user so no need to add a warning message in the driver. Suggested-by: Sakari Ailus Signed-off-by: Lad Prabhakar --- v2->v3 * Now propagating the first error code in case of failure. v1->v2 * New patch --- drivers/media/i2c/ov5645.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index eea3067ddc8b..5702a55607fc 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -996,17 +996,22 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable) if (ret < 0) goto err_rpm_put; } else { + int stream_off_ret = 0; + ret = ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x40); if (ret < 0) - return ret; + stream_off_ret = ret; ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0, OV5645_SYSTEM_CTRL0_STOP); - if (ret < 0) - return ret; + if (ret < 0 && !stream_off_ret) + stream_off_ret = ret; pm_runtime_mark_last_busy(ov5645->dev); pm_runtime_put_autosuspend(ov5645->dev); + + if (stream_off_ret) + return stream_off_ret; } return 0; From patchwork Wed Oct 26 13:06:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13020574 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF177C38A2D for ; Wed, 26 Oct 2022 13:11:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HWEA4wR+ANr/zAXoC/9OjH7esAvhnympLZnLUvc6EjI=; b=v9tNm90AVPv02v CMHdRrvQ588gfpmJO9A4Dm7DjQm0+xHuQhtksZ7YMngBzCd6QLo9E4pUaV3wr7S+B2PYhNVgUL9Ix gWx5o7lETZQt22B3q9gcH0029tvzu78l94bY2rN2JBbuqoBVqVbxijvnGP7Q/jcdaSThIUpoEBmXA kDighRkr2nSTgrgd5YwqQijFNtRsJMZWFLO68QopBQ6E17QuHNPObfLykRmNNgQa5hS5lSp3+tgC+ 7aqh+lxp3GuZZoIlta6mp7nPfgqRAw0Mdf3vqL+gMa+am3HFZZK5xHrfldbtbt0KdNf8+R2y+bm/U k+sBl5gpgc0QNdOEVleQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ongAz-009Onc-1X; Wed, 26 Oct 2022 13:10:34 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ong83-009NQu-7i for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 13:07:42 +0000 Received: by mail-wm1-x32d.google.com with SMTP id y10so10187106wma.0 for ; Wed, 26 Oct 2022 06:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L0jiMTSBmquugDzo1rVzLGgWnpe8YQDdbS4JQdF2oe0=; b=MAVaFUOx/nc/Tlqs7/GJJy2togIYrAqyxRla3MZEdmldp/7TOH4Md8XmrKIeB/407T 9CWwhffHjgDpoUKCpncsUNQrdagWzmOe66eZ0cyF7snK/oWaSZiVjF5lJe9syxJUPrUz 974mpN3MP9cVl1wZbtP4LgrW1s+S42bj39pf9dcGd7sGdbg5Rzt4+D64OyspzVMNGJ5w ZSHQ3EHZrdeenCXSWz+g3VLb4y68jzy+HWOHsPs6PkCejoG2uEBXVVrLdTKev8ColhpT KBmMh1+F/EWcipKHI5UauJUQecTdeaBNP2z+a/aoTmWdtFqH8gxsqDh7ffHUQQlXtUv1 Ue7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L0jiMTSBmquugDzo1rVzLGgWnpe8YQDdbS4JQdF2oe0=; b=TmIsf2ObCYmzqCViD0ABiZd5CyFs6v17GwQde8SZU7kkIBnXg02zqU0RroFabjWCjl 6LBuqKt6Iv/WyEUck5Tptt15WtqLuP5I8BMEfNzWEKGXrBueQd5Er8KP2iKaO3InyymM Ytb0t5PaTVk8gOygZUdJoYzB7esSmSw+MeYAfIteqEV5eLEei7QCnTeJoTybdjKFjU6J n4PanVa/hrZiE4ZnIORr2psmDJM3W5+UWd/D2aeQx+/4FmYXFgZ18Di003hb0MV53vxp vVxaqBKpNgNLHT+l1p+jHKRQyydnNn5cgyDZyncrKEqaXXZNY88nkgAz7y2WFMwIJkbm IYZQ== X-Gm-Message-State: ACrzQf31WyCm5tWHiIEz12s3k3emBexxoGKu5mhgZ9v2Cb5/zkYQf8UM 7IDPgJCkiS1PqsdEb5CkfeM= X-Google-Smtp-Source: AMsMyM4Er4WKAbIRWgF2gLUapvRVsqBjj5aTQoG1761EBBrIC+UZB72u0L0sSE79mM2YekoYDezymg== X-Received: by 2002:a05:600c:16c7:b0:3cf:4dbf:f360 with SMTP id l7-20020a05600c16c700b003cf4dbff360mr1218450wmn.74.1666789647537; Wed, 26 Oct 2022 06:07:27 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:cc:c67c:46e:319e]) by smtp.gmail.com with ESMTPSA id l3-20020adfa383000000b002366eb01e07sm5245433wrb.114.2022.10.26.06.07.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 06:07:26 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Sakari Ailus , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Geert Uytterhoeven , Magnus Damm , Hans Verkuil Cc: Shawn Tu , Jacopo Mondi , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH v3 9/9] media: i2c: ov5645: Call ov5645_entity_init_cfg() before registering the subdev Date: Wed, 26 Oct 2022 14:06:58 +0100 Message-Id: <20221026130658.45601-10-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221026130658.45601-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221026_060731_302440_07B17AA2 X-CRM114-Status: GOOD ( 13.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar Make sure we call ov5645_entity_init_cfg() before registering the subdev to make sure default formats are set up. Suggested-by: Sakari Ailus Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart --- v2->v3 * Included RB tag from Laurent. v1->v2 * New patch --- drivers/media/i2c/ov5645.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 5702a55607fc..73cf6716f3ed 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1223,6 +1223,8 @@ static int ov5645_probe(struct i2c_client *client) goto err_pm_runtime; } + ov5645_entity_init_cfg(&ov5645->sd, NULL); + ret = v4l2_async_register_subdev(&ov5645->sd); if (ret < 0) { dev_err(dev, "could not register v4l2 device\n"); @@ -1234,8 +1236,6 @@ static int ov5645_probe(struct i2c_client *client) pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); - ov5645_entity_init_cfg(&ov5645->sd, NULL); - return 0; err_pm_runtime: