Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1064956rdd; Wed, 10 Jan 2024 07:41:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEf+NYltToUSSWfcO9JC74c63ck8xtSJUB5RFwvM6G4+KI5Gv84MJAPAMQoNUEnmkMLI2b1 X-Received: by 2002:ae9:c118:0:b0:77f:38f2:2d99 with SMTP id z24-20020ae9c118000000b0077f38f22d99mr1452595qki.83.1704901272024; Wed, 10 Jan 2024 07:41:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704901272; cv=none; d=google.com; s=arc-20160816; b=JJ4USGEfDijKbvnWBH7Hf7Lj+r9GEVRySxDp81TXM9dD+K13KG/JufKOpyI8qMYejy TiqpN3vqWFJjbQqG+eWYXuFUqeCSkHCAUDx76Y/OPnSa+uNHnvAMon3yFWmRVOQM/oRO jaUD1DbOFxe9C0aALtbNmkwbs88tTYcu7MVKiIXEAuiJI8+68rS6ncUwEhHSMiLrWE7W SlIbctH0UGsDTK3YHNzYatrNaSTE1cKdYizE55ZBWnMldhOsnsd76EaswjLNnQhUGBZI rID5pC62nJsErJ2w3kjmJP3leRwn7PzIDapJll1HZfdczHn9O7K6RGmuhoxzpCpVd8+7 ffJA== 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; bh=3AR0t+OGrtKI2OQ3ihoWjSswwNtgBBngScBfM5l5hXo=; fh=Q7ngJ5gTtcIHXb+SuZISCjXtI/CPQUeR784Ytj/RtVA=; b=ENkPRL2l9P3OovI/gbjsh0K/rIxP8B/bThrIk/lTTqNS9vDFU8el6KYPgs9SFrh9zJ 49Q0A+R9m2VFw1yrrTJ41avzbJY7GWWv9o2OKtGELhTwu0d/znboRYAR7mtROk/mC6CT /6mUGaCj5cVMVDfHiNsmi+r3KZEiCpC81VM9QJXMIVebMmjNZyaSJNpiayKuEXHaYMN4 7RnscSDveOMzvUIMz5rohu+SpEthgtsC7WRTLM+Qw69XTi6kkHZ87tSQqCd9wGEI5wgb g4OtTIxt4MLBw/ZklFJtB9S4HQ/zdW81yLwKZ7C4kXVM2/3Qeg7y1uAfiO4ULvuzLBo2 WgkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-22438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x1-20020a05620a098100b0077f56993a3esi4205451qkx.377.2024.01.10.07.41.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 07:41:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-22438-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22438-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 C69B91C225E3 for ; Wed, 10 Jan 2024 15:41:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA6CE4C3BD; Wed, 10 Jan 2024 15:40:32 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FC6B4BA8F; Wed, 10 Jan 2024 15:40:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 819312F4; Wed, 10 Jan 2024 07:41:15 -0800 (PST) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DBF743F64C; Wed, 10 Jan 2024 07:40:27 -0800 (PST) Date: Wed, 10 Jan 2024 15:40:25 +0000 From: Cristian Marussi To: "Peng Fan (OSS)" Cc: sudeep.holla@arm.com, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, ranjani.vaidyanathan@nxp.com, glen.wienecke@nxp.com, nitin.garg_3@nxp.com, chuck.cannon@nxp.com, Peng Fan Subject: Re: [PATCH V2 2/2] clk: scmi: support state_ctrl_forbidden Message-ID: References: <20231207093345.581048-1-peng.fan@oss.nxp.com> <20231207093345.581048-2-peng.fan@oss.nxp.com> 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: <20231207093345.581048-2-peng.fan@oss.nxp.com> On Thu, Dec 07, 2023 at 05:33:45PM +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > Some clocks may exported to linux, while those clocks are not allowed > to configure by Linux. For example: > Hi, > SYS_CLK1----- > \ > --MUX--->MMC1_CLK > / > SYS_CLK2----- > > MMC1 needs set parent, so SYS_CLK1 and SYS_CLK2 are exported to Linux, > then the clk propagation will touch SYS_CLK1 or SYS_CLK2. > So we need bypass the failure for SYS_CLK1 or SYS_CLK2 when enable > the clock of MMC1. > So I was puzzled a bit at first (as said) by the fact that here we silently swallow the failure if the SCMI Clock cannot be disabled, BUT then I spotted in include/linux/clk.h /** * clk_enable - inform the system when the clock source should be running. * @clk: clock source * * If the clock can not be enabled/disabled, this should return success. ..so I suppose it is fine for the CLK framework at the end. My next remaining question is why are you not doing the same when (ret == -EACCES && clk->info->state_ctrl_forbidden) for atomic_ops ? I.e. in: clk-scmi.c::static int scmi_clk_atomic_enable(struct clk_hw *hw) Any particular reason (beside not needing it in your particular case...) Thanks, Cristian