Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp577986ybl; Sat, 18 Jan 2020 06:31:57 -0800 (PST) X-Google-Smtp-Source: APXvYqzc0HB9Dztoo8pjEWlXaGOUnOYZGtI4x0d9XGPjlQqvUawu+bjv3IqIUlUewdWHOmY5cVzF X-Received: by 2002:aca:ab50:: with SMTP id u77mr7027166oie.36.1579357917761; Sat, 18 Jan 2020 06:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579357917; cv=none; d=google.com; s=arc-20160816; b=ap9VQBTBW4423sD1X6u46JhMAM6z4xEOttG4C0WLWPureB/CCRfVvw0LJ6O/5JijEV GlaD3kYXcDHWA940QIyjGspeovbgXIh47FrHxEG1mnR0WAnynCkdiwL0wmqzCrovQnd1 UislWBaQH9BGw8RchYP3yhOtMNSdWKuwZieEJE4/pSVSXx0ipcJeOvBgyNSJzsPzTkWJ 7uorMLKK81iSdAbSLfJwm7TIVKXJv1c1+wX8zodpqs79IbIaPUNGDJLmN2NlQhE7V1rL +bRt8Rhyis3Fd+tVO3wxUY3oIinXzia7uNi3qvABJp5l/xcfhMjWbB10kxdd6OtvuUPK qKCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=P05/Fe5ON7Dq7EKDLu0fKGf9DbEGLWgTCrktfzdGMcc=; b=so+zDAH2bSRAdjpfWliNmOon+pkgibhurGmaR6IWeBExwcX4BLFu7pfTd5ara8T5UY IkqjwcQup2nanXZM4N71kfy1Wj2nj/PRWdBOR1WZBR9zNqnDZkwC3CS2mHqLP+jabwS/ tLFlWmjVi6RF/vqWnpJVMe+FhLAZ/q1rtCLCZo3Mipw4RdfFGEd/slUBSc+EguJNJJog 1a+sxQphhgpGKUob60+hU+7pHpTWgP0HJ1tJrR9zSuuTeo9YQBz7+haCfAZe7PpHF503 LLMl3/XcqyxXz5BhjXHcj726i848FmHfX2QdTaxtZZawGbAccNSIP/2Fe3Re8WUlwMpi cFSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i0S03MHU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si17184017otq.21.2020.01.18.06.31.45; Sat, 18 Jan 2020 06:31:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i0S03MHU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726425AbgAROax (ORCPT + 99 others); Sat, 18 Jan 2020 09:30:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:53172 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgAROaw (ORCPT ); Sat, 18 Jan 2020 09:30:52 -0500 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09F202469A; Sat, 18 Jan 2020 14:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579357851; bh=jfvpugoRaJiaAZmEMxDtm22xX+OLmTaCZAns9JDGkys=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=i0S03MHU7UpyT/JtNyiZqYkXMqCl0L7m3VILZk0LrEsxiEP/h7/21q3ekz5GpRAsp VB8BP6+LV0OZh7K0oyrxYE3YrGQRduRgNd3om4/rV1Tf7KqqqUse9g/KcANpAmimS8 FwPOLxoMebXZ11T9+4dWQ+2ctTmdGV2SJ3dD6caI= Date: Sat, 18 Jan 2020 14:30:46 +0000 From: Jonathan Cameron To: Fabrice Gasnier Cc: , , , , , , , , , , Subject: Re: [PATCH 1/2] iio: dac: stm32-dac: use reset controller only at probe time Message-ID: <20200118143046.4e6a6b95@archlinux> In-Reply-To: <1578921266-6025-2-git-send-email-fabrice.gasnier@st.com> References: <1578921266-6025-1-git-send-email-fabrice.gasnier@st.com> <1578921266-6025-2-git-send-email-fabrice.gasnier@st.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 13 Jan 2020 14:14:25 +0100 Fabrice Gasnier wrote: > From: Etienne Carriere > > This change removes the reset controller reference from the local > DAC instance since it is used only at probe time. > > Signed-off-by: Etienne Carriere > Signed-off-by: Fabrice Gasnier Makes sense. Applied to the togreg branch of iio.git and pushed out as testing to let those autobuilders poke at it for a few hours. Thanks, Jonathan > --- > drivers/iio/dac/stm32-dac-core.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c > index 9e6b4cd..4d93446 100644 > --- a/drivers/iio/dac/stm32-dac-core.c > +++ b/drivers/iio/dac/stm32-dac-core.c > @@ -20,13 +20,11 @@ > /** > * struct stm32_dac_priv - stm32 DAC core private data > * @pclk: peripheral clock common for all DACs > - * @rst: peripheral reset control > * @vref: regulator reference > * @common: Common data for all DAC instances > */ > struct stm32_dac_priv { > struct clk *pclk; > - struct reset_control *rst; > struct regulator *vref; > struct stm32_dac_common common; > }; > @@ -94,6 +92,7 @@ static int stm32_dac_probe(struct platform_device *pdev) > struct regmap *regmap; > struct resource *res; > void __iomem *mmio; > + struct reset_control *rst; > int ret; > > if (!dev->of_node) > @@ -148,11 +147,11 @@ static int stm32_dac_probe(struct platform_device *pdev) > priv->common.vref_mv = ret / 1000; > dev_dbg(dev, "vref+=%dmV\n", priv->common.vref_mv); > > - priv->rst = devm_reset_control_get_exclusive(dev, NULL); > - if (!IS_ERR(priv->rst)) { > - reset_control_assert(priv->rst); > + rst = devm_reset_control_get_exclusive(dev, NULL); > + if (!IS_ERR(rst)) { > + reset_control_assert(rst); > udelay(2); > - reset_control_deassert(priv->rst); > + reset_control_deassert(rst); > } > > if (cfg && cfg->has_hfsel) {