From patchwork Thu May 19 13:47:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 12855219 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 D50D5C433EF for ; Thu, 19 May 2022 14:53:21 +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: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:In-Reply-To:References: List-Owner; bh=0/dZXx0DAp77H6lW0vLR47IVKKXSq0p1l5ZH6V8KdzE=; b=xILEpR+3pworMS dATodvHb0tObLR99GUqk+PVEGJlwe6RUtxSr/oCqGw64fTvNxA8RdsG/InA6iB2wUre+0bAka1IiZ HGwCpDKA9BRQHSWD9DioFTycJ/0ZbRfTyQogfsY7oMxsghThneBBIq/KnmGfg80NAJuY4e0AWsCCF A8mddIMjXTZHjaqzp8eI3ojM7t0Yf4xSiOAxO/LqDEcg9brJ1dMHXFzEFm/0ZJW7JDGin3se8ZeXH R/Eh4zyylRGzoKf4WoCnwBy8LrMe3DUEg4QAkVkMsSwYRi0FoMnKKYM8serknNA6J0GiZgGkl9uSQ F5G/tG14IG9Xa1ElxF1Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrhVQ-007bbT-Hz; Thu, 19 May 2022 14:52:00 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrgWn-0078Ke-5m; Thu, 19 May 2022 13:49:25 +0000 Received: by mail-qk1-x731.google.com with SMTP id x65so469236qke.2; Thu, 19 May 2022 06:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vBqh7Tk2z2K1YwGYzAH4brkfEyxgFWvHmBvnWHs1Zp4=; b=flFbqmZxx9iM5vRGY/4eQBnTHrzZe9ShyTGtUfoI5IhkuVrEkViYFtkY0ApjDpQSma NKGWwmHhnQwHti46okHFeiW/Vtm17DAPZJx4zvDOTHmG7cBoWd2e0yPyDTGquH+Qw0d6 PIZzIC09nejA7WeWV0LroOLgNA0Hl2CcBLAa6vurXGShpfQxd3EoHmP9jF3cK9bC7Gnb //ytY6uTxONFx3cQLZKrymmAgwdIYRK9wXCtm+RqcY2rS1IXl+TQa9gpzDfLsvfIOamZ RM+kXX+Eb/JQ8cqxn9PD7HkJ80bnOMwV5J44IX4C0C/z80B65gpi5bxua3DxtdUtrUV5 484g== 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=vBqh7Tk2z2K1YwGYzAH4brkfEyxgFWvHmBvnWHs1Zp4=; b=loG6x+VFk4BqQ8CP+DOkZKTSz8FGFWLWJn4rzVxfxi6qSGYRs6iENzu8t2hILndvU3 11iUdMpgx7yMiHYUPORMRTf256fXGnO4I/UvvUazTsT6HlwS7VlirBjc1gqiuhRl1vQF dGIY9EX64Rv3BpQVc4f7+ctdeKhPXhNUK2y6yGNAiC+xEMiQJdMqHTTSDXkBdWvR8w2q lMQFWUceEKKCqZJIGp29/51CKNp6ady9hFdyOjg5eC+Ry9pL4y1ijU90FF1xiL7L9b2E UHSkQVgisrKwNE6vZ1faxgReW6Jekpj4bgQAPd7BOQ1wbZNzF+tIDCDjpIzvaMYyK4+8 Oalw== X-Gm-Message-State: AOAM530LdGSAWdovwSGK8LKG3CDraQtgJ5jo9e8v2Kxen3MsoNfIQEYD aBjWrSkeToSZ08s8okKfufQ= X-Google-Smtp-Source: ABdhPJy0wt0R0C+qdbicIKHg86HWjUDyYZscDjDdlgPI+3OgR1c1hrYBu5g+wbK5WOVdKMQ9Sqfrpw== X-Received: by 2002:a37:8641:0:b0:67e:85d1:f5e9 with SMTP id i62-20020a378641000000b0067e85d1f5e9mr3195651qkd.128.1652968155429; Thu, 19 May 2022 06:49:15 -0700 (PDT) Received: from localhost.localdomain ([217.138.206.82]) by smtp.gmail.com with ESMTPSA id i186-20020a3754c3000000b0069fc13ce23dsm1315024qkb.110.2022.05.19.06.49.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 06:49:15 -0700 (PDT) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Michael Turquette , Stephen Boyd , Matthias Brugger , Philipp Zabel Cc: Yassine Oudjana , Chen-Yu Tsai , Miles Chen , AngeloGioacchino Del Regno , Chun-Jie Chen , =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= , Rex-BC Chen , Yassine Oudjana , linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht Subject: [PATCH 0/6] clk: mediatek: Improvements to simple probe/remove and reset controller unregistration Date: Thu, 19 May 2022 17:47:22 +0400 Message-Id: <20220519134728.456643-1-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220519_064921_281642_3B81B5B6 X-CRM114-Status: GOOD ( 13.13 ) 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 This series started as part of an earlier series adding support for the main clock controllers on MediaTek MT6735[1]. It has since been split off and expanded. It adds a new function to unregister a reset controller and expands the mtk_clk_simple_probe/remove functions to support the main 5 types of clocks: - PLLs (new) - Fixed clocks (new) - Fixed factors (new) - Muxes (new) - Gates (supported previously) This should allow it to be used in most clock drivers, resulting in reduced code duplication. It will be used in MT6735 clock drivers in the upcoming v2 of the MT6735 main clock controller series. Dependencies: - clk: mediatek: Move to struct clk_hw provider APIs (series) https://patchwork.kernel.org/project/linux-mediatek/cover/20220510104804.544597-1-wenst@chromium.org/ - Cleanup MediaTek clk reset drivers and support MT8192/MT8195 (series) https://patchwork.kernel.org/project/linux-mediatek/cover/20220503093856.22250-1-rex-bc.chen@mediatek.com/ - Export required symbols to compile clk drivers as module (single patch) https://patchwork.kernel.org/project/linux-mediatek/patch/20220518111652.223727-7-angelogioacchino.delregno@collabora.com/ Yassine Oudjana (6): clk: mediatek: gate: Export mtk_clk_register_gates_with_dev clk: mediatek: Use mtk_clk_register_gates_with_dev in simple probe clk: mediatek: reset: Return reset data pointer on register clk: mediatek: reset: Implement mtk_unregister_reset_controller() API clk: mediatek: Unregister reset controller on simple remove clk: mediatek: Add support for other clock types in simple probe/remove drivers/clk/mediatek/clk-gate.c | 1 + drivers/clk/mediatek/clk-mt8192.c | 7 +- drivers/clk/mediatek/clk-mtk.c | 123 +++++++++++++++++++++++++----- drivers/clk/mediatek/clk-mtk.h | 22 +++++- drivers/clk/mediatek/reset.c | 41 ++++++---- drivers/clk/mediatek/reset.h | 20 +++-- 6 files changed, 167 insertions(+), 47 deletions(-)