Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1158850lqb; Thu, 30 May 2024 01:53:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW23VDZN7I5vt8wl/Iv8jX58uIuP96K8BWpMzadkCOwow4RMBWw9mkp8Y4g1smKdqOx9E5QDCW4PFVyOmWB7bW2Zy3aBHKt8Zpv8pRTiQ== X-Google-Smtp-Source: AGHT+IFqXyR6iVZnCrDEuQHJVd5XGlJTUwO+9qgMb06w/MEro0exhXUjrnmToNxpGA+s0R6nnQAY X-Received: by 2002:a05:6a20:5a96:b0:1a9:c4cc:721d with SMTP id adf61e73a8af0-1b264635bf8mr1139897637.57.1717059229870; Thu, 30 May 2024 01:53:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717059229; cv=pass; d=google.com; s=arc-20160816; b=OFJ+f9ix1mWMQMVAg2VNBsHiHLUpXBAGkBStfavvse6tNVL8GfZQcyPIjHfQedux/w o7UVMlqp8BWjzPtL/WyWSwj4XwgNrBfOHfj0LmAkEKUzOX8VrfqMnVnKTAYQpnV6Mft+ JkFtoQ3lU1jh7DSAInhmIR31yaif6PKLRAvEDEVnMsMZXS/Y4vtSAKuKF2SkaIVxD3Vb 1qGXDD+1euZzvDzJe7Ojgl2j2lVRSwPNIWbmgO1RK6TNlaK1dTa9L7NhhDxFsitzglYk ptBpSV3qq6A+0+8MTPziDOfnpRdTHO6KEWY9Xliq96GYtm6K2y/BCfIofPFTI6z9TeHa PNxA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SpXEOK/bFoUSWD887y9mfItvAjsCFfH7X/3rFkeMLG8=; fh=KUuPOpw0IyM8pbeqiieZ62jf/DwruDIjwoIl6lgdu1o=; b=eHO9JnETjf/LzrjDqETHi70OAEDX1SZMTBJn1ZRT8YRM427eCsU/sPzSf+nHecjp5G tE8KTi29k/QF2WaB1+FkZm7TZbKQWfDtuKvRo0dJmJ0VhaPNUrAviEzJGlvYnzJe1bLd 9pWlprlE/dLoX7Ynv+aEHj5ZYUSIMo7nFMIhrm5sh3QZkHD30FDCO9aOqDC1UvPTn1aB Vbl4QQm9m74If69SLHi9AAIsLkdqR39Ic+W/7RyymlY35dETxr5JRzl1PCeHFWC6Py3E NusLS9NYoKG0O3f9+nhyBQQ3AXCe1qHhsRgf7ao9BeqbwJaSLyOlMo4ZcJP+28F5s84P MJbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qJdjKfxu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c971919si114817785ad.314.2024.05.30.01.53.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:53:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qJdjKfxu; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 501B4B218B5 for ; Thu, 30 May 2024 08:51:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 717FB6F316; Thu, 30 May 2024 08:51:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qJdjKfxu" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8DEA81761BF; Thu, 30 May 2024 08:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059088; cv=none; b=pM5pOmuI0jY9qJcL0o8kCPy13fOTOHrByS+FoyL1ltgVKs56ppZafWodf9AMI7WfB/czVPz4VGVY3CvHMwIXF5To3mz9BGgmtN2rtVr4oOMBi1WwK/giYDa+exLe7aUWAxk1oZNoSWRonZxMDIuV7lZ+mNVRTQ/sOvN2oyKJaGY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059088; c=relaxed/simple; bh=12lD408jDSRLnkwKIW9yHUd+rx1knohzy66UIp2Jx8Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GD3MFwK1RkS6KN6wbFjg0yhW/BgjZg/ecoIZEaXYn0nZhIW3vFP4zDHwVoMF/Qfc+RaL6iCiWKD6DeB12QSNxu6b/50LLrdNN94TGmjus65tej17MdfhYguXiUGXKmdRVazBxX9fSDizLrmlRX9rMXfVTzvuCI1jpCh6bfPcqtA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qJdjKfxu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60F18C2BBFC; Thu, 30 May 2024 08:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717059088; bh=12lD408jDSRLnkwKIW9yHUd+rx1knohzy66UIp2Jx8Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qJdjKfxu8S49zrrbS8zrKI3n+RFs0HhC2z+kEIfl1woQ8vqzCl52oHIKHIh+aTEt3 bmsvFlq7lvLJCdt9SYyECsLXZ+s3W67FLjY3L0n08O+vzNbZct9vQEnV6XYD/lVrtt LCWzq1hFjXCyhN5ilyruZzp2ZDqFTUYfbOqfBfLRmKD9WCfjBijHdaD9dTq6qWiVpm /Ykf4etC7QbQZS4lIBKwbV9mHATzNcN74L8bMZ/lmZ6e61T9dnv1a0sE2pOav0eaQu /fXV1j7ZcDzPbKIHZLRUlQiPxGcONkVRlp+5qdtH83OHuXDXCG65I8eow0keU4z6m/ QWaOdL6k8ykbA== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sCbVP-000000004g3-2xc6; Thu, 30 May 2024 10:51:28 +0200 Date: Thu, 30 May 2024 10:51:27 +0200 From: Johan Hovold To: Andy Shevchenko Cc: Johan Hovold , Lee Jones , Mark Brown , Linus Walleij , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Das Srinagesh , Satya Priya Kakitapalli , Stephen Boyd , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v2 03/14] mfd: pm8008: deassert reset on probe Message-ID: References: <20240529162958.18081-1-johan+linaro@kernel.org> <20240529162958.18081-4-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, May 30, 2024 at 11:34:55AM +0300, Andy Shevchenko wrote: > On Thu, May 30, 2024 at 11:08 AM Johan Hovold wrote: > > On Wed, May 29, 2024 at 10:45:40PM +0300, Andy Shevchenko wrote: > > > On Wed, May 29, 2024 at 7:30 PM Johan Hovold wrote: > > > > > > > > Request and deassert any (optional) reset gpio during probe in case it > > > > has been left asserted by the boot firmware. > > > > > > > > Note the reset line is not asserted to avoid reverting to the default > > > > I2C address in case the firmware has configured an alternate address. > > ... > > > > > + /* > > > > + * The PMIC does not appear to require a post-reset delay, but wait > > > > + * for a millisecond for now anyway. > > > > + */ > > > > > > > + usleep_range(1000, 2000); > > > > > > fsleep() ? > > > > No, I'd only use fsleep() when the argument is variable. > > Okay, this is basically the same issue as with use of dev_err_probe() > with known errors. fsleep() hides the choice between let's say > msleep() / usleep_range() / udelay() from the caller. This, in > particular, might allow shifting constraints if the timer core is > changed or becomes more granular. It's independent to the variable or > constant parameter(s). Whatever, I'm not going to insist. I prefer that developers are aware of what they are doing and understand the difference between, say, usleep_range() and udelay(), instead of hiding things away in obscure helper functions. Johan