From patchwork Mon Oct 31 23:21: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: 13026478 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 0E32FFA3741 for ; Mon, 31 Oct 2022 23:23:29 +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=okTBj/d5kiuVHlGSJQ2s3GrTN+Jo4pwhm9CKcO0XwlE=; b=wDAeo0ju+XGEEx +EBggzMOlaNS2VSyAC4LnxVAq70XqT8fW7YvYSyugrEM0OcCAci+WLKWpL1R2Zye8Ocul4bFFElx7 NSGp2gUfA+7p0evm+cLO3ltkLEdbvPfSg8itD7zNuTFBGxQSyD1lb/tF9pKpejoXTqSnvJjNmhWKv cB7bMGfcEJRg+XrcDg8QYEMWSk7csaEpnO8AHag6AXypW2ndSgPdQQsTafdHyFUhooTAMjQUy7qmG JY8PxYF+2+FGwimA0C3HB6NDbVFpFNjgQLeGpsqJFiBEeHPxvSUfpCLDD0wuzwJcRYMIIUYWPWSqs iZyShFZijKn6k5oCLeaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6r-00GZKc-05; Mon, 31 Oct 2022 23:22:25 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6d-00GZ8z-IR for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:12 +0000 Received: by mail-wm1-x32c.google.com with SMTP id i5-20020a1c3b05000000b003cf47dcd316so11796839wma.4 for ; Mon, 31 Oct 2022 16:22:09 -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=TEzFrhTkWeCjs8Cm9lOhIpriWE8/5AdjGdiuH64P3Yc=; b=PT4L1vjavEaxPRpEIodvzJuUESfGuBT+zTCjle8LroCDLCvGpDzrHsmG1iz+HP6zRQ e2TtL68l9ZunbfMLuwYnWdlE84NwQmn+cMaNPBNXjqglleM2mF36fGuIxynWrisPAaON +kakU5urRZqjz7wdXuiMQDg2jVrRshNJX/OaCzTqhmkklmrcm6PAO+F/9QStgaUojnmF vOc9Nm4pr+dQisstoXvDA6CENVYvuXkUKJQH1wK/63O7yyEkTBwg0/Ydzhl6LRSO+/c1 rTn4r/AkrcHR7Cw8K6k3grk2FAgQKbkzoUkXlGr2hyVaLdRcLY5oAMY6JfBxr/JxIdjw hMsw== 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=TEzFrhTkWeCjs8Cm9lOhIpriWE8/5AdjGdiuH64P3Yc=; b=gdxFzZ02O/vSlYxTAVjqK72mv/XmCPqmT8rSdt7actuB0X2N7fenwuB+RDNpTVSZUE 1G0gv1L+J2YywOZHk467Y9Cli0gL9Xg1HCascqTyTIIuw3Z/SgBryAa5lWoGA40kBFVT UKv/luRTEWPUcUoMG/I5AZS47APV+Kw/bRGefhEtLCL7HpW2G4so8gFI9epozM0Tgyoh jZLsD4xAqE/CSQGX7GnP+DS3i8dKX1nobz4Y8qoVTpatv7eVOOXQhfxeAaNEMWBmy9JO FWc2SVa1axgkKfie7bNYOGaKasZTm3D3pBh5PT+dCD1PlhPmKCaZsRpsoV18GGN9bZ7p FicA== X-Gm-Message-State: ACrzQf3w5rAH46uWwLY3QTHxdzPaStU6HUlf4w8A83lb2wuhlzCxkq9J N4wZ98NS+MvIHQsUFeNVmV4= X-Google-Smtp-Source: AMsMyM5TismXTZIFkjjeFN7VZPXoAt37JH4GYKLKFt9pAmo6rv7ZxGtL94Tp26DOy9ExUOUf5NAeoQ== X-Received: by 2002:a05:600c:46ce:b0:3c6:f274:33b2 with SMTP id q14-20020a05600c46ce00b003c6f27433b2mr9790385wmo.27.1667258528012; Mon, 31 Oct 2022 16:22:08 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:07 -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 v4 1/9] media: i2c: ov5645: Drop fetching the clk reference by name Date: Mon, 31 Oct 2022 23:21:54 +0000 Message-Id: <20221031232202.131945-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162211_629027_5DDACAC4 X-CRM114-Status: GOOD ( 12.88 ) 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 --- v3->v4 * No change 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 Mon Oct 31 23:21: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: 13026479 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 3A5B3FA3741 for ; Mon, 31 Oct 2022 23:23:33 +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=dV7xkzllSk2y7AyLiMM9Dvehq9mf5stCLKrUrXGxICo=; b=KawABQlzniP23Q xU60Ei/zWqvsJZVM8lSOnNcbMOt26heI9eHvZODWqfqYoeNKG9AvU2qdy9kRMhxAnPJULi/sCtDnE dEOx/Soy1gyVp/c90yYFFdz1K5Sjd61MwsuJMLdp6uWyxHIB869o+iXZ28T137Qsp1brhvdejH7Zw XlpmaqCNFckXrh15Glh90O5Hy0MCDmz2WDbyFzkkCqe8WPlbDc9UVu25j0cL/g/1chyA10PTxeI9o pd70IOaouBZxHyehQQEkVyefipG81zEE8EOH5ddQwAlRi2tPzrn5wT5VGOVon6M7PUKxAkQKcDAEX AsHx7gTkrNBXKy6R47hQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6z-00GZMA-AE; Mon, 31 Oct 2022 23:22:33 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6d-00GZ93-TO for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:14 +0000 Received: by mail-wm1-x32b.google.com with SMTP id bg9-20020a05600c3c8900b003bf249616b0so8967721wmb.3 for ; Mon, 31 Oct 2022 16:22:10 -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=+MdUt/iNt9/kTh817Rsfi87nfiZ1a+43i2ZO2yuH5Cg=; b=jTVLX6Bj322sv3oFouLXybUnw9DkS2lMpgMu6sR2Z4/4QVL7Z+30E/OUf74oytw9rw 9SpEv+OgwDZbj3wvJ1ZWj/6alqMFz7EGU53qPlHUE9llmzddo8WPTgS+h/zKaMjqZGXS VHLDyKimZ/2AZ8uviDEeQ/Ocpi4rdPJAzGDSJNgoqdOBQPk/HwiqOiYDADcfwodcTb7d lr2O8nKDsNyNxP8v0GmablOlrX1pL/+EnMUOVPz1Tx4LUtUFdFY0jclVeZzu8YVn25Ey ci2mRQqRUyzxxugA1Nhy5hlIAG4gdbgZSe3M96P/Fw6nUgw0PcbmKO9IyMrChaKQLKtH 8/1Q== 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=+MdUt/iNt9/kTh817Rsfi87nfiZ1a+43i2ZO2yuH5Cg=; b=T43np02Cb2OXQXY6WAV+rmmCzUZTENVmcl7Wi0YX8IDJtug8dDCIEX1j5zBmtLNh8L l9bSdRsHKW7lD+S1aEzEJPxU4O7UmmAYghtSGZfp0TH8x683BlQxKdPENLYuwa/uFROr Wb+aEBBmQRWVX9DPCvTJJQCLOIMJt26XkaKhmw4Zoj8hnL39CylByK0gom0DmOzZ9es+ UHeaKs6avMDmKgkKwKrF3w2SLGTg7IFBkF92EjZz/3yIaaWPZddH+FLD7ZIKmlrTspMF qNuiYCJOACQO5HoqALeKeIstyeIXunsFylgPGUGdRQqzCqy9ly3UuF19jilwQn5nPr6Y VKQQ== X-Gm-Message-State: ACrzQf2DS3Ez72redYPoJP7BsjxNIJkzyffBNKsj2VYf7atSx5aXK/Lz /ru29UHYe6cZYmPyFSBMno4= X-Google-Smtp-Source: AMsMyM4Mg3gghsP5pWgmFsT2XFdnBmf6Abctn4YIlTztqIGN2AwFewk/aTLlAZMdHs85kMJMq/QNQA== X-Received: by 2002:a05:600c:6023:b0:3cf:7dc1:e08e with SMTP id az35-20020a05600c602300b003cf7dc1e08emr456974wmb.154.1667258529235; Mon, 31 Oct 2022 16:22:09 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:08 -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 v4 2/9] ARM: dts: imx6qdl-pico: Drop clock-names property Date: Mon, 31 Oct 2022 23:21:55 +0000 Message-Id: <20221031232202.131945-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162211_967687_82AB6C05 X-CRM114-Status: GOOD ( 12.52 ) 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 Acked-by: Shawn Guo --- v3->V4 * Included Ack from Shawn 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 Mon Oct 31 23:21: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: 13026480 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 00839FA3741 for ; Mon, 31 Oct 2022 23:23:38 +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=9c6uBQ2gBTyFXAZQTyZtt2K1IW4JwQQohoK/0gLrsTE=; b=CQLn5fMRh4w6yx vQ16Ccch+FVIGhGSetrxID7YRGlqSwNrVObpUvzpcRQC26w3o4z3/3Lj5TGmti/b0G9rIkvqO3FzS Es1Pe+dPwRdjuhn6Xrv1J2jdLnV64DrLjAgHa18ux3RXSHz7wts830WzR9misG8yVGUQNM2nqY8dr UPWKqaLaZhZMTZNc5aKLv52k2aSNF3qqom88TKod+ZgnPijHQrDrurFi5zgu9f8IhZ33kCI8a1zaD /JgXcLCuVTJeewtKB2jpzL3sca0VEjxV30R+85I7Q2j/rV27t01oQ6M1AubPCLcbf0HBXNEgOGJlb FM7VQIsQFIM6W6N0bJdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope77-00GZOK-Tb; Mon, 31 Oct 2022 23:22:42 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6e-00GZ9n-Ox for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:14 +0000 Received: by mail-wr1-x435.google.com with SMTP id bk15so18004670wrb.13 for ; Mon, 31 Oct 2022 16:22:11 -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=kyD58U8XfTPLhP8L6dYQRdSftQvUir8wfXrJ1EL57to=; b=TNYP7upQ+XliKy6Oy7PDt04rpganc5iZE4z0navqKYlnSR/R7ix1GtEMsNLSqDj2QI AmXDEXzES5/rm9GUZmpRVlG+ZQhuTCFtsOQZUnqU2EJ6vEN7ShTffbPl91t58QJSb/8J kZQk8XH8CzIxBQf9OxHSxdyz0FAMuyyZqLTvCcd2oDa656OiEFZp/lwgyl2aI3Gtpmti rgiPkhc8Ok6ayKY8i0evCl7Mhp/flXoBlBlrdR3HDVFjPEB99hEX0ZnYOvm9EPx/iKur XuCMtg+RKWWU3UpoAcQoD43iZ9IBy3I7jMAe9ViZ/TLqB0cyDwt5ZLaGN+YxHSYjXdY4 Mn5w== 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=kyD58U8XfTPLhP8L6dYQRdSftQvUir8wfXrJ1EL57to=; b=Rxq8t/gMG1+XGtfNyj4G1aDgMEkWOYcOcuyDYVxBXytyj3jwvSgBbMOWkyctq3JgeF WiOpn2gjVCOM4aKvU98SVWUIE3u0p6K/XHXo6Y8QpX4GjMu9tAVmMx6zIfzUAZmJDn+x vfEXVxIjS71SnhBaljsj0+RURIogWRaykmZc1wg2tRFhSnaX31Zh0G1R8L/Z7DAfqStl MP/uhNZa0Yb8iRXLXgW7Qi5qS8SUw5OUozJR6ZU5OWBzy0krL+t71+GROkBoqjDy1lQ9 rXTl2awGQ6+wSDZ4wr/0RVKHyA1Dg5JbxkxLDxPDm8tT3fphs6HJeeKxlUbCj+tWzWtY BT8g== X-Gm-Message-State: ACrzQf2An5qII4ztA2cIgoQjwJ8520ic3YTUXgW672NDmqSiJWvlXzpk u0XzwTpT9ZMJJdMDOWxZx8I= X-Google-Smtp-Source: AMsMyM4+nWVJ22rNl4L7Cw61VJfAK+GGQ3uEGtoGTMf8OXpswZoCAsaKIvLrAZEGv01WVC3JFOsbVw== X-Received: by 2002:a5d:44d2:0:b0:236:d8c5:122e with SMTP id z18-20020a5d44d2000000b00236d8c5122emr3142672wrr.611.1667258530433; Mon, 31 Oct 2022 16:22:10 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:09 -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 v4 3/9] ARM: dts: imx6qdl-wandboard: Drop clock-names property Date: Mon, 31 Oct 2022 23:21:56 +0000 Message-Id: <20221031232202.131945-4-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162212_832040_EE21129B X-CRM114-Status: GOOD ( 12.52 ) 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 Acked-by: Shawn Guo --- v3->V4 * Included Ack from Shawn 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 Mon Oct 31 23:21: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: 13026481 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 8AF54FA3741 for ; Mon, 31 Oct 2022 23:23: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=4/H0koOaIgBxwE4op5MV23gu3FlsBaRQZ2JPXHDGtuk=; b=B/yiljaDZuaBqt +LAekhYk/3IcySNADjz7/VJjUKnnkPMieu9TroIrDgAT8WvehI8CLVNo2pM1SivIbvhcTDg/xTE3u b9mGud0l7M7S+z0pe6cUkpuEfiWfAU0/3vcV8q0tmXKfz/ZB5C4pjxWg3z/ipi7WcAyBcPv7Bm1hK khLMQsAMj/r3n2YZCfNbqmF7ytB1SG9AJhPLRMREwGg9G4o3czb4IVkS4gM0wlSpOqoIyGdNeh49I zqiBFXvQcLH9BINlcIaQRf2iCbXwnDqNrTaecVbJrP8mjU0/09XKNU/lfgJ5jxdeodAb64CXzGGVl M0STtGl1NdFPziLSRchA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope7I-00GZSV-Ea; Mon, 31 Oct 2022 23:22:52 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6h-00GZAb-E6 for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:16 +0000 Received: by mail-wr1-x42d.google.com with SMTP id v1so18027411wrt.11 for ; Mon, 31 Oct 2022 16:22:12 -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=r9VHYXuPl7lW+Y4lOtJuafMlo94cKBcVsHf9qYkj+B8=; b=qf0tMMl7snTqw2mpt9fryEeYpgvyZJbJ0NM8T0rxZudbdjYlSSzz2Y/dp35RwtmISC up1dW4cn2X+ky4dtt75aP5ApvwXapf8dnzExcC6lwQ/PhSIMXfy5YVBjt0tcbZCp5f5J CbsWgcSeYSkWwZihcpbq/7ycY1sT63Ppdt5oaHWPbBWuzfGScxt/9S1Yj7We+BAbZEaT gOtp3Y3mLD+pfcFrNMpijr5V6FbCf7J6J2xwDMFraC/B/eTWTwKjGp/3cuSo9dTHL9HD XCq8jqtREWmnYLszNnJsTQMNx748mzLtK0DtQM10PWho2gJE0+Y5yfC74H7Bw3Jsb4eu Lo2A== 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=r9VHYXuPl7lW+Y4lOtJuafMlo94cKBcVsHf9qYkj+B8=; b=KesE8lSYZCNL5PR1qPyzv7n8XRouR6aUb7CSjfNV5Mb7RWaNeKTGaZPKcnxrkHMTVP nEmYnSUPLiEpKlATWQxSVNJt/DeunbAzp7NxYPY14w83xSCy55ZyYwztaHxg4/UQg3gh HZnxe2cAQObR89rCQkDE2L7ltvtu90xmBh+McDxtpFv7jmJxroY1bkiTchOhI5ilpTF4 w9sPJtxzu7bwzYYdN3OlAGzYOA7l/li2M6Mcl2Lt84dPI2FHT/aZpvnpoLw7jPWYyW8/ uWtVYwF02NeEoAqkw0tPgN43cBv3K8l0RzE8xj55nk5U852DrT+X4DbHc2wmP7uO0O2L +gHw== X-Gm-Message-State: ACrzQf2rho34ki+77zRabcl3lZZjI2YLmLARNn2cL+ZJ61V9n6n2/6eG Gn5ftNESQ6hoC6fNER9u9Lg= X-Google-Smtp-Source: AMsMyM5232K+NHOFlqCTn5WLGMbE8QDMZMvrRDvJqDG488x9XN1/k8JSsvrExIamD5sOLVNyAJzIwQ== X-Received: by 2002:adf:cd86:0:b0:236:6056:14d3 with SMTP id q6-20020adfcd86000000b00236605614d3mr10035142wrj.30.1667258531659; Mon, 31 Oct 2022 16:22:11 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:11 -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 v4 4/9] arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Drop clock-names property Date: Mon, 31 Oct 2022 23:21:57 +0000 Message-Id: <20221031232202.131945-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162215_507907_A6DACF28 X-CRM114-Status: GOOD ( 12.32 ) 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->V4 * Included Ack/RB from Geert 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 Mon Oct 31 23:21: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: 13026483 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 E57DAECAAA1 for ; Mon, 31 Oct 2022 23:24:35 +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=iudHMOeHrI01Si6sXWHEyc+mZz3pjFjahLeySw5fncw=; b=aGNc563KMyPYZ6 MSuCL7lBlMAze8Di24oUGWNhifjLC34wxNuQBkrnRW7QWTZa0lgu8hlU54Ilt9ICmZe+1SFmYuSqA O+7+czWlAHftrzZPgpTSdaaDg3jrWkJhdKEWm45bb1QduF7P5+FVXSlT3Zob3XU+Ip0Y/Nzl3d7cM s5JTuhKkENKxzfzTSnPPWzt700nfOPXDw0T3Uj8ZFVYZ/ftd8OBiFKqYDK+p9zfiDH26qvoyNnMQU p0naO00Sl/4xNoJrrogKVghugQuz5tZdDq1UbFzPkDuEBK0FNoqJQSjStMfDYLymHC/J7UgJfkv50 Gz/nXuXiJ01mZd1KFKRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope7x-00GZuy-1g; Mon, 31 Oct 2022 23:23:33 +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 1ope6i-00GZBQ-TI for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:19 +0000 Received: by mail-wm1-x336.google.com with SMTP id m29-20020a05600c3b1d00b003c6bf423c71so11830778wms.0 for ; Mon, 31 Oct 2022 16:22:14 -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=GVip8IOpyMxjep2B0xWdSusXNinq79sxctTxO3WsNTg=; b=BzOiQz3khhlS5lwRxTlUiNaP3JUy9XE1LhgHHLsBVOw6sL/p87LQ+Qsqi2W9tvNeS9 BQ9bf9XauoB/Vgo6HYbv1vz6piBl5ejpynsBdKkjopYw2pDyOnqL7H08+BvWZ6ZHPDkz SR1AbURGF7IU7xe9VQVKcvdaDBNBZtPlL016XZN+gX+6CBr3P0aA2QlPP/prtz5FtvWN oqIRld7CdDNMPSuDXHu48dxOJlXos6INLT8nT5gv0pgS2kSAqZbgmT+KQN71yls3oMOA 2ELVPDwz7yzuv0Oh4KALqv5Lcpmp7mJeUB27m5XIsOQjfZKq7NU+Q3OK86gulNauC2Q3 HjxQ== 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=GVip8IOpyMxjep2B0xWdSusXNinq79sxctTxO3WsNTg=; b=UTk7ZJiP3bPicuv2cZyvMPTRcLB119mFq6ll5KuBNE5pt3RVfLbuh+6g01+f/wNofW ghD9yKD8veP0hKVRS1jtSvEk2kbH7xpX8gOyjUw16apPL6kcbdrEItKsFZx4PfONxnBR tpdwfBxutZ7QL/RWWa3+z9Atj6AfzGwLtS4CFFawpz/HYoX3pOIEovGHM+wmU50h4CAl ZxHhg09KeMsiBKDPUosW8t3t724X7JHvT2sI2enE/20gLIXYo/FaXrWiHa1XF18iAft/ op8OYt1Rrl12y+kaHHVvxQJpUHBmg1wLTMAK1y+xXpYpYdhMW3Qnzc/nZWHaAsUANgb4 9Dgw== X-Gm-Message-State: ACrzQf2Oeo4hzbY2Y5tZHm4tDTOvdYPTZHJk2WJA8QqF9rYR9UqIZNPO s1p6CI8VjxcAMcpuBxQjVg1Jdh8zCQyJiZdg X-Google-Smtp-Source: AMsMyM4gjZCg3yaqoXhBgzxKHeJrqOi9G7ZHu6ppPxCLtaiNRJW1cZ+9wi/YYVNX4sVQUZubQNtiXQ== X-Received: by 2002:a05:600c:4f04:b0:3c6:fae5:b4d4 with SMTP id l4-20020a05600c4f0400b003c6fae5b4d4mr9897262wmq.103.1667258532998; Mon, 31 Oct 2022 16:22:12 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:12 -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 v4 5/9] media: dt-bindings: ov5645: Convert OV5645 binding to a schema Date: Mon, 31 Oct 2022 23:21:58 +0000 Message-Id: <20221031232202.131945-6-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162217_017395_FCDD0489 X-CRM114-Status: GOOD ( 22.08 ) 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 Reviewed-by: Rob Herring --- v3->v4: * Used 4 spaces for example node * Added reg property after compatible 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..52c6281a6684 --- /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"; + 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>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5645>; + + port { + ov5645_ep: endpoint { + remote-endpoint = <&csi0_ep>; + data-lanes = <1 2>; + }; + }; + }; + }; +... From patchwork Mon Oct 31 23:21:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13026482 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 DF813ECAAA1 for ; Mon, 31 Oct 2022 23:24:10 +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=uc93tlCaq2lyLp7dR38uY4L1ml86qIhNiwhSo6/dWfM=; b=BksxexaBmVPL8H +iwVJAY2YIeuFI67JPkjt+S7SJUumRoM6bl4qQnfTAkFPmVbYtCII+cUskCd1Wmf8YM35BTK5KOYk 5+w3IBKAxppRsKIbKi5lA3gm14KYkCLJDtG/A+8GRTc3EMqrQ2hn9CpqibPY/A6vZpjXnGM8YYVZB xcxnc1US0YzEMXp4aXhWHNVgc1m1Hso08vshl+kM+Hbv8VsNAK7jpDo2x2v4hAN8oBXW/HIS0ec4W 9m26d6krRMnsry96afiogBX04YMXU/66QVnSNZjlIWRJ7Snxge1Ezrx7LzF9SR6rY/qf6fWkAXcLq dMjesTS7FJwEE8RdM0cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope7b-00GZeD-Uf; Mon, 31 Oct 2022 23:23:12 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6h-00GZDS-MF for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:17 +0000 Received: by mail-wm1-x329.google.com with SMTP id p16so2428711wmc.3 for ; Mon, 31 Oct 2022 16:22:15 -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=JdWVp8VKApnfegQEOrjaVUnNIwV9nr2tqU0d5pk0pbY=; b=aVYZykcQRdCNhljn6y2lG2hREcVaK6h7Y9tlwECutf18hy2Xq5a2QfW1vMzgeV9mKw 1mTjtFHPy836OtHRKd93eUAE5yKBfocaQETKWEilmEW0yN2DRSGoKx/98blsReyBZxtg rhD3xPrM3DYzaX4uxQFuYkFH+XMHsI+11OSuCSbYzvqjvfpbrtJULWjlYJ5YlZkwJQ77 DkXm1o+8BvuBW0EGeMhh0t3FJhCGFfiF5JB7aGNSBaFB+arnCyCtj1EFtQBuQsEmU3x2 KelZrDwwaeZc4mxMVuNLprEf/y+G9PDySKogLFJ35fwCs6LI8lvYcXKxiU1MXTuvt5RT +zzA== 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=JdWVp8VKApnfegQEOrjaVUnNIwV9nr2tqU0d5pk0pbY=; b=wikIkKqr5CwHf3FdSEYy92KM1eKHBWDIWn09cpojicYaMJQNaROeNgsGTMd3Ezayqx v9f5Hc1NSUR7gibHMv/TWNeheLlrfUtpMCJzrko3+lOzLbzYtkJmy4YEHrCmSc9Y9Woz 8+oN87ttyhKz/XmY9ZfAW6j8WpcoLFb2NHXWT4kZ0a3TK3aY0TcwawFO7MK9zQShqX83 W7PpY5xI0QbU/u5yL6JO2PsLEOJufxC8lO2K+BMNyPT+py5McdU8rFRuTAp3uskDsWSD iIgyoUAH/ceX2auyX84d2enGojLguT+zbDTYjk6SYrXy0VaLVmcu3+2Qw2aLFq4b2GRI GuNg== X-Gm-Message-State: ACrzQf2cPbhe2FwF4XyzCbmDHC4HXsnhN3MM3FcaH5whciQM6SU4Y+Bw xgRnUCDPAMsJ2fCOzt3pTgc= X-Google-Smtp-Source: AMsMyM55AZpk7lKS6zqkZ5m+nxrCYfO5A1HzB5ycOj0l2bC7+SYyD6GBmeVHyjlI4YCVxe8b/oWIkA== X-Received: by 2002:a05:600c:2150:b0:3cf:6c05:b4ab with SMTP id v16-20020a05600c215000b003cf6c05b4abmr6846876wml.161.1667258534320; Mon, 31 Oct 2022 16:22:14 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:13 -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 v4 6/9] media: i2c: ov5645: Use runtime PM Date: Mon, 31 Oct 2022 23:21:59 +0000 Message-Id: <20221031232202.131945-7-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162215_815977_80435A0A X-CRM114-Status: GOOD ( 22.83 ) 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 --- v3->v4 * Fixed comments pointed by Sakari 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/ov5645.c | 133 +++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 65 deletions(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 47451238ca05..2e6135d0a31a 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) { @@ -1233,20 +1217,30 @@ static int ov5645_probe(struct i2c_client *client) goto power_down; } - ov5645_s_power(&ov5645->sd, false); + pm_runtime_set_active(dev); + pm_runtime_get_noresume(dev); + pm_runtime_enable(dev); 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 Mon Oct 31 23:22:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13026485 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 744B9FA3741 for ; Mon, 31 Oct 2022 23:25:10 +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=fmMqo39y0+Z3ZFebxasmHm8EnBi8T++09qlmOZTjDag=; b=zaCIln+Nj+67Oq lRPgYPmntWJNugiSFV3dgEzoYizZMudLM6a/pssC0I0A4fKSGO9q3gQzl0QGBOhkhDLUnmrqLBYAj xMZDLkV+kdBZSAkbj1nEpS5adF327iW3ZfpPLJW5Dj21A0Z9GlQXC9kmNkTreQpQn63lQAHChxSno Sbd8N/uAAKuzy7xRjbr+/seqgj8xsBaBsJonJ1O/AI0RYBuy5girWxKtR3xFkCRsKomXCneJ2BEj3 wLYd4Np0mp7Fz8e8faUV98eNwNPamBoWbmEwhDkHpTRV/TrhUkI9bkHT97pjMMMbt37N9xe/U3Wlx fM9RcySE0oYR0g4rzg+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope8T-00GaU6-SZ; Mon, 31 Oct 2022 23:24:06 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6l-00GZFA-A8 for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:20 +0000 Received: by mail-wr1-x433.google.com with SMTP id bs21so18059171wrb.4 for ; Mon, 31 Oct 2022 16:22:16 -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=fJBWoy7TJ47MfKlpeijbPHMAr4KHuBmcOIWaFpNesOo=; b=RF79MqPp6/jwnF0C2Wz9VR92XLalmz4Kv5718fsA8GaNwxe/y9LDw6Ar7MQ+7SPbx1 4/vfpxIE9A/klzv9jdUckFRYf/IAq4IIYcc7MtfmFoA3P0g79UBDfMble2aN+h6kKVcZ 4HWBQczK3nu/pRJHTI76YVlpKeB32xmA0PBiNLIkCHexeu57n9l79INx8D5Dqm9jZ/Iw y0N3TMwOu4jzTzNEoVmjert64dHTzYVd0MH8wKf+MH8M9JSbevpZkH/Gze2Agr1qLNU8 YgzDDgbY4H/sZiSkD/8GEEHozPG+/AAaQ6BQk5uaTjCmhsA8BVrWcobHePPHhjfRRKdX iDQQ== 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=fJBWoy7TJ47MfKlpeijbPHMAr4KHuBmcOIWaFpNesOo=; b=NkgHdMRl2RtF0zsS0kNVSLB6El705LAmup3G9Rut7gHWRdqmNCmWsGIZs3gyGxUHXB xCKIlXBzHCLN8X3nkzthWDd21SMizGx9KGPqucCybqaplEoDPtIaP3IRzEAvx0LtEgOC BzYWpzsnGecIM0whP/mEWFhpMyjuMnS1Om7re4oJxPtppm3Deugq6yd6VEkeN4l2h9lW zoruzmygfLBNkGg/Fnxly/Jb8A/Y93MR8iQIKYhgkQzI4wLLwWRwyVKH/Ox0k69ZZ57c aLoc3m9TG33CPBqDQDcm+svLcqvoI9K8RwinPGSE88GTWzZevp/Y6ga/GMxnP2Knenlc YNZA== X-Gm-Message-State: ACrzQf0h8+k4hipxpyGPh43pLgTzq1D9LQvQsBEocO8+F9gP+y0BbRwg 1/z8EtjSUFYpqB6DuQQlAj8= X-Google-Smtp-Source: AMsMyM79W/pa8L0mk+53L9ve6nBRik58aJo+npJd7mdZsnrVFKc4XVCuByLE1Y8QVs/egaaHybsPaA== X-Received: by 2002:adf:e2c8:0:b0:230:ba81:cf0c with SMTP id d8-20020adfe2c8000000b00230ba81cf0cmr10102710wrj.357.1667258535600; Mon, 31 Oct 2022 16:22:15 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22:14 -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 v4 7/9] media: i2c: ov5645: Drop empty comment Date: Mon, 31 Oct 2022 23:22:00 +0000 Message-Id: <20221031232202.131945-8-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162219_389249_470F6427 X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. 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 --- v3->v4 * No change 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 2e6135d0a31a..6897f542737a 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 Mon Oct 31 23:22:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13026484 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 1DB45ECAAA1 for ; Mon, 31 Oct 2022 23:24:50 +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=4QIgpb9wa2NrwYggN4q81pfj29Knqn1L05O+sT/8MmU=; b=TA1ljLmG23yvvw NoVjovJv02Hw6271mPUmcMqyClYDUtoZq8pzTD7oqOU9+qNPK+oPFnPHRUJqH8QB5ZC+culB3orH1 NDzv0TKxfv5BWkjm/YNcxY8wT+3g32niyMCIT5R+IexJqYYAUPM+eH6juCu3m8jbYKi0311/mGJZl hWksFsvnUB0VbIk2UEqTGnXapapLUHjI+qtbrmE7O4oA03G75weuTPr7djTpIQa2nzqd9QDI1fDEz f2uwHZwspBa0KoGVcG4OcLt9jJrujQArm9+0YHopTnW+6hNUJAkfShhpgQGl/+OTa63iNUtioxIK/ 7NMO7VUm/DZ5jMjxA0vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope8D-00GaEm-Fc; Mon, 31 Oct 2022 23:23:49 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6k-00GZFo-0S for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:19 +0000 Received: by mail-wm1-x32c.google.com with SMTP id p16so2428744wmc.3 for ; Mon, 31 Oct 2022 16:22: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=d4LiAqleogBkG8NOm3VowQ575ICtW67soXi7PB0llYs=; b=cJK+/X3jEyeQ2Es1QFj2uoZp4BYmhWP4k+uzNhatrXacbRSw8ei+x9SzH+tX6LHt47 K7gUQPZCZ3+sptPPay8wgi2hNjQOQxQRF19KcxDIvek4UsSGXL/uAdZRlAHaLcHIV+I/ jJ5rULwV0ifD5e56vOt4a5LkbbbJsmoNcaGib5WIRQXGJt7iE453Fx2Sre0cAuISGAT5 alT9LvH5LgXUSIzJh6WLlO6ni1ZpuJKqhBVB1nJH4kvswHH+G2TUBi9UDrVg349YORUI Z1cL5q3KHLphyRQTRyRyKA7buTwK0muwHIVQmSUS5GehZ43ZDQZIpg2XdeNJ/qTv1fLy sd7A== 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=d4LiAqleogBkG8NOm3VowQ575ICtW67soXi7PB0llYs=; b=s6K+Fsnw96d0EbENLSiLQrEjk99IYxc31dUdkcunvWylXgsqnbHcUjvgoZpXLI/JCX iKtC7NwzYZo/bTD1LrBiQ7Nk68TVtVYMsA7pCC6p2mEbPc6Qliey9wRI/31A69yjek+K ySTyAchNmubh9frtZmthbxFmulZqZm90rsbFHGFqbLNx4rfV4I/jARRmdH7Py4szLz4m H+CRusJACU2ZM6KKIt6jQv315fTUlaoNKPcGTNhc/d4SY6WC85FkdiyR4dkWrW6K/CSe sU/CnlEFpOzBP50UMRbLpZu9uDiBTOVgN52oDJIFFJOSPrzF1Lt2T0IqS74buJb2f10H uRcg== X-Gm-Message-State: ACrzQf3LTPvzKj2IvN3ueD0EvfVthKKofOqQGacg4X9vRPJEfgdN85UB dB6UT85ZZqrfkGPbqeBtLBQ= X-Google-Smtp-Source: AMsMyM6R2VdJ2gyF7g8C0Bh7WSaajyMcwehD1icOTPDlj8Zv096mXbB349vLgpuktAsZBY4NnR6kVg== X-Received: by 2002:a05:600c:4e45:b0:3cd:f141:b7d8 with SMTP id e5-20020a05600c4e4500b003cdf141b7d8mr9768739wmq.196.1667258536834; Mon, 31 Oct 2022 16:22:16 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22: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 Subject: [PATCH v4 8/9] media: i2c: ov5645: Make sure to call PM functions Date: Mon, 31 Oct 2022 23:22:01 +0000 Message-Id: <20221031232202.131945-9-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162218_092118_CB7EF008 X-CRM114-Status: GOOD ( 16.29 ) 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 the PM functions while s_stream(0) even in case of errors in the code flow. 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 --- v3->v4 * Fixed comments pointed by Marco v2->v3 * Now propagating the first error code in case of failure. v1->v2 * New patch --- drivers/media/i2c/ov5645.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c index 6897f542737a..0a889283da36 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -998,15 +998,12 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable) } else { ret = ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x40); if (ret < 0) - return ret; + goto stream_off_rpm_put; ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0, OV5645_SYSTEM_CTRL0_STOP); - if (ret < 0) - return ret; - pm_runtime_mark_last_busy(ov5645->dev); - pm_runtime_put_autosuspend(ov5645->dev); + goto stream_off_rpm_put; } return 0; @@ -1014,6 +1011,11 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable) err_rpm_put: pm_runtime_put_sync(ov5645->dev); return ret; + +stream_off_rpm_put: + pm_runtime_mark_last_busy(ov5645->dev); + pm_runtime_put_autosuspend(ov5645->dev); + return ret; } static const struct v4l2_subdev_video_ops ov5645_video_ops = { From patchwork Mon Oct 31 23:22:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 13026486 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 38ACDECAAA1 for ; Mon, 31 Oct 2022 23:25:30 +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=8KUQyeGgoK1+wYw+6PH/uwSIUQIdxGqsyxgnsDyUSNQ=; b=I1xlojUhHv1uxf zofHi3aEuvvEU/UupTWTGzMJqzbDWzWuCsu3rXyT4Stw76FEivc/OLJg39FWKmap/w4yWVNkQN+jz hkAhPKYLgmUXVJIkvwByvW+ECESDdWl2OiHDh5UGpupeKUFOZ2XcOsA+hqQGBonAHufKQXSnf59BJ zMDwLMWs8VAqecVk0cwjQhiyy/AX3En7SfO1LVb8rspDY26i3KqfvzwxWJwCoPueVrEuvJBV70NLA GK3jZXyPVlZJbAgYq4yL6BVVTrm7/MZUeQN9iqRMNQKcJBqQ1GbpBCSZKuuY0K10ncf97h6t7lt6N keuuWndP5UwoSBauExKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope8l-00GabC-CV; Mon, 31 Oct 2022 23:24:23 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ope6n-00GZHK-Vs for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 23:22:23 +0000 Received: by mail-wr1-x434.google.com with SMTP id cl5so6397415wrb.9 for ; Mon, 31 Oct 2022 16:22: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=w4n/PVXJaI0AZ90mJ+ujyPK1tladHQFvLZoHvifyNgE=; b=iriYmRi7F+gUWdk3CPDtwYWNytgMeCCV/+jNmQm6VV/pFm3r10jPG3b9nufXlYb46A r8nnGnkDk/PB4ktZNp5DFh+M3g9gSt9alapkjnhh96+ew4Yjuxtfv4b9fv8G0+Iv1jnf 90bEyDhop8d1D+CE3TihTTtp5mlp8Kpl/Rrl0DMCXYLgpdw/eFeUDYYwcEb+PK7jcnTE Zf5nRXuLiod6Pe4Cgqb48vJnkjpcT5YQEtBgW7zbQCbL2zNo0LsSeLwEUgOXfRWtSbCz hHvR7V6fWN0uylB3E+Hf80ugSYzmjZaUBhcWYRx/lXQccg88/fG/GvSwLJwV1dypLY6m T3YQ== 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=w4n/PVXJaI0AZ90mJ+ujyPK1tladHQFvLZoHvifyNgE=; b=AxGxMfzJa1nHAcqx8DGvFIxgPTAC8ki184w4m8rCsWjxzTPNYgL1cZhnFmirFm5QxK HTxtaOMEKie4aiTxXVbRG17G7EBvw//TergByYRh8MfoMuCNg6DUdyG8OnhSQjKUTLqa ExRHqmLJAOXdnsO8olcstv44sPaMOy25VBRxhHpQ91SWgDqzATVhyqIXVPYOI0jkJJ58 6g2PAg1sMdfzNrI542oV2u0ff4WEtFTnLoSISbItgFkZTT162+5NbX8tX279lTIWpLpe enYiGLji11quunwTVbEl8jZ4Mc2nZvYYVjip2qJFY8KPUHN2+N1p/I+hTLDE8S21kcL0 QOeg== X-Gm-Message-State: ACrzQf0JwUR6ZgMlrujdrAVje9FQUnvBF69Pa0B3i3Xg5MdiR6jxaX8P CfQZGiYINwugpXgJy3zQyoQ= X-Google-Smtp-Source: AMsMyM6TyZvntfj8dZLfSz4qg5QK2s6ccmOhWhLCF/L7jN7iiEWR70pxBXfHuyGjjbod1jZaStISWQ== X-Received: by 2002:adf:ed01:0:b0:230:d7c8:9a91 with SMTP id a1-20020adfed01000000b00230d7c89a91mr9737366wro.511.1667258538245; Mon, 31 Oct 2022 16:22:18 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:15da:d6ab:ec79:436]) by smtp.gmail.com with ESMTPSA id l24-20020a1c7918000000b003cf7928e731sm2190343wme.9.2022.10.31.16.22.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 16:22: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 v4 9/9] media: i2c: ov5645: Call ov5645_entity_init_cfg() before registering the subdev Date: Mon, 31 Oct 2022 23:22:02 +0000 Message-Id: <20221031232202.131945-10-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221031232202.131945-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221031232202.131945-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-20221031_162222_062322_030F3328 X-CRM114-Status: GOOD ( 12.88 ) 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 --- v3->v4 * No change 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 0a889283da36..c8999fc4f26f 100644 --- a/drivers/media/i2c/ov5645.c +++ b/drivers/media/i2c/ov5645.c @@ -1220,6 +1220,8 @@ static int ov5645_probe(struct i2c_client *client) pm_runtime_get_noresume(dev); pm_runtime_enable(dev); + 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"); @@ -1231,8 +1233,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: