From nobody Mon Jun 8 12:13:19 2026 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CF4633987F for ; Fri, 29 May 2026 10:16:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780049784; cv=none; b=eWsAHXM3LMcwOAjH8Uxo+gFH0a5NInmPIz6yY9c+DnKTW6GMRWaI5YRRV29mzoihZD31AyGRApTxr++G0TnAcWsjeYFprtAHPGNQ7d+7oiYD79t80yIwFk07eTCxFf5ejW0QftGH/uh5IcVbm48sjfDl5w5Wa5c6yALDBdnmHFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780049784; c=relaxed/simple; bh=EIg1ArVfTgYr0XR+oSnyyx8zmDKdo4tgWt4K7OVOtzU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rD4tFPGoXfqXzlL+vmwHJA2G2mxUYi1DMabNdlg81qFoxovMGl1IQJmHvamfMiu7vLSCZShehOr3Sl9CIUbv2UFS828xO7iSH0i2oR/ydRROgREPl0I8K2TJQP6iV6BkjzGodG6d2h/gAX9nw0zML8yGdwspvLOzdEgbS5aCDIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=ku6eNT2n; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="ku6eNT2n" X-UUID: 6dc08b605b4711f1b1788b6acf885367-20260529 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ontK0DsJG1v6pRqJehDXCYuropllwX/zFr8RftS9MBo=; b=ku6eNT2nXX/uE66Hza9aGIS9548CpccupXrc25qLofZ14lrwdSBIcvytBWlMq9aOPWZEcq9aTQpnIpzZVQMPXYTPEqZ8iyLa6WhIHg4zpr6HS5yOlEJPyuHTs/XHUHMDDURQBAbT2gIpazWla1o+jQK8bOpowrlKzjbepMfJk7k=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.15,REQID:7b299a2a-a040-4775-8306-e89e58a44cf1,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:e276073,CLOUDID:480992c9-9273-4096-a0ce-fc7a6a4f85f7,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|836|865|888|898,TC:-5,Cont ent:0|15|50,EDM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 6dc08b605b4711f1b1788b6acf885367-20260529 Received: from mtkmbs09n1.mediatek.inc [(172.21.101.35)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 19703093; Fri, 29 May 2026 18:16:16 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Fri, 29 May 2026 18:16:15 +0800 Received: from mtksitap99.mediatek.inc (10.233.130.16) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Fri, 29 May 2026 18:16:15 +0800 From: Justin Yeh To: Matthias Brugger , AngeloGioacchino Del Regno CC: , , , , Justin Yeh Subject: [PATCH 1/2] soc: mediatek: Allow MTK_INFRACFG to be built as module Date: Fri, 29 May 2026 18:16:02 +0800 Message-ID: <20260529101613.55697-2-justin.yeh@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260529101613.55697-1-justin.yeh@mediatek.com> References: <20260529101613.55697-1-justin.yeh@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Content-Type: text/plain; charset="utf-8" Change MTK_INFRACFG from bool to tristate to support building it as a loadable kernel module (.ko) instead of being built into the kernel. This is required for DDK (Driver Development Kit) module build, where mtk-infracfg needs to be loaded dynamically along with other SoC infrastructure modules. Signed-off-by: Justin Yeh --- drivers/soc/mediatek/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/Kconfig b/drivers/soc/mediatek/Kconfig index d7293977f06e..d28b0817ce51 100644 --- a/drivers/soc/mediatek/Kconfig +++ b/drivers/soc/mediatek/Kconfig @@ -38,7 +38,7 @@ config MTK_DVFSRC best achievable performance-per-watt. =20 config MTK_INFRACFG - bool "MediaTek INFRACFG Support" + tristate "MediaTek INFRACFG Support" select REGMAP help Say yes here to add support for the MediaTek INFRACFG controller. The --=20 2.45.2 From nobody Mon Jun 8 12:13:19 2026 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CC35288B1 for ; Fri, 29 May 2026 10:16:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780049784; cv=none; b=EklrZb/PkETIojYy64VlJXFZgLCH1ZnVQ1P2LBP+RUH5mWbVenk2r5heYTU8J6xx4pP2D1eAnHrsGrMSFI43FuTj2Nnb/Lc3AXFjROHRjM5gi7btt8ciOxOwg3pfiVgrjtXDKwfRXoLPSZFTn7F2HQ0DNqq04alTAlenwXk3ds4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780049784; c=relaxed/simple; bh=PRK3eght2C60rkpPiJXRuU+tNwJa0jb0JhncABkMpIQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fsAnE0HIOtvSFiXi8Zi3pvn1S+xKro6LySjKJH6a+AKA2Uwhy7fhWPDstCfTEiSO115/VhyIt0WYaXlGc0lX4jPFxoHseh9g2lCUmwbiSIDGWrl32mBrKgR7Idf6Qu2hH12AV8SfhLXEUWKY731yOQPJfVOdBIoXSgDTjqASTBA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=P6+SXkFo; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="P6+SXkFo" X-UUID: 6dd8c2345b4711f18dc8c9802ae25ab1-20260529 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=DzF9tm7ur7HLo2X6C2bLqmJDq98NOCzuUnqS4td4HdQ=; b=P6+SXkFoQZWUBfyl4koA/qAP7e+4XsQ9hfRQfiymSt1D297Wcp68b/b9t+7a5S8fz/hYBsbnJVEs6KGerADnm9p5pnGoMGEqiWG4ie9xfT0q4a4KLxPwtYcd9n/fKGyJobJ3Xuh06KeT6/q2rPxmjwi+Vdjfa9+zM+xHoqADlGI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.15,REQID:a5c8c32c-93ee-467a-bdaf-1f425b18d686,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:e276073,CLOUDID:2c40c54a-0449-4a87-afcf-cdef1b1bea20,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|836|865|888|898,TC:-5,Cont ent:0|15|50,EDM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,COL:0 ,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 6dd8c2345b4711f18dc8c9802ae25ab1-20260529 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 728464223; Fri, 29 May 2026 18:16:16 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Fri, 29 May 2026 18:16:15 +0800 Received: from mtksitap99.mediatek.inc (10.233.130.16) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Fri, 29 May 2026 18:16:15 +0800 From: Justin Yeh To: Matthias Brugger , AngeloGioacchino Del Regno CC: , , , , Justin Yeh Subject: [PATCH 2/2] soc: mediatek: mtk-infracfg: Export symbols for DDK modules Date: Fri, 29 May 2026 18:16:03 +0800 Message-ID: <20260529101613.55697-3-justin.yeh@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260529101613.55697-1-justin.yeh@mediatek.com> References: <20260529101613.55697-1-justin.yeh@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Content-Type: text/plain; charset="utf-8" Export mtk_infracfg functions to allow other DDK modules (like mtk-scpsys) to use bus protection APIs. Changes: - Add EXPORT_SYMBOL_GPL for set/clear bus_protection and init functions - Remove static and __init qualifiers from mtk_infracfg_init - Add mtk_infracfg_init() declaration to header - Remove postcore_initcall, let dependent modules call init explicitly - Add #include for export macros - Add MODULE_LICENSE("GPL") metadata This allows mtk-infracfg to be built as a DDK module (.ko) and its functions to be used by other modules like mtk-scpsys for power domain management. Signed-off-by: Justin Yeh --- drivers/soc/mediatek/mtk-infracfg.c | 9 +++++++-- include/linux/soc/mediatek/infracfg.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/soc/mediatek/mtk-infracfg.c b/drivers/soc/mediatek/mtk= -infracfg.c index 2acf19676af2..8a88805468cc 100644 --- a/drivers/soc/mediatek/mtk-infracfg.c +++ b/drivers/soc/mediatek/mtk-infracfg.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include =20 @@ -43,6 +44,7 @@ int mtk_infracfg_set_bus_protection(struct regmap *infrac= fg, u32 mask, =20 return ret; } +EXPORT_SYMBOL_GPL(mtk_infracfg_set_bus_protection); =20 /** * mtk_infracfg_clear_bus_protection - disable bus protection @@ -73,8 +75,9 @@ int mtk_infracfg_clear_bus_protection(struct regmap *infr= acfg, u32 mask, =20 return ret; } +EXPORT_SYMBOL_GPL(mtk_infracfg_clear_bus_protection); =20 -static int __init mtk_infracfg_init(void) +int mtk_infracfg_init(void) { struct regmap *infracfg; =20 @@ -90,4 +93,6 @@ static int __init mtk_infracfg_init(void) MT8192_INFRA_CTRL_DISABLE_MFG2ACP); return 0; } -postcore_initcall(mtk_infracfg_init); +EXPORT_SYMBOL_GPL(mtk_infracfg_init); + +MODULE_LICENSE("GPL"); diff --git a/include/linux/soc/mediatek/infracfg.h b/include/linux/soc/medi= atek/infracfg.h index 9956e18c5ffa..847431a7b967 100644 --- a/include/linux/soc/mediatek/infracfg.h +++ b/include/linux/soc/mediatek/infracfg.h @@ -454,4 +454,5 @@ int mtk_infracfg_set_bus_protection(struct regmap *infr= acfg, u32 mask, bool reg_update); int mtk_infracfg_clear_bus_protection(struct regmap *infracfg, u32 mask, bool reg_update); +int mtk_infracfg_init(void); #endif /* __SOC_MEDIATEK_INFRACFG_H */ --=20 2.45.2