From patchwork Tue Aug 31 16:42:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miles Chen X-Patchwork-Id: 12467577 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD804C432BE for ; Tue, 31 Aug 2021 16:42:59 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7507661057 for ; Tue, 31 Aug 2021 16:42:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7507661057 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=WyVzGNBX5fgBChOQTMM6fbLahD4/rRaGncUmdO1TBs4=; b=TUT4QQw3tp7aQL sMrSKLv3yUDPfl6e4gisCmdG7dEW7ARPKqor8K7imNYIs32VYAoNeuXH0pfKxrIdm/qDEE6IE2WEG +rocs3+CtF6W0Ic1Qz+IIx1yg1irgHfcJIymQaMsSFJgvl2+tZL5sPpdqfdsAgTkKnyR0oPjRi0ZR rUkVJZm6EaBMFBVik+OsavpNl7ubGfA7nXTII86GUaMooyjPiilokvADQPk/vHD/lsXzqwZ7Kjntv pJRIoek7shT1cD+B+k2zDDalvy522bqnTmh4nbiWYwrkvxh0bIOI5Tk1eL801Col1VChYW68VHGr1 Hr1TAqXCMU6dFpHFSXcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mL6qU-002jBy-E8; Tue, 31 Aug 2021 16:42:46 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mL6q1-002j47-Fy; Tue, 31 Aug 2021 16:42:22 +0000 X-UUID: d167a5c97d3145c4a918188901dfe2a9-20210831 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=IrCDXZZIRfaqlCE6stJ0mc9DOFQkM8820dBExrpp9R8=; b=daHb8zJmJ44KY2nQ9iVTlTLrsVxcZS6PvhJ7t7/kkvf6VzrwMU6p+jXOWf69iqNkA6I8FQlpReIzM65ShMDss1zlELQUwV7gXwubZimoWx2IGwFyzOqoEKFRZ6EgTMn0hBR5lXe9zmZ1QU6qWfu5pCJRSdqWsfccQ/aebTOHNxQ=; X-UUID: d167a5c97d3145c4a918188901dfe2a9-20210831 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 2006525429; Tue, 31 Aug 2021 09:42:14 -0700 Received: from MTKMBS06N1.mediatek.inc (172.21.101.129) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 31 Aug 2021 09:42:13 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 1 Sep 2021 00:42:11 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 1 Sep 2021 00:42:12 +0800 From: Miles Chen To: Michael Turquette , Stephen Boyd , Matthias Brugger CC: Wendell Lin , Hanks Chen , , , , , , Miles Chen Subject: [PATCH v2 0/4] clk: mediatek: modularize COMMON_CLK_MT6779 Date: Wed, 1 Sep 2021 00:42:06 +0800 Message-ID: <20210831164210.15455-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210831_094218_978765_B248F785 X-CRM114-Status: GOOD ( 11.70 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org This patch set makes COMMON_CLK_MEDIATEK and COMMON_CLK_MT6779* be able to built as kernel modules. Necessary symbols are exported in this patch. In previous discussion [1], Stephen commented that there must be a user before exporting a symbol: " Is the mediatek driver compilable as a module? Last time I checked it wasn't a module. I want an upstream modular driver that uses the symbol. Otherwise we're exporting symbols when it doesn't need to be. " [1] https://lore.kernel.org/patchwork/patch/1278089/ --- Change since v1: use module_platform_driver() instead of builtin_platform_driver() Miles Chen (4): clk: composite: export clk_register_composite clk: mediatek: support COMMON_CLK_MEDIATEK module build clk: mediatek: support COMMON_CLK_MT6779 module build clk: mediatek: use tristate for COMMON_CLK_MEDAITEK and COMMON_CLK_MT6779 drivers/clk/clk-composite.c | 1 + drivers/clk/mediatek/Kconfig | 20 ++++++++++---------- drivers/clk/mediatek/clk-apmixed.c | 3 +++ drivers/clk/mediatek/clk-cpumux.c | 3 +++ drivers/clk/mediatek/clk-gate.c | 8 ++++++++ drivers/clk/mediatek/clk-mt6779-aud.c | 4 +++- drivers/clk/mediatek/clk-mt6779-cam.c | 4 +++- drivers/clk/mediatek/clk-mt6779-img.c | 4 +++- drivers/clk/mediatek/clk-mt6779-ipe.c | 4 +++- drivers/clk/mediatek/clk-mt6779-mfg.c | 4 +++- drivers/clk/mediatek/clk-mt6779-mm.c | 4 +++- drivers/clk/mediatek/clk-mt6779-vdec.c | 4 +++- drivers/clk/mediatek/clk-mt6779-venc.c | 4 +++- drivers/clk/mediatek/clk-mt6779.c | 2 ++ drivers/clk/mediatek/clk-mtk.c | 8 ++++++++ drivers/clk/mediatek/clk-mux.c | 4 ++++ drivers/clk/mediatek/clk-pll.c | 4 ++++ drivers/clk/mediatek/reset.c | 2 ++ 18 files changed, 69 insertions(+), 18 deletions(-)