From patchwork Tue Sep 28 23:56:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: William McVicker X-Patchwork-Id: 12524193 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B468AC433EF for ; Wed, 29 Sep 2021 00:03:05 +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 80870613A9 for ; Wed, 29 Sep 2021 00:03:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 80870613A9 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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:Cc:To:From:Subject:References: Mime-Version:Message-Id:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KzAz6+quA58XIeCmErdP1r3KiikAcaikq3KDk04TE+g=; b=OF51hY3IjGgwauQuGh6MhmfX2o VmH2203aki3CugO2JiGaNQX5WVeY3yxO5t4WACLCaJ318c0OdqZd03gKTUDAzLeP0qsXHFlEVg9tv mqu0ZF9z/T1hFV18fef7IqkNA5M3eRHjvg7irLCYW/fT+PbAwa6WyWl42E7XRb4kG3R3xLYQZBviz ln0OC88s2ktN/cMPEJSXWMv2KLaDueWX36t+ynzUtZzSVYUndCnRVEifl3bIu3okkoUw4sRAObFAR Q5qVhKOWc+ikTKn7I3AHNPiy65e3WXaWbz6wsjbU9EJm2sz61J2rFHMyYtC4qlV3WbjIWU+X7YnAI knL+NCBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVN2O-009PK5-Hq; Wed, 29 Sep 2021 00:01:28 +0000 Received: from mail-pj1-x104a.google.com ([2607:f8b0:4864:20::104a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVMyM-009NSH-W7 for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 23:57:20 +0000 Received: by mail-pj1-x104a.google.com with SMTP id v19-20020a17090a459300b0019c6f43c66fso292654pjg.3 for ; Tue, 28 Sep 2021 16:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=ixpCREpropOCGCRbCNTt+ILPYTGJK7YTyRDE4hs8Q3U=; b=TsgdlJd06yMGzkDYI5YTtAleRwmiUdX8LJDX+oB2En6Uwcaj/G8FgoXqLYqf/WvkoP SB55oZLt98evS2kyJBBsT9PAH4/+ZKx3m1L0ppa3KKdu0Cstd5wV6LY6EwabpqF8Ekmy KiG6I5Nhx5SXyIyADyBC2PB2BDs3qDmypwhG8lJkf2YhkkB8XHOHIoL5dDTP8We7DiHM I0CPrUmV4v7SBtolQ3bmlYO3h/Ar1qWbt01GI7w6Ky+w+MbX42RaG5K1KJQRFVILOh0S lQ0M6v2EqTOwU6eiStZ0lDufQN0xMYnMkbxq4N+Jq3CAI0VIe7qRAOZcQScyljKJzJB8 a/rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=ixpCREpropOCGCRbCNTt+ILPYTGJK7YTyRDE4hs8Q3U=; b=n2c+zcXYQyR1b7GnoYzX6idRt3abE1WUJZ1DYdI+X/17ARHw7Ikd4biYCJwbOXHIe/ IpbdEtALVWTup6AQDY9aVPgUSSPSU6mb3r4KQKu/IORIng7t0LT7bVqjwjxAjH6AXLYa DKgvo7JQN7jf2eESN4pPR8bQasqBVoiaMrKtn/vQwzEmfsFA8L7vVwRdqQMNBLbNwAwL GOZ5rmvw0+9GoqxzPUfM/Qdr3Wz9uaR2DhB5ycj4RhkKmPV8vylwaFNIPVQ+nydp2IOr V0HghOHU/JXikS4s6corWa8lX04r8+l6cxjn7Bzo8ekHg+FxQ4aBWJtE5tfxcImseZxH 7x5g== X-Gm-Message-State: AOAM532PX4USRWm5mWI0RPCptTjnhIkZlay0K6kf408Uf2DYnUkcEhGO vWZd7yo7WAgyQb92LI9SVJpM4uq6uzISOrplrpo= X-Google-Smtp-Source: ABdhPJydPTfhvEcIZ2rCgH9PDFfwCp4cgW7lTL1eXYIXByXNU/KAKSzrz+hFAOGr6G3aLwmq27iWLkEqkVEY8LO1tRk= X-Received: from willmcvicker.c.googlers.com ([fda3:e722:ac3:cc00:24:72f4:c0a8:2dd0]) (user=willmcvicker job=sendgmr) by 2002:a05:6a00:2309:b0:444:6be1:c499 with SMTP id h9-20020a056a00230900b004446be1c499mr458802pfh.62.1632873436877; Tue, 28 Sep 2021 16:57:16 -0700 (PDT) Date: Tue, 28 Sep 2021 23:56:28 +0000 In-Reply-To: <20210928235635.1348330-1-willmcvicker@google.com> Message-Id: <20210928235635.1348330-12-willmcvicker@google.com> Mime-Version: 1.0 References: <20210928235635.1348330-1-willmcvicker@google.com> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog Subject: [PATCH v2 11/12] soc: samsung: pm_domains: modularize EXYNOS_PM_DOMAINS From: Will McVicker To: Russell King , Krzysztof Kozlowski , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Sylwester Nawrocki , Tomasz Figa , Chanwoo Choi , Linus Walleij , Alessandro Zummo , Alexandre Belloni , John Stultz , Thomas Gleixner Cc: Lee Jones , Geert Uytterhoeven , Saravana Kannan , Will McVicker , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_165719_072463_BDE71D42 X-CRM114-Status: GOOD ( 17.69 ) 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 Convert the Exynos PM Domains driver into a module. This includes setting EXYNOS_PM_DOMAINS as tristate and removing it from being auto-selected by ARCH_EXYNOS. Instead, the config will use "default y if ARCH_EXYNOS" which allows us to set it to a module via the defconfig now. Signed-off-by: Will McVicker --- arch/arm/mach-exynos/Kconfig | 1 - arch/arm64/Kconfig.platforms | 1 - drivers/soc/samsung/Kconfig | 3 ++- drivers/soc/samsung/pm_domains.c | 12 +++++++----- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e97e1d8f7b00..2ad19a08bf06 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -15,7 +15,6 @@ menuconfig ARCH_EXYNOS select EXYNOS_THERMAL select EXYNOS_PMU_ARM select EXYNOS_SROM - select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select GPIOLIB select HAVE_ARM_ARCH_TIMER if ARCH_EXYNOS5 select HAVE_ARM_SCU if SMP diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index e5e4b9b2fb97..e44d5e9f5058 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -91,7 +91,6 @@ config ARCH_BRCMSTB config ARCH_EXYNOS bool "ARMv8 based Samsung Exynos SoC family" - select EXYNOS_PM_DOMAINS if PM_GENERIC_DOMAINS select HAVE_S3C_RTC if RTC_CLASS select PINCTRL select PM_GENERIC_DOMAINS if PM diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig index fdf1162ec98b..e4743c29f73c 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig @@ -37,8 +37,9 @@ config EXYNOS_PMU_ARM depends on ARCH_EXYNOS || (ARM && COMPILE_TEST) config EXYNOS_PM_DOMAINS - bool "Exynos PM domains" if COMPILE_TEST + tristate "Exynos PM domains" depends on (ARCH_EXYNOS && PM_GENERIC_DOMAINS) || COMPILE_TEST + default y if ARCH_EXYNOS config SAMSUNG_PM_DEBUG bool "Samsung PM Suspend debug" diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c index 5ec0c13f0aaf..6144733fa3c2 100644 --- a/drivers/soc/samsung/pm_domains.c +++ b/drivers/soc/samsung/pm_domains.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -160,8 +161,9 @@ static struct platform_driver exynos_pd_driver = { } }; -static __init int exynos4_pm_init_power_domain(void) -{ - return platform_driver_register(&exynos_pd_driver); -} -core_initcall(exynos4_pm_init_power_domain); +module_platform_driver(exynos_pd_driver); + +MODULE_DESCRIPTION("Exynos PM domains driver"); +MODULE_AUTHOR("Marek Szyprowski "); +MODULE_AUTHOR("Krzysztof Kozlowski "); +MODULE_LICENSE("GPL v2");