Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp919278imw; Tue, 5 Jul 2022 00:01:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sAZjP4bvk741KzlVBIO0RTITkKe+MbdzgWezHb6a/VYdAYTVp08sKLLEj+R9GFM/kKmahv X-Received: by 2002:a63:e30f:0:b0:412:78f0:96ac with SMTP id f15-20020a63e30f000000b0041278f096acmr726371pgh.603.1657004508111; Tue, 05 Jul 2022 00:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657004508; cv=none; d=google.com; s=arc-20160816; b=waIFsvB0IgQIoRbImP1TbjsdxqgoxZ1Q9yHNeEtDCwp/dSMRwGtrhIqPZHza24GNH/ VmqzQk7dvd+9PaYz01RAZ3tAW2TD2svzgfXAc4ZZ5TcKoPyw6ZmNpsCpTR8Kbuf40h/F M12xr+6ZTO/d9ATLP7llbMnWDGVBulJws9t2tmCeigBlHMe1LVTTi8bFQHmKzSK6E2Oi IFK+K85eRg6PFNCNR3DrYC7SjWzfxqHPVz/Su20JjwQAG68514aKpeuc5N8rfSRvX+Bv mFC/ICmUtv2XetCdgZxsMrmGezg1fYt0VFbHX9Erv8Cc2UgqUZzaPYwLd3Jz3qddWKp0 iK4Q== 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=qUBBq1ygcQTWcllnQnv9hUGFAmvHHVoH28qY+W8QnBE=; b=yLgh5zgFRuH6aRHkgJmrZIfqyD/ssc2JgkN57th7WF1XbVePPEd7lzzyjUyeSZBkWe PfRBKOsyQZXLJJIxWc5dvvi1UyXdAIMkQE37xPwiPkCTPvdEgakk29pOjmJtTQNy6RAg Ti8wev643SG9oL7zBluVCvQc2KdK/0d1ody+4r5G6xEu9d4gayzBaFFNc953MbUM9zLX p0AYxDABIIwLj8W9GtydEsJf5jq4F+8I8scuQt68zGPzDxwoNZwJu3+s0oi0stqrQXaw 2jvjTbqYXpX7PEETWFktGmI25U6jxcY0WjvhtagWe+ThTEGF9eIyR6iQMO6D7GZwzhvm E5qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xomgl+tX; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k63-20020a638442000000b00408dbf6029esi10999882pgd.2.2022.07.05.00.01.32; Tue, 05 Jul 2022 00:01:48 -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=@linaro.org header.s=google header.b=Xomgl+tX; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230248AbiGEHAh (ORCPT + 99 others); Tue, 5 Jul 2022 03:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230231AbiGEHAd (ORCPT ); Tue, 5 Jul 2022 03:00:33 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61F9E0DD for ; Tue, 5 Jul 2022 00:00:31 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id z14so10674666pgh.0 for ; Tue, 05 Jul 2022 00:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qUBBq1ygcQTWcllnQnv9hUGFAmvHHVoH28qY+W8QnBE=; b=Xomgl+tX+JuEgJb4L/ud2hR9WtEInetJEz6PnXqPOICEPrbom4zFBSBCMic5H7Kzz8 yVfeoaxvja7C8QLeqDYfMGx4BfgrNj6P8QjB1/kDYyV8zKDgIlUZw/RA4DjLmlirFnUR tpQu5+HvrLVQJva7SHLONoU3657vCOXWCYqJpN/Vrw2VlERsiVXPTPmsmzwNaJTjisDP 8OUngSWWVvtze8rcVshJhbL+hc8yxO6uKHcI0KtjHy9f/wxJN2w99NVDg5KZ0XBW0jrF DQsJ0wkEZCGsrxfH8kdxBUhQ22BrGgHkqNN/36ERzT137mJ2y6FKNc33qXyZlW0q0u8f kVNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qUBBq1ygcQTWcllnQnv9hUGFAmvHHVoH28qY+W8QnBE=; b=e93Ns2EtO7SVpUIu2Ra2bXmfrSM3z+sbBS2gycTiQU4gHH1tbcDziAko2Sm75qnbFB vpm+Ehjid50hhuiAHWQ/t9PQ7Ko7TthmRESKeYcMQSrQOTLI3TD24C2gSOmfD6FdhAH3 IuckhzC37UcOrmNKBmFa3DKlox0iu4b0ezFVxj+sqE+eLZxQKxB3mhnMfvYzKEDUnaJB yW2Clsd14h85GN6MBiwqop9ne9DWtFhO8Uy2zDrn/rZoB8uOD2e94qL/4GpEl9CiGVDU ixXoGvx4RBtvCeKRj5yX8req3/J6KKBozZvtQOmJvItZnGXrD7+GRE/LFpIHd8T76F8W DnVw== X-Gm-Message-State: AJIora9U+M0v8U3LL/ZceiyLKSf9gr55xaynKTiyfKFwbuOGEKAJURVe 3RFrRw6c7H9w3nIUWSKUyd7aHA== X-Received: by 2002:a05:6a00:ad0:b0:4f7:a357:6899 with SMTP id c16-20020a056a000ad000b004f7a3576899mr40383862pfl.80.1657004431077; Tue, 05 Jul 2022 00:00:31 -0700 (PDT) Received: from localhost ([122.171.18.80]) by smtp.gmail.com with ESMTPSA id u13-20020a63454d000000b0040d2224ae04sm21522380pgk.76.2022.07.05.00.00.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 00:00:30 -0700 (PDT) From: Viresh Kumar To: Chanwoo Choi , Dmitry Osipenko , Jonathan Hunter , Kyungmin Park , MyungJoo Ham , Nishanth Menon , "Rafael J. Wysocki" , Stephen Boyd , Thierry Reding , Viresh Kumar Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Krzysztof Kozlowski , Bjorn Andersson , devicetree@vger.kernel.org, Dmitry Osipenko , linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org, Manivannan Sadhasivam , Rob Herring Subject: [PATCH V2 00/13] OPP: Add support for multiple clocks* Date: Tue, 5 Jul 2022 12:30:03 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 Hello, This patchset adds support for devices with multiple clocks. None of the clocks is considered primary in this case and all are handled equally. The drivers, for multiple clock case, are expected to call dev_pm_opp_set_opp() to set the specific OPP. Though how they find the target OPP is left for the users to handle. For some, we may have another unique OPP property, like level, which can be used to find the OPP. While in case of others, we may want to implement freq-based OPP finder APIs for multiple clock rates. I have decided not to implement them in advance, and add them only someone wants to use them. This is rebased over a lot of other OPP changes and is pushed here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git opp/linux-next V1->V2: - Fix broken git bisect for: OPP: Reuse _opp_compare_key() in _opp_add_static_v2() - Include binding changes written by Krzysztof earlier. - Check config_clks before calling it, it isn't always set. - Add config_clks for Tegra30's devfreq to handle its corner case. - _opp_compare_key() supports multi-clk case now, earlier it skipped freq comparison for such a case. - New patch to compare all bandwidth values as well in _opp_compare_key(). - New patch to remove *_noclk() interface. - Various other minor fixes. -- Viresh Krzysztof Kozlowski (1): dt-bindings: opp: accept array of frequencies Viresh Kumar (12): OPP: Use consistent names for OPP table instances OPP: Remove rate_not_available parameter to _opp_add() OPP: Reuse _opp_compare_key() in _opp_add_static_v2() OPP: Make dev_pm_opp_set_opp() independent of frequency OPP: Allow multiple clocks for a device OPP: Compare bandwidths for all paths in _opp_compare_key() OPP: Add key specific assert() method to key finding helpers OPP: Assert clk_count == 1 for single clk helpers OPP: Provide a simple implementation to configure multiple clocks OPP: Allow config_clks helper for single clk case PM / devfreq: tegra30: Register config_clks helper OPP: Remove dev{m}_pm_opp_of_add_table_noclk() .../devicetree/bindings/opp/opp-v2-base.yaml | 10 + drivers/devfreq/tegra30-devfreq.c | 22 +- drivers/opp/core.c | 404 +++++++++++++----- drivers/opp/cpu.c | 12 +- drivers/opp/debugfs.c | 27 +- drivers/opp/of.c | 139 +++--- drivers/opp/opp.h | 24 +- include/linux/pm_opp.h | 29 +- 8 files changed, 466 insertions(+), 201 deletions(-) -- 2.31.1.272.g89b43f80a514