From patchwork Fri Jul 8 14:15:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9221051 X-Patchwork-Delegate: sboyd@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ECFF760572 for ; Fri, 8 Jul 2016 14:15:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD49428815 for ; Fri, 8 Jul 2016 14:15:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1C2428819; Fri, 8 Jul 2016 14:15:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27EC528815 for ; Fri, 8 Jul 2016 14:15:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754868AbcGHOPp (ORCPT ); Fri, 8 Jul 2016 10:15:45 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:57185 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754746AbcGHOPo (ORCPT ); Fri, 8 Jul 2016 10:15:44 -0400 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OA000OCS2A028D0@mailout2.samsung.com>; Fri, 08 Jul 2016 23:15:37 +0900 (KST) X-AuditID: cbfee61a-f79106d000000835-ad-577fb589d365 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id CA.21.02101.985BF775; Fri, 8 Jul 2016 23:15:37 +0900 (KST) Received: from AMDC1344.digital.local ([106.116.147.32]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OA0007ZQ293ET20@mmp2.samsung.com>; Fri, 08 Jul 2016 23:15:37 +0900 (KST) From: Sylwester Nawrocki To: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org Cc: b.zolnierkie@samsung.com, Sylwester Nawrocki Subject: [PATCH] clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver Date: Fri, 08 Jul 2016 16:15:00 +0200 Message-id: <1467987300-31450-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPJMWRmVeSWpSXmKPExsVy+t9jQd3OrfXhBpN7+Cw2zljPavGx5x6r xYzz+5gsDr9pZ3Vg8ejbsorR4/MmuQCmKC6blNSczLLUIn27BK6MSQ197AUbxComzvVuYFwp 3MXIySEhYCLx8mkXK4QtJnHh3no2EFtIYBajRMfRqi5GLiD7F6PElmU/mEESbAKGEr1H+xhB bBEBB4ldxyYzgdjMAp4Sq+b/AIsLC0RKrD13FsxmEVCVWNmyHqyXV8BN4vbxfUwQy+QkTh6b zDqBkXsBI8MqRonUguSC4qT0XMO81HK94sTc4tK8dL3k/NxNjGBvP5PawXhwl/shRgEORiUe 3hnq9eFCrIllxZW5hxglOJiVRHj3bAYK8aYkVlalFuXHF5XmpBYfYpTmYFES5338f12YkEB6 YklqdmpqQWoRTJaJg1OqgbFU+atH7Iw/09M+vJ3aqrmHf+6JMPPTSdea7EKZQ78FOU71LrhS 0NDiefZz3qXJH5iXbjjN8lsi3PuarlvR+b9T3h4y27jxs8+/xMJ6zXDLQ5ozIlyyzZfuP7S3 Kurb140LXUrFJl97qfyDR2eH566+/lluiYU3GlalT9Rae9Zee+NpuU3OzgxKLMUZiYZazEXF iQCUxzun8gEAAA== Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Any clock dependencies can be properly handled with deferred probing so we can remove core_initcall and switch to a proper loadable platform driver module. This change has been tested on Exynos4412 Odroid U3 based board. Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski --- drivers/clk/samsung/Kconfig | 9 +++++++++ drivers/clk/samsung/Makefile | 2 +- drivers/clk/samsung/clk-exynos-audss.c | 12 +----------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/clk/samsung/Kconfig b/drivers/clk/samsung/Kconfig index 20c5fe9..addc652 100644 --- a/drivers/clk/samsung/Kconfig +++ b/drivers/clk/samsung/Kconfig @@ -9,6 +9,15 @@ config EXYNOS_ARM64_COMMON_CLK bool "Samsung Exynos ARMv8-family clock controller support" if COMPILE_TEST depends on COMMON_CLK_SAMSUNG +config EXYNOS_AUDSS_CLK_CON + tristate "Samsung Exynos AUDSS clock controller support" + depends on COMMON_CLK_SAMSUNG + default y if ARCH_EXYNOS + help + Support for the Audio Subsystem CLKCON clock controller present + on some Exynos SoC variants. Choose M or Y here if you want to + use audio devices such as I2S, PCM, etc. + # For S3C24XX platforms, select following symbols: config S3C2410_COMMON_CLK bool "Samsung S3C2410 clock controller support" if COMPILE_TEST diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile index fc367d4..57f4dc6 100644 --- a/drivers/clk/samsung/Makefile +++ b/drivers/clk/samsung/Makefile @@ -12,7 +12,7 @@ obj-$(CONFIG_SOC_EXYNOS5410) += clk-exynos5410.o obj-$(CONFIG_SOC_EXYNOS5420) += clk-exynos5420.o obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos5433.o obj-$(CONFIG_SOC_EXYNOS5440) += clk-exynos5440.o -obj-$(CONFIG_ARCH_EXYNOS) += clk-exynos-audss.o +obj-$(CONFIG_EXYNOS_AUDSS_CLK_CON) += clk-exynos-audss.o obj-$(CONFIG_ARCH_EXYNOS) += clk-exynos-clkout.o obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7.o obj-$(CONFIG_S3C2410_COMMON_CLK)+= clk-s3c2410.o diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index 4e9584d..bdf8b97 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c @@ -273,17 +273,7 @@ static struct platform_driver exynos_audss_clk_driver = { .remove = exynos_audss_clk_remove, }; -static int __init exynos_audss_clk_init(void) -{ - return platform_driver_register(&exynos_audss_clk_driver); -} -core_initcall(exynos_audss_clk_init); - -static void __exit exynos_audss_clk_exit(void) -{ - platform_driver_unregister(&exynos_audss_clk_driver); -} -module_exit(exynos_audss_clk_exit); +module_platform_driver(exynos_audss_clk_driver); MODULE_AUTHOR("Padmavathi Venna "); MODULE_DESCRIPTION("Exynos Audio Subsystem Clock Controller");