Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7035976rdb; Wed, 3 Jan 2024 02:18:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IENTV93AWAqWIq9Zm4NiVMfdyVIpwreKBKZ7EQLGgRy0zZSnHObGS4gk1vO6LrcZy/Vp0gb X-Received: by 2002:a17:902:8b8b:b0:1d4:c955:cbfa with SMTP id ay11-20020a1709028b8b00b001d4c955cbfamr1300333plb.37.1704277137039; Wed, 03 Jan 2024 02:18:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704277137; cv=none; d=google.com; s=arc-20160816; b=WoboZnB1sCTMDoOjg3G0uJbLkax1bS1VBzRjHD7HClDSEf10SGVBHgXtCYRWy6221j 6nPjMMMcW0o7M47A/QSv7MxBXRCbmsdccaUdM+wmrjED7Xf3Yr9m/PPjXtSiEsjPa3yt 4sDxIkeWXMlNV6lLJnk0ieBO/UqQ9Q9/2rK+sVbaJG+VCybvXkuQeyTYAJbKf++TLo4D tqGU51Wxdyc7w7nnpVKzWla+PF8SWbBbmgOaY1pZZ2foW/6pJrPFQ4STXKZyX8hacuEv 9ej4nvQkWtpVHnR5ay5KBgViMNb/7+t9VhEKYVii/axKpo6oYoQpO+U4lR5MpESnmKUO nkSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uuFQaGMTBPWRLhM2W+G8snQrXD6JdZtkXugYgsO/VEI=; fh=BQHA3urvnAgv0Z6dRmyyx76nk6kgY4Ga8f+MnfYj1NI=; b=pI4Ixwoui/83UecZ6ltR9o0DfwfgiIdlvJxlL4wQ4kdk5RjI9stfR/PBYnFaskpR7O /VId23tEeeyrWohgJOV2O9ZXokdxA0mZwI6OXdnf8i4frsSs8aXPjYmQRWfPmWhnhUMJ iCiAUxZeLew8LtBB5gQ8qRWBuMU7joPelfm8b8/UT6LpIUiWMX/tgv2HwToP0yVQJy5F YNEpFn3msP4qHqHQZZWqSIDFsugX5PF48eEM24nm9CcC/BgsIZF4srfN8NEhYnbbXAUs nm4rS6QlHq1Gr886ZIDC5u1cgccNdR19QDyvn44qzPjqNvErhcI+hZoOYWxJRCDArioQ OdBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JB3TyGPo; spf=pass (google.com: domain of linux-kernel+bounces-15379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15379-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a14-20020a170902ecce00b001d4322ed670si17423882plh.456.2024.01.03.02.18.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 02:18:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JB3TyGPo; spf=pass (google.com: domain of linux-kernel+bounces-15379-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15379-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 6FC34B22E0B for ; Wed, 3 Jan 2024 10:18:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D508818AF4; Wed, 3 Jan 2024 10:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JB3TyGPo" X-Original-To: linux-kernel@vger.kernel.org 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 F3F4318657; Wed, 3 Jan 2024 10:18:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C46BC433C7; Wed, 3 Jan 2024 10:18:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704277121; bh=Y3pBM4Uxbyl6bJL+EyV7rY92Ok2OHNDeN46fbDf5Lo4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JB3TyGPobr8IHhL2GlLPKFHPu24e3PGp0QET/v6IIV76JIslAi4GrtmjMHfpTx0qX haqxuH5qrXe60cRwhBaHFgX42TONYk93P3zuacq+7dtktdxT8NcVwdmLE/FuilI06D wlD7GOIHqtv/A8GySPXJTpF0kbHHCGs7aSELAmyVzUGXkG8wSDa2UaUg9NuAxus5CC HU/tTaZ1waH0P0FbVxtMITnpOhzOWUnZXwbqztvpkn2Gdtz6mSgY0vw0Z55QdQK1uy FGlmH3peDTgDHlPM/TOzTCb3e/n9g/ihsgMy05SkNksc6mZkyuBseBDo8pdQ5m2bDw uptE2pk5am1Xg== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rKyKY-0000kn-1x; Wed, 03 Jan 2024 11:18:35 +0100 Date: Wed, 3 Jan 2024 11:18:34 +0100 From: Johan Hovold To: Konrad Dybcio Cc: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Bryan O'Donoghue Subject: Re: [PATCH v4 02/12] clk: qcom: Use qcom_branch_set_clk_en() Message-ID: References: <20230717-topic-branch_aon_cleanup-v4-0-32c293ded915@linaro.org> <20230717-topic-branch_aon_cleanup-v4-2-32c293ded915@linaro.org> <90749db5-a803-4bf0-8543-f049249b1df0@linaro.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=us-ascii Content-Disposition: inline In-Reply-To: <90749db5-a803-4bf0-8543-f049249b1df0@linaro.org> On Tue, Jan 02, 2024 at 03:27:29PM +0100, Konrad Dybcio wrote: > On 2.01.2024 11:35, Johan Hovold wrote: > > On Sat, Dec 30, 2023 at 02:04:04PM +0100, Konrad Dybcio wrote: > >> @@ -3010,10 +3010,8 @@ static int camcc_sc8280xp_probe(struct platform_device *pdev) > >> clk_lucid_pll_configure(&camcc_pll6, regmap, &camcc_pll6_config); > >> clk_lucid_pll_configure(&camcc_pll7, regmap, &camcc_pll7_config); > >> > >> - /* > >> - * Keep camcc_gdsc_clk always enabled: > >> - */ > >> - regmap_update_bits(regmap, 0xc1e4, BIT(0), 1); > >> + /* Keep the critical clocks always-on */ > >> + qcom_branch_set_clk_en(regmap, 0xc1e4); /* CAMCC_GDSC_CLK */ > > > > I still think something along the lines of > > > > /* Keep some clocks always on */ > > > > is preferred as it is far from obvious why a camera clock would be > > considered "critical". > > > > Or perhaps you can come up with a better description of why we've > > decided not to model these clocks and just leave them ungated. > Technically they're not really super critical if the hardware is > not in use.. It's just that at one point Qualcomm decided to take > the lazy decision to keep them always-on downstream and we seem to > have agreed on going with that, instead of pm_clk (remember my old > attempt at getting rid of this on dispcc-sc8280xp?).. > > For now, I was just trying to clean this up a bit before looking > into a better solution for this (probably a whole lot of pm_clks > with some clever handle-getting due to different ways of grabbing > clock sources.. by-name vs by-index vs global lookup that we've > accumulated over the years). Yeah, that's fine. I'm not saying you have to come up with a better way of describing these for this series, but I find calling them "critical" throughout is more confusing than the current unspecified comments about leaving some clocks on (i.e. without a proper motivation or even hint about why they are being kept always on). Johan