Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2077630rwa; Mon, 22 Aug 2022 01:26:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR4EtMZ/T90cohZgQgF+5ueBO1l6JZ8JKD0aiXeNyZKEkg7gUUd4l+iBjp6XzcQwEL5CtxaZ X-Received: by 2002:a17:907:8a1a:b0:731:6475:68f7 with SMTP id sc26-20020a1709078a1a00b00731647568f7mr11870214ejc.359.1661156770096; Mon, 22 Aug 2022 01:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661156770; cv=none; d=google.com; s=arc-20160816; b=mC+D8U6t7WGMh3vkayj/TGTqTqA08Asnidy3CrTUviSSsSuYVH4OLi/9ScRHldRwPi vdr6MKlwmYLm2v8IYJrKSKoyVhKkBbtJVIT3Q05GLECLbB5RXMR9r9iv+uku7/VmNAcJ 1f50cp30phsMv1jomOQAvgbKaPYc3SEnM6Qbpx85NS4ipn/WFY1DKKWktdQaEK+eHed2 gYXggGlby93RKhBsOvTXdsmzGwNYWT9CBZM0qhzNQkuXPjm8bc4kheOOUfxtPd/4djS8 M73hK+xMiU13sXweHnCQHMPKLBKqvjNrPduYz65hYLfSA9byVDWlBRBGuzf/HmF4evl+ H1Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vFL4Ok6aVz+SF4AwWxLqDJ9FHif8ySEihParxtYrieU=; b=muGWF3jek+HBkDZ0MN74E0V8Ck6WBO+WQDS8cSJsO7Zjuse21vzD1StbK4331o3NeR 11dG50g8LTyL2Rf3aFWqMQ83NXhJkr1bGAI9MaMDv+yEhfXr89W6Rnd0UZTe6+pfQyNt 9Q6pSvAXIueU81bhb8gUnkYx4oR9WUy+wWjw57/N+rs3BOAyiFhcLpfqDpqOvMK8S1zG +mi0iNlL0cS9qROzGt0mozycQFAEXIkRCoc7P/ZchFP0DxJH6YhT+LUj70WHOXrV/zRq lFs1HbuN963MW8xQpvqKqf6ES0MAkQa0ad84wbuvncg79ROU1F9WOHRrIi8MKGPjQsfP EKRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="byGR/js1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg7-20020a170907970700b0072f579adddcsi8763062ejc.519.2022.08.22.01.25.44; Mon, 22 Aug 2022 01:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="byGR/js1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233126AbiHVIOr (ORCPT + 99 others); Mon, 22 Aug 2022 04:14:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232709AbiHVIOo (ORCPT ); Mon, 22 Aug 2022 04:14:44 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0366A1A83F for ; Mon, 22 Aug 2022 01:14:43 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id v23so3958813plo.9 for ; Mon, 22 Aug 2022 01:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=vFL4Ok6aVz+SF4AwWxLqDJ9FHif8ySEihParxtYrieU=; b=byGR/js11m4a8Js4TSQCX47v+0BUDKlOmW4jrvz+e1uNJeU7y2gEvVdl7VJwzGPvUi fsk+l1iQUDEZrrivhKeoUL+vHAMvMk9UgYv9U9t4Oe8k805g27z4t3vLplIAc/zalee/ UkrohqvCiKb93QewIV1rqfjJF7IyqR+GS/wn4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=vFL4Ok6aVz+SF4AwWxLqDJ9FHif8ySEihParxtYrieU=; b=FR2qRE2G/82Xp4XMua0cj1RSwGm+YKfsuTn2yHUx9pfCXfSknHTUKExobefEA5eC+f HL0H7AzVDGFLz6F9QW14v3/NKzad8OR9KEXrV2OmhWIeaFh6UnSujBwJtpXck0N73bgV 0VzvGdBHEXDT76O7kKmfUGtj2e25fgxhgbKiYE6xfIxE7T2MBG1pg26K+jHm9+Mhe93A 05GL3ks8fl0UioJApksGbT7tL1kIYIWRW2WA/0xE7PKY5kJe21liFHKpLnHI4BJHAoRw /gJ45QUZ4FBU7dBMU1ndLs6Ah02cX5H6Hv2TMT4WNcBiCvtRCu/jP4Xl60lZ66EFq4Jo UtyQ== X-Gm-Message-State: ACgBeo0y9ZtCfQaacb5gTf6bPbcUt2eb4VRsbQhPSEHInMshNMcJPY6P l5KdBV3drUJM/vT6OftKIdwGaP9s2kR2cw== X-Received: by 2002:a17:902:be02:b0:172:d409:e057 with SMTP id r2-20020a170902be0200b00172d409e057mr9499042pls.90.1661156082565; Mon, 22 Aug 2022 01:14:42 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:d583:9d7d:3429:1b4b]) by smtp.gmail.com with ESMTPSA id f184-20020a6238c1000000b00536b3fe1300sm1204858pfa.13.2022.08.22.01.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 01:14:42 -0700 (PDT) From: Chen-Yu Tsai To: Michael Turquette , Stephen Boyd Cc: Chen-Yu Tsai , AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND v2 0/2] clk: Fix CLK_OPS_PARENT_ENABLE and runtime PM Date: Mon, 22 Aug 2022 16:14:22 +0800 Message-Id: <20220822081424.1310926-1-wenst@chromium.org> X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, Stephen, Resending this series from last month. This is now based on next-20220822, but should apply cleanly to v6.0-rc1. Here are a couple fixes for the clk core. They are unrelated but overlap in diff context, so I'm sending them together. Patch 1 makes the clk core honor CLK_OPS_PARENT_ENABLE for clk gate ops. Without this, dumping clk_summary on the MT8192 would cause the system to hang. Patch 2 reorders the runtime PM call in clk_core_unprepare() to match the order described in its original commit, and the opposite of that in clk_core_prepare(). Changes since v1 - Use clk_core_{enable,disable}_lock() instead of non-locking variant. Reported by NĂ­colas - Added coverage for clk_core_is_prepared() - Correct sequencing in clk_core_is_enabled() so that runtime PM is handled before parent clock is enabled, matching other functions. Regards ChenYu Chen-Yu Tsai (2): clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops clk: core: Fix runtime PM sequence in clk_core_unprepare() drivers/clk/clk.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) -- 2.37.1.595.g718a3a8f04-goog