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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B1C6C25B6B for ; Tue, 24 Oct 2023 02:42:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232344AbjJXCmM (ORCPT ); Mon, 23 Oct 2023 22:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbjJXCmL (ORCPT ); Mon, 23 Oct 2023 22:42:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5897910D0; Mon, 23 Oct 2023 19:42:04 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC879C433C8; Tue, 24 Oct 2023 02:42:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698115324; bh=Axzhu/PU5pIRjTDxygVB5J4OxaQMp9aGqFHCG5Bu1kU=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=oE/fU/s40CdpBaHVlUL5Y0CN8wNwlg+lpdRdYH9dbEdA95IztWccl8K8dxFGEAarM 8k0FuOcks6KJTk5vPaKS0saEx4q0G4n/u/5n1iaW2cd3849kie8qNSwDZPPzhwUK+A Yqmz9otXyyJQe55wZCkG6Th539MCh5Ow1XFay7BBca8GZ3IKnCc6Kk0pmkJvbzDiI3 YJC6x1zFu5PUDYxrMY3a0rAGu3eICRGfvE9/FESbBBHjYoWTEBnioW2aZJmfeqpuq1 BMeQBb0fPaYCVxTs0bxfvTv2xhNXDC1B3PGxuTJJTuNUF6mpxSwd3ImTCuk/PGJjnE TnsZdOOaM+49A== Message-ID: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: Subject: Re: Question on pre running clocks From: Stephen Boyd Cc: mturquette@baylibre.com, Arun KS To: Arun KS , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 23 Oct 2023 19:42:01 -0700 User-Agent: alot/0.10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Arun KS (2023-10-20 00:09:05) > + linux-clk >=20 > On Fri, Oct 20, 2023 at 12:37=E2=80=AFPM Arun KS = wrote: > > > > Hello, > > > > Lets say there is a clock which is enabled by bootloaders and is pre > > running as linux boots. > > Is it mandatory for the client drivers to call clk_prepare_enable() on > > them to initialise the enable_count to 1? Yes. > > > > Or is there a way we can specify to the kernel that this clock is > > already enabled by bootloader and initialise the enable_count for this > > clock to 1. No there isn't. > > > > Because otherwise, clk_disable() prints a WARN() if a client driver > > uses clock handle where clk_prepare_enable() is not called. > > > > I grep through the code, but could find any details. Appreciate any poi= nters. > > > > Regards, > > Arun