Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2965275rdh; Mon, 27 Nov 2023 03:39:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGLFw3oWPOWBmhus93lVt1GD1ev6f1XtYIZhPe89aaN2YHjbKq1oZwHV6v3y7qphkBUVy+ X-Received: by 2002:a17:902:c211:b0:1cf:c9ca:501e with SMTP id 17-20020a170902c21100b001cfc9ca501emr2698901pll.4.1701085158857; Mon, 27 Nov 2023 03:39:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701085158; cv=none; d=google.com; s=arc-20160816; b=XGgsecwrHZkiyESTFUVH4ckcMhZB4vFIdTy9RmsNZIB0lCgQeNE8NgJ6j8gGkYeflI Avy6g2hiuz3vwIs2M8vcitWqMdKZ0273VyPdL8w3s/n9QnTsI6TW2yTGBnR4krOULVXC 7t5E6eRVdGSIcFxNzGIO/TDMRpFRoEpPxndSyzwwZb94RvCukkaFODd+r4cjx9d0D11J bDsNZliYe2VRazN923qCgho0m6C1ikjsKpHwOvJzrmtTiYJi5jpVjy0TyupD37AxOrP+ Ix75BeOidfOPICyYJlcOBB0KxydlGAeV1cc8i/nV3E0CfQPleGOh1jAn8RUlM1538wjp mwFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=CIIxT2VNJlC2c4a+mgTxpyxFpo9vemuPmAcs9y4scUY=; fh=J62ESyalGOkSwk/eYPes+v6AEXG7+xNXKdWcg5nCeM8=; b=b4n/bfX3r67isEXmCpeMQrYBEbt4mel8W0PhGggoM3gvBKo6Lqx8JUqBNwhSCbNat3 qGB8LvNbhXw92Y/7szFPhxIbGcIVwqxzsU9vdJlqH68N9UvZdDFY5OmMDk1j8tsprfc7 UkrcEOOPifEr+18fCjiYRTBKdfGQUZkMLOkoZpNDjBEJewgtm6XZMybChxW5A7dYLQM4 QiYdIazlFvEl5jNW1Nin2O7ugkWWRWCS6+odJnEOWFDXO1VWlpYAAN8r3DmqXERoMKzk KR7UVkR9QhtDHQPNPd1+xWEQIjNw46AWpPVAT02z7S1bFtveksEhlMmTlPOChkdyzp4c D3HA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id i12-20020a17090332cc00b001cfb1e1dc2dsi5977064plr.150.2023.11.27.03.39.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 03:39:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7040D805EAF6; Mon, 27 Nov 2023 03:39:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233285AbjK0LjD convert rfc822-to-8bit (ORCPT + 99 others); Mon, 27 Nov 2023 06:39:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233295AbjK0Lix (ORCPT ); Mon, 27 Nov 2023 06:38:53 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 643EEB8 for ; Mon, 27 Nov 2023 03:39:00 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r7Zwb-0002vG-1v; Mon, 27 Nov 2023 12:38:29 +0100 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r7ZwY-00Bvkh-VA; Mon, 27 Nov 2023 12:38:26 +0100 Received: from pza by lupine with local (Exim 4.96) (envelope-from ) id 1r7ZwT-000AAH-2o; Mon, 27 Nov 2023 12:38:21 +0100 Message-ID: Subject: Re: [PATCH v8 3/5] media: stm32-dcmipp: STM32 DCMIPP camera interface driver From: Philipp Zabel To: Alain Volmat , Hugues Fruchet , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Russell King Cc: Sakari Ailus , Laurent Pinchart , Dan Scally , linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 27 Nov 2023 12:38:21 +0100 In-Reply-To: <20231122073927.788810-4-alain.volmat@foss.st.com> References: <20231122073927.788810-1-alain.volmat@foss.st.com> <20231122073927.788810-4-alain.volmat@foss.st.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 27 Nov 2023 03:39:16 -0800 (PST) On Mi, 2023-11-22 at 08:39 +0100, Alain Volmat wrote: > From: Hugues Fruchet > > This V4L2 subdev driver enables Digital Camera Memory Interface > Pixel Processor(DCMIPP) of STMicroelectronics STM32 SoC series. > > Signed-off-by: Hugues Fruchet > Signed-off-by: Alain Volmat > --- [...] > diff --git a/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c > new file mode 100644 > index 000000000000..28ddb26314c3 > --- /dev/null > +++ b/drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c > @@ -0,0 +1,604 @@ [...] > +struct dcmipp_device { > + /* The platform device */ > + struct platform_device pdev; > + struct device *dev; > + > + /* Hardware resources */ > + struct reset_control *rstc; As long as rstc is only used in dcmipp_probe(), there is no need to carry it around in struct dcmipp_device. [...] > +static int dcmipp_probe(struct platform_device *pdev) > +{ > + struct dcmipp_device *dcmipp; > + struct clk *kclk; rstc could be a local variable here. [...] > + /* Get hardware resources from devicetree */ > + dcmipp->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); > + if (IS_ERR(dcmipp->rstc)) > + return dev_err_probe(&pdev->dev, PTR_ERR(dcmipp->rstc), > + "Could not get reset control\n"); [...] > + /* Reset device */ > + ret = reset_control_assert(dcmipp->rstc); > + if (ret) { > + dev_err(&pdev->dev, "Failed to assert the reset line\n"); > + return ret; > + } > + > + usleep_range(3000, 5000); > + > + ret = reset_control_deassert(dcmipp->rstc); > + if (ret) { > + dev_err(&pdev->dev, "Failed to deassert the reset line\n"); > + return ret; > + } regards Philipp