Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4653645pxb; Tue, 31 Aug 2021 10:03:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd1jVYRJan9p7m9H1pZfORIjjY59oMeUufROD9iuu1XqmCDVEqhN59xfD71JH3opDofRjw X-Received: by 2002:aa7:c857:: with SMTP id g23mr30810038edt.219.1630429394658; Tue, 31 Aug 2021 10:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630429394; cv=none; d=google.com; s=arc-20160816; b=ynzMnoEUthL+R9eT90wQ9/DWg+TP1zzOoQF0x6uOhn/D1S6AuJBK6gl/Pdp/nEWDFB HbzuPUfDwof7/OR5SrmiilM65umWQLYA2m0XBlfr8urfRJFt6LnIvwmThnHnbsuAzHAb 6knfFhWE21aVdgbUyFSEMwYqIULmCASzGKzXssekR2Cih63HhLNtZ8RsdixKNXhwrzLz DIMtJVOScgps4c/OB5OOikDLjLgnrWMtQbqBIlLDKxn/f4mIEqew4qorh6JX5DFs8JNw bMW4ahz6Xhu30bPD8SnzTsC0DCVUfxUPpHh1Pzv0fOhzhP2DDw9L5l0L/yLWE33sqL8t dm+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=cXo//c8599VwUdPlt3/c/+j+mWWGIgEfj8fJ4+YjIxo=; b=xgmNMwoOohV4nVoE3RYNwIFRpYrx32iV/s465D2LdoGcMxdispmWzg1eEjSch4LpAN IDzLrbgtJhlSndcJ1mPyiHfXPdERq7Xa+GXygU7HLucrL2qFjiCWEiBv4hI0Sx07k28H +NhHU4eXq5/N14Wb1G4tcKun0zzjPcBiGQWmDXeVO4xjnJoLJB4gG41G1YZVqz5jdI3t OtFtvP4qdMfnhrkrnHfqwIgC8HIhabMEVcq8dPn0ZEoblL0Nt5f58U96Y1XvrvW9O1p7 WTCpdc25+pn8oOAyE8tvI5G4b28jzWf1jR7JYIvOGRCVk/gSqDQbVj7jMNjMogcThdiA ytrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w3si18713284edt.87.2021.08.31.10.02.47; Tue, 31 Aug 2021 10:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240258AbhHaQnS (ORCPT + 99 others); Tue, 31 Aug 2021 12:43:18 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:58416 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S240415AbhHaQnL (ORCPT ); Tue, 31 Aug 2021 12:43:11 -0400 X-UUID: 8fbc7751efca4616aead47938e9e74ac-20210901 X-UUID: 8fbc7751efca4616aead47938e9e74ac-20210901 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1249570732; Wed, 01 Sep 2021 00:42:13 +0800 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 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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(-) -- 2.18.0