From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D649CC4707C for ; Wed, 10 Jan 2024 15:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1ANnWRMFWPZ1BnwZmVUoI7vQUIyb0RXlqjMvwJeiuAU=; b=wx/Sbnzx89VD5z vAbIU0qteP7DP4g4sEhthOeJ/+aTrITzzqAMSC0n4zv2hUIxflSiJKqrVC1mb7vxASt2Mcpa3KMPo sttJZIrHCXlFtF2e72fsJa3BK369Wl92GToVF6+fGQt+Dps05CBrfycKQ3eRMuUCN3wcIuhL7kk6E QVZU3Lr49kpmvTgOE0o1942iL6if6CX03CQYJ2TR1aUcrtyFvPnOFk2qSsVM5JuULqGv/B+8LJEd/ mvA6UaXSrsNGskTNJBEQ0L5T/mqotnrB40OdZQ9ORfy+7Xw9RoGvftjQakds3K02tWTojPOqFwGvj U5jEFeo/seYCdvs3AO9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNah2-00Ce4A-1L; Wed, 10 Jan 2024 15:40:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNagz-00Ce2m-0m for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2024 15:40:34 +0000 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231207093345.581048-2-peng.fan@oss.nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240110_074033_325943_12EAF2A7 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel