From patchwork Mon Oct 24 18:33:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13017950 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 0783DECAAA1 for ; Mon, 24 Oct 2022 18:35:18 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kAeBEL3GpovU1cqG+hjV0OjWmpkw+j6WZkjJBcrEIJI=; b=WVmEcD0BeEJxzb iNi7CHdMu/eyVdyh8Pb241k0+nETwWZzlsXw+nQsLike+VtuMUqkAF7KAgibigJnSjjwC9dErYen6 G+8nhNqcgJgnXxhoF9zSaf9McNHzlJlE8dz/hYLP7BjDbIlVpuwiMgKQ788HNIk13jn/JDx/MwP5c y+nTgZ0bQ+BJVZm7HGn1EjbJkb6HuPbeutQETgXZdLkP4Qh24KaI/HHpVxJiC6IRL6B/JLFBehU72 n9X1cYv/1FeVgmbGA+UaWMU7qIcguIHs7ICHzwfAfPXm5aPjmzd8GuWRLTUnD7YPsyMyaXIHrRjWW 1myqQJyGofHvY8xD5BTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1on2HC-002fcU-Mm; Mon, 24 Oct 2022 18:34:18 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1on2H9-002faU-DZ for linux-arm-kernel@lists.infradead.org; Mon, 24 Oct 2022 18:34:16 +0000 Received: by mail-wm1-x32d.google.com with SMTP id t4so7041134wmj.5 for ; Mon, 24 Oct 2022 11:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u/us6so7a7L/wAT5CX3+5Z/jO0OFN3Rtpb2Ic6XDIGg=; b=tYTUZ5NTpMo0q3fxgyh+J1efpmkcEl5aAVtNKf8717N3Nu1eLt0N4dwQamcO8K5dj/ s5tKaPClYuOTOVPrKwNhnaVbWFADG62EweuqPDDIncVDuBv1icozaf89clr8aFtGlg2G QgLMNjeMdxnThCVkJy5xFgZ0lQI9DiANcQvFymvuj8sNPK2Nzxnfkl5v5OI9DulnqV0p UykVi+rPsPi8tdpMl/CFLLQQui/XXG+7C3Pus2orKhKvlkdcOMOpGHmAHCTsidrlhR7b NM5vcAzn9TcUJ1QHOiiiF8oh1zQq0Eu8jTjeeugZgFnsiYo7Sv/Xj0Rt6fkvi2qHRng4 mySw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u/us6so7a7L/wAT5CX3+5Z/jO0OFN3Rtpb2Ic6XDIGg=; b=1Dg1HbtH+BhWe9XnS8mCrVdLTE0PNTRcbmM5/0qxGX6CLf+tKHo5l36HXhfUGu4Xt+ tn6SAh2LRKb/vFkj9XHud20HqFMAxi6NIC8L9Kj6kNQpyZFEqjalC4LrGV4K4LkJaeKI hcWXtHTdE+mfj3HgOF3OTGUHv0PvClNSgoRdZo2KzpNxDT4Cu7hVjHsVRR8FencfOpms oq1zqS8/vz02L5P6cBwZO4y2WrAY48JJANatuSgEl0nu72SkOI90Ap1AhGpvjogqHcdi xxuVHBuKG09pvWQRAen8oh0jx71sGXPHaJEmumxeTVDOENm33lL+gYLILZHF2yK3dhoY Ls8Q== X-Gm-Message-State: ACrzQf3PVsDyuYM/IP7A8dqRSAG/ydPu1XzZkXpCoDGWELdjioGs5Q6q e6A6dxjxXjV3RHO7S3/TWia6aA== X-Google-Smtp-Source: AMsMyM7e9+NIXQNHCmAyNHaoJZRbf/vcjeKvJwwdUpTRjQTg26AmGlaXrBt0Uz+emmp/JFYemwCqDw== X-Received: by 2002:a05:600c:358f:b0:3c6:da94:66f9 with SMTP id p15-20020a05600c358f00b003c6da9466f9mr22777161wmq.142.1666636451706; Mon, 24 Oct 2022 11:34:11 -0700 (PDT) Received: from localhost.localdomain ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id n11-20020adff08b000000b00228692033dcsm280323wro.91.2022.10.24.11.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 11:34:11 -0700 (PDT) From: Abel Vesa To: Stephen Boyd , Mike Turquette , Bjorn Andersson , Andy Gross , Konrad Dybcio Cc: linux-clk@vger.kernel.org, Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, Steev Klimaszewski Subject: [PATCH 2/2] clk: qcom: sdm845: Use generic clk_sync_state_disable_unused callback Date: Mon, 24 Oct 2022 21:33:58 +0300 Message-Id: <20221024183358.569765-2-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221024183358.569765-1-abel.vesa@linaro.org> References: <20221024183358.569765-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221024_113415_471557_284E085B X-CRM114-Status: GOOD ( 12.65 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org By adding the newly added clk_sync_state_disable_unused as sync_state callback to all sdm845 clock providers, we make sure that no clock belonging to these providers gets disabled on clk_disable_unused, but rather they are disabled on sync_state, when it is safe, since all the consumers build as modules have had their chance of enabling their own clocks. Signed-off-by: Abel Vesa Reviewed-by: Bjorn Andersson --- Changes since RFC: * Added Bjorn's R-b tag drivers/clk/qcom/camcc-sdm845.c | 1 + drivers/clk/qcom/dispcc-sdm845.c | 1 + drivers/clk/qcom/gcc-sdm845.c | 1 + drivers/clk/qcom/gpucc-sdm845.c | 1 + 4 files changed, 4 insertions(+) diff --git a/drivers/clk/qcom/camcc-sdm845.c b/drivers/clk/qcom/camcc-sdm845.c index 27d44188a7ab..e5aeb832e47b 100644 --- a/drivers/clk/qcom/camcc-sdm845.c +++ b/drivers/clk/qcom/camcc-sdm845.c @@ -1743,6 +1743,7 @@ static struct platform_driver cam_cc_sdm845_driver = { .driver = { .name = "sdm845-camcc", .of_match_table = cam_cc_sdm845_match_table, + .sync_state = clk_sync_state_disable_unused, }, }; diff --git a/drivers/clk/qcom/dispcc-sdm845.c b/drivers/clk/qcom/dispcc-sdm845.c index 735adfefc379..1810d58bad09 100644 --- a/drivers/clk/qcom/dispcc-sdm845.c +++ b/drivers/clk/qcom/dispcc-sdm845.c @@ -869,6 +869,7 @@ static struct platform_driver disp_cc_sdm845_driver = { .driver = { .name = "disp_cc-sdm845", .of_match_table = disp_cc_sdm845_match_table, + .sync_state = clk_sync_state_disable_unused, }, }; diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c index 6af08e0ca847..0ff05af515c4 100644 --- a/drivers/clk/qcom/gcc-sdm845.c +++ b/drivers/clk/qcom/gcc-sdm845.c @@ -4020,6 +4020,7 @@ static struct platform_driver gcc_sdm845_driver = { .driver = { .name = "gcc-sdm845", .of_match_table = gcc_sdm845_match_table, + .sync_state = clk_sync_state_disable_unused, }, }; diff --git a/drivers/clk/qcom/gpucc-sdm845.c b/drivers/clk/qcom/gpucc-sdm845.c index 110b54401bc6..622a54a67d32 100644 --- a/drivers/clk/qcom/gpucc-sdm845.c +++ b/drivers/clk/qcom/gpucc-sdm845.c @@ -205,6 +205,7 @@ static struct platform_driver gpu_cc_sdm845_driver = { .driver = { .name = "sdm845-gpucc", .of_match_table = gpu_cc_sdm845_match_table, + .sync_state = clk_sync_state_disable_unused, }, };