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 E1D86C6FD18 for ; Mon, 6 Mar 2023 00:27:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229579AbjCFA1K (ORCPT ); Sun, 5 Mar 2023 19:27:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229526AbjCFA1H (ORCPT ); Sun, 5 Mar 2023 19:27:07 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A032D11170 for ; Sun, 5 Mar 2023 16:27:06 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id k10so8095044edk.13 for ; Sun, 05 Mar 2023 16:27:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=UqGQIswusbX1+IzXDd2bRK/LnduXXQOEOgtMhwl5Wlg=; b=UX2CHZiIi6pGHy88xWA/XlAZk/opFkJbEZxlSGe6AaGbW4bwr/EZ7BoyZvyVzKlNJe zAydwlciy2P7Nsh5Gkq/RcunYLbynzkSrdtJihMe8uuEGRGLGsXxid6UDF1zsU8Y3roE HSWdq4bCLkvsxduJ79auB4G/94SxFgSni7mlxM5ROq+jiEIcYu+5SWUnbDz8K0ize85r QUhXZF2OVLIK6fErNnJ1aidqYGlb77vfWVH0zo5y6iXJAfCjXKe6Bzn6cm0TcvARRGGd N1TiOd+NTw95/SCR+GFhFi3xlkhl6YWEauTAPyq+KImtQ5cLObwHnCIjEZ8t5gCDOgSd qLfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UqGQIswusbX1+IzXDd2bRK/LnduXXQOEOgtMhwl5Wlg=; b=PUWPFX5CwTU1SDE3iLf8ZzrOLUtPsZJPsNLCSSiue/HDiXYGnS2Di8x9H7teUVizOw AKSvDqNo8wWN4rfR4RDZY84u/GHTQhqPu7QQWywQNpKm1HVu0BY2K0yPWU5/+KUfe9QF BVM6FnWmKFsjXn3Va0kb1QBGYekSfkLmemhu4SNiaFJ8KwZfBepmymTcttMQUCOlkz6x YgzTK232yTYdJm33Zq+cQD6k9zOfYMqGXHMqKoQlUutBqdGmPeHjuKkqqrAQIP2ryhQy w9/DY1W5HkeMDVK9hxx9N6T3CjDHT9c9K4Mv5AL4/lwAWOlES0zms/Sw98t2uSfq6gRW lQMg== X-Gm-Message-State: AO0yUKXJP8mqDCa5tUE1EgoBWHQug/NofJ4hFsthsHCzq7XQkG0wXACE o3C5cbSFa5re44M6uJCokMxJNGbS536v5Cz7Wos3EA== X-Google-Smtp-Source: AK7set/Y0bMWzeij9P4IUe9ITLEEryvEsf4976fwFOF2+jK6GXHhgzHlrNkzgPKxoASS1zcx7XLr2w== X-Received: by 2002:a17:907:3e0e:b0:8b2:a42:5c3a with SMTP id hp14-20020a1709073e0e00b008b20a425c3amr11471846ejc.70.1678062425132; Sun, 05 Mar 2023 16:27:05 -0800 (PST) Received: from [10.203.3.194] ([185.202.34.81]) by smtp.gmail.com with ESMTPSA id 22-20020a508756000000b004c0ac1df341sm4364649edv.50.2023.03.05.16.27.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Mar 2023 16:27:04 -0800 (PST) Message-ID: Date: Mon, 6 Mar 2023 02:27:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH RFT 01/20] clk: qcom: smd-rpm: Add .is_enabled hook From: Dmitry Baryshkov To: Konrad Dybcio Cc: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Shawn Guo References: <20230303-topic-rpmcc_sleep-v1-0-d9cfaf9b27a7@linaro.org> <20230303-topic-rpmcc_sleep-v1-1-d9cfaf9b27a7@linaro.org> Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/03/2023 02:21, Dmitry Baryshkov wrote: > On Sat, 4 Mar 2023 at 15:27, Konrad Dybcio wrote: >> >> From: Shawn Guo >> >> The RPM clock enabling state can be found with 'enabled' in struct >> clk_smd_rpm. Add .is_enabled hook so that clk_summary in debugfs can >> show a correct enabling state for RPM clocks. > > There is a small problem with this patch: now if the bootloader leaves > a clock enabled for some reason and there are no Linux users for that > clock, clk_disable_unused_subtree() will consider this clock disabled > and will not disable the clock on its own. > And at this stage of smd-rpm platforms support I think we better off > finding missing clock consumers rather than depending on the > bootloader for some of the setup. Argh. And then I understood that without the patch clk_core_is_enabled will shortcut to core->enable_count, which also means that the clock will be skipped. But now I have another question: since r->enabled follows core->enabled_count, can we get rid of r->enabled and switch to core->enable_count? This might mean adding clk_software_is_enabled() function for your patch. -- With best wishes Dmitry