Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp109919lqe; Fri, 5 Apr 2024 14:32:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvzjqGWVJavcFPY6WyrW/aOOAUAg2EF20qDFwwPm6fDnwot8X+D4XZBI7mTbtz0gyQ6JvHurAOjfIwwOYXo/E5sb+JnDPcJDGS+OBoPQ== X-Google-Smtp-Source: AGHT+IGMVBMNFv4lJgGlJZGUGYRUbAfJqyrPihSEGTz4zSRYirkeqI1stTdRVNYr8g7xlxZ1LXHp X-Received: by 2002:a05:620a:13f7:b0:78d:511c:1941 with SMTP id h23-20020a05620a13f700b0078d511c1941mr1197293qkl.19.1712352743815; Fri, 05 Apr 2024 14:32:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712352743; cv=pass; d=google.com; s=arc-20160816; b=gIXsv+pW2w/0/AkZDQ++4gbMecPNadMnKnxYQHadtVE7HrGZ8DgvlGlxp1//2h2jPH E+AHsa2JY/zf4L+VapR9p54qNIgCBiFN44dgDucLqxJv1ske2w7V6EnlpnpNpAKhuJfi D5E6YQmJejYhUqw4eAbX/kEpfsH/SRajSNdrVce7+TagSXesol95LFpUPQLHiW245TyC UaMFPBU9EzV0VASSP3HrifI48V221exLCZgZvODqiW47n2fALCJWpMwmZKIVs3ahS8+y Yl5BzhVzHtgWtPuVkh9TEGFGVa0o9PQIrJQzUu/5QqV3dqOEL150FbKB6+/cK9Rx8tl5 0Y6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=hsZu3xdis3+8ixCZGH/UiCiP/10YCp3O3EdgM07+RyA=; fh=fpTsafrw8oWn7ckceQD3tS2Mmnx6ZFn71ucczkjqRXI=; b=H9Sw5HQRFeZ0DJdreRv4XEme7qBgDITc+BVNxCpZ302MtffXharoF/u8NssoerTgcY dqG4P8lCAujEzwh7wC+ChMnJsGjQYoI4oDCM1y62mEsJ015KwW4+q5JfZc0zSP0fjUxd y9I+j9xbwhrScg5UfCnGyyGLjEnnmYOWHGRedaL2/xSlgb/bcCQMqOogJWLa6uewMwkC CYTe1LF54dGkfjd4AgSiVo+5B7pohrW+nOSv/iaEnQavUKGRwvUlcE+rD/QO31gNnAXj aHEG1BrxzGLdEnAyFx34NsNYUzB4YuXJG98K0z0dFm6/HHisFjYSblxas1yNviWMEDTd 2c9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nXY60WCp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h23-20020a05620a10b700b00789f31fb22asi2752646qkk.535.2024.04.05.14.32.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 14:32:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nXY60WCp; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133596-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8A13A1C21491 for ; Fri, 5 Apr 2024 21:32:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EC59175552; Fri, 5 Apr 2024 21:32:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nXY60WCp" 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 7566C1C36; Fri, 5 Apr 2024 21:32:13 +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=1712352733; cv=none; b=Yr5Ti2m5mGLO6bNzr1tUaMk/18R+2uXCDpcAG5UX9z8om3CDqJdnznLr+dmaCOaxZw2wGLJYN66a4MYOkpx3Ml2YdlgGA5ouQPZ/uLIxTVHEFyj61tVlbmLUdYQZG0FEkiMvg0ei7Ew/yM6s+3h4fk8w0mIxhJeP83TQU4PLy3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712352733; c=relaxed/simple; bh=hsZu3xdis3+8ixCZGH/UiCiP/10YCp3O3EdgM07+RyA=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=PVeAE156L+lhQzVjjITR/x2JBJJtVV0zQowt8suUuabdGn3qWNWaWeYYh/Y3q4Ijx4dXkICXdGUCvVbqfbzGzHD86UDSKYNNf+Uf4GuuD/MYTj0c+9drNBSz7UyHd6RcdSDOM196h6Ka4KNwyNUWa0l23/e44KD/Z5I+6Pfi34s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nXY60WCp; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF77BC433C7; Fri, 5 Apr 2024 21:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712352733; bh=hsZu3xdis3+8ixCZGH/UiCiP/10YCp3O3EdgM07+RyA=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=nXY60WCpCpc/RzvaYPjvrFvMvHQbDTZNnhzFb453mtmnytCtmJqKr7OMPuFx2RkaY YZPm3PQS3c+iv/LjzhXwmjJkvD6FwuvllQ5cFRB6yw5ntpjzalKCk1UHLBGS9y5IAz fJwaO0PFjeSzseJ6zwpLwpejCO4p+NzKGX2b7ajGPbY00nB+hZGfr+XYQtKAuKbbMs 8gRiozxMEbfBiEn3iyoQt+MD75Slj9fRdl9H6EXH8NpfigZpRrGFbEmmED2GkYdUB6 69wXbIRtDXKlpeVsC4POG+V6xSJvQ6E44cvfihZoF+xQKVacdY9orwss1C4FIPcKDs CrXMRI8X+/vrg== Message-ID: <5a6c424fafd7ca1281f4bd771b8c8219.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <66968793-d0c9-9f31-6616-f67fdadcd6e5@quicinc.com> References: <20240229-camcc-support-sm8150-v1-0-8c28c6c87990@quicinc.com> <20240229-camcc-support-sm8150-v1-4-8c28c6c87990@quicinc.com> <18567989-fb60-49ae-92e6-94e1bc2fa1c7@linaro.org> <66968793-d0c9-9f31-6616-f67fdadcd6e5@quicinc.com> Subject: Re: [PATCH 4/5] clk: qcom: Add camera clock controller driver for SM8150 From: Stephen Boyd Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Ajit Pandey , Imran Shaik , Taniya Das , Jagadeesh Kona To: Abhishek Sahu , Bjorn Andersson , Bryan O'Donoghue , Conor Dooley , Konrad Dybcio , Krzysztof Kozlowski , Michael Turquette , Rob Herring , Satya Priya Kakitapalli (Temp) Date: Fri, 05 Apr 2024 14:32:10 -0700 User-Agent: alot/0.10 Quoting Satya Priya Kakitapalli (Temp) (2024-04-04 23:27:29) >=20 > On 3/2/2024 9:43 PM, Bryan O'Donoghue wrote: > > > > Alternatively switch on the always-on clocks before the really_probe() = > > but then roll back in a probe_err: goto > > > > probe_err: > > =C2=A0=C2=A0=C2=A0=C2=A0remap_bits_update(regmap, 0xc1e4, BIT(0), 0); > > =C2=A0=C2=A0=C2=A0=C2=A0pm_runtime_put_sync(&pdev->dev); > > > > There may be corner cases where always-on has to happen before=20 > > really_probe() I suppose but as a general pattern the above should be=20 > > how we go. > > >=20 > I have rechecked this and see that this clock is PoR ON (i.e BIT(0) is=20 > set upon power ON) and it should be kept always ON as per HW=20 > recommendation. So even if the probe fails we shouldn't be clearing it=20 > against the hw recommendation. We are setting the bit here again to make = > sure it is set when the driver probes. >=20 Yes, always on clks should always be on. We don't turn them off if the driver fails to probe. We should probably print a warning or something if the register write fails, but since this is mmio it won't fail, so just make sure they're on and move on.