From patchwork Sat Jun 29 00:26:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 13716724 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 B8C39C3064D for ; Sat, 29 Jun 2024 00:27:51 +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:Cc:To:Message-Id:MIME-Version:Subject: Date: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=q2sUQ/APMXKvrKqDEwhN5oayOIUW2frzBRc8+jaQ3HA=; b=iqn24gZ7P/hFhX 9Pva8+cmDRPmV++Txb+wv+Mb+Ft+JPYrUzOJNEMKfv2wFH5yuOp5/bXdryaCIjrvLg0LRo1QViUGc /Jh2m9ezucY45jpMTmLixDvJvo9gkSX22ii4EFfrtgdkux8Rto5clOj1k2BqCY0o0JERDhps8kbRQ 8JSQ1WnWe2iBAR0dJP6ujawmV44wOThkQ3pipcSyAyhkey/Kgu9Tj19GuE/geBMTABW8tr3XZceE+ wzPwYC8YQX97XpT+3uh3of/aIQwqiLcU7PeON1VBy2rTixQvOW7dutIGOnbgVdbWb0pmWbMfDtMsD 4prpJQVIY2w+NXR5QRlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNLwN-0000000FQJ1-35x4; Sat, 29 Jun 2024 00:27:44 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNLwC-0000000FQDk-26uH; Sat, 29 Jun 2024 00:27:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1719620849; bh=eXyQilo90szlOYhUb0U8hcMrE0RKEYfQYYK0EvOt2fo=; h=From:Date:Subject:To:Cc:From; b=fEHW/Lp++jRWGvU4dRooQL8SOAyaWieknB1dPCbIn35MeENIB/33CP4D5GloD8CDV iOmr7UvTlUhjlx+OhllPvG1TGoobdbFJRVhBu3aa/yjcV288Vrg8TmDiBT7UikuNCI ALVP9lkyA1UwMjfVZiz2Bk/EZf4DJSW1Ynj1J4EW78Neo9D67WoYcinuoJDJU9mJc+ whMFLq+xk4xj6FnLTGV1OpPJWlip5rifQIrL1Wq01Pg+jlUcKpymuAvtwRvVK0eIvc gZr60dlrIQTyW8sYvAeZtFXrEZYpa+MywNb6y52FVhmdVtol8a4avi9kYuBnp6w/B+ 5ZV8nxR13w6cA== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 2737C37821E6; Sat, 29 Jun 2024 00:27:29 +0000 (UTC) From: Cristian Ciocaltea Date: Sat, 29 Jun 2024 03:26:58 +0300 Subject: [PATCH] phy: phy-rockchip-samsung-hdptx: Select CONFIG_MFD_SYSCON MIME-Version: 1.0 Message-Id: <20240629-rk-hdptx-compile-test-fix-v1-1-c86675ba8070@collabora.com> X-B4-Tracking: v=1; b=H4sIANFUf2YC/x2MWwqAIBAArxL73YItFdhVoo/MLZdeohJBdPekz xmYeSByEI7QFQ8EviTKeWSoygImNx4Lo9jMQIpq1ZLGsKKzPt04nbuXjTFxTDjLjcYoq9tRGaI Gcu8DZ/2/++F9P/XpbR1rAAAA To: Vinod Koul , Kishon Vijay Abraham I , Heiko Stuebner , Algea Cao Cc: kernel@collabora.com, linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_172732_916811_0D93265C X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Compile testing configurations without REGMAP support enabled results in a bunch of errors being reported: ../drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c:569:21: error: variable ‘rk_hdptx_phy_regmap_config’ has initializer but incomplete type 569 | static const struct regmap_config rk_hdptx_phy_regmap_config = { | ^~~~~~~~~~~~~ ../drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c:570:10: error: ‘const struct regmap_config’ has no member named ‘reg_bits’ 570 | .reg_bits = 32, | ^~~~~~~~ Note that selecting REGMAP alone is not enough, because of the following liker error: phy-rockchip-samsung-hdptx.c:(.text+0x10c): undefined reference to `__devm_regmap_init_mmio_clk' Instead of the obvious fix to enable REGMAP_MMIO, select MFD_SYSCON, which implicitly enables REGMAP_MMIO as well. The rationale is that the driver has been already relying on the syscon functionality. Moreover, without MFD_SYSCON enabled, the test coverage is reduced, since the linker might not detect any potential undefined references following syscon_regmap_lookup_by_phandle() invocation in rk_hdptx_phy_probe() body. That is because the function would unconditionally return -ENOTSUP, hence the compiler is free to optimize out any unreachable code. Finally ensure PHY_ROCKCHIP_SAMSUNG_HDPTX depends on HAS_IOMEM, as required by MFD_SYSCON. Fixes: 553be2830c5f ("phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver") Signed-off-by: Cristian Ciocaltea --- drivers/phy/rockchip/Kconfig | 2 ++ 1 file changed, 2 insertions(+) --- base-commit: 1eb586a9782cde8e5091b9de74603e0a8386b09e change-id: 20240629-rk-hdptx-compile-test-fix-bb0d96a0b225 diff --git a/drivers/phy/rockchip/Kconfig b/drivers/phy/rockchip/Kconfig index 08b0f4345760..490263375057 100644 --- a/drivers/phy/rockchip/Kconfig +++ b/drivers/phy/rockchip/Kconfig @@ -86,7 +86,9 @@ config PHY_ROCKCHIP_PCIE config PHY_ROCKCHIP_SAMSUNG_HDPTX tristate "Rockchip Samsung HDMI/eDP Combo PHY driver" depends on (ARCH_ROCKCHIP || COMPILE_TEST) && OF + depends on HAS_IOMEM select GENERIC_PHY + select MFD_SYSCON select RATIONAL help Enable this to support the Rockchip HDMI/eDP Combo PHY