From patchwork Sun Sep 19 09:31:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12504261 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C02B9C433EF for ; Sun, 19 Sep 2021 09:33:33 +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 833EB610A8 for ; Sun, 19 Sep 2021 09:33:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 833EB610A8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TmHaYV8qImbrxJkCvykRJW705VBCWNGv7NiMuM4gGkM=; b=HPcSTeQ2uU14k4 sSAYdDYP1wd/mmt6JbPI8xCKoxPYLDjUWGDfTULQHxWE+H5PcTyt+UkCunioU1i/myVHwJSjJL4+A 047S/br890eXLM2V384deESk7oV4pdFxRL3aKzHwe7frS2Cj+BzU6GmpF9TZPdWIN/xIEslRRDUjq NP4Lb1xTLS3liTEYeeWAH1PBIl88f9poMJry/F/jDoheIZtGoC0ZzWcwQqR2mmrxvN3RM6J5IRG1L OtLwVHZiR7P5fqpEhko1+uuvNFi8x3k/7vbsvGBF5h+qX2QPhh+dz3W9Gm3M6mUFBuHuFjR2b4pRt qht9dX+2F+Fj/hfKt+9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRtAr-00H2SH-0w; Sun, 19 Sep 2021 09:31:49 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mRtAT-00H2O4-Cn for linux-arm-kernel@lists.infradead.org; Sun, 19 Sep 2021 09:31:27 +0000 Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 40A423F331 for ; Sun, 19 Sep 2021 09:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632043884; bh=ZK+VXD8gxhx/mjWHqKBF1YSNqbZHXzRbC1073HoZOfw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pfgD4SJI02C4K19ur8dP+YMThlFbTxyTjZNLVI+KKU9In3ko4s+umNZpxd2bOiqq1 BHiBcUXfblFb62FyfuNEjxGoE1i3qajlhDjNvD+Z9JPGtBOxozscrq5njHoJlqmpcW jKvUlSvitVxYJHyYaB4SlRWmWyLQ8zTCqe+wy97L/IHklsaC65C+R5xuCc4LFhcGDS 9Vni+UK1ded8lTaBq+wb5M8G+28rC8AwAYLV4AZq0GdP6sltjRxd/Ml4A50gUmcnGt ASMLr4i7Ml1NoRofjWqOoRmQEjnqjrtNh3mQfFkmGD6cgmJl54M/6Yaqg2QqATniLr tYDUguVdgF2Dw== Received: by mail-ed1-f70.google.com with SMTP id z6-20020a50cd06000000b003d2c2e38f1fso13084151edi.1 for ; Sun, 19 Sep 2021 02:31:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZK+VXD8gxhx/mjWHqKBF1YSNqbZHXzRbC1073HoZOfw=; b=zTPPQ+iYNx/ys6iuHLJHdTQRqYVCYOWiqBtsPxBDfAK8vbs8bA9Yv4It4CXFSFAQi4 9QYjjNBUyJI1+ZysvMIudPX39ydsVTV7fKhd1rJpsUAcEl2gd8AmLlfAaYFxfns/CIAE 5JkL1CxeYomm0pFHaHRxfzOP7KdcGt5P06EZ/db4lPFM+YiSd5br92pNyt2VPUn9qpEY 16qyaxHi7tEVQhuoFt0nTV+7Vl6O4nfUrD9cVZHZvEyxmU7B7P5o9RD+Q+ezqzEMGL44 OWJuYsMEFpo04EOBEB9XxKgvX1Wt40LeiXJO7c2OS0b83RxBIF/7VeIZ+1Ox07QPE/+q k5yg== X-Gm-Message-State: AOAM5326MWj+HtqHv6VbYzM2xbjadQs9KvtQgXYLE8mfcRxSRyz/M/mK MXV8UqvplkzDa0WubIQB9Jq9p346s2GVlILQYA6DXMNndJfsc1rjCb7dr4L6/g0vHvMVLrzaDMS mUZJ4sOqUuvwhO6fVQVd3i4TS4elMoj5xnjmh77ZwF7Nk1F3ncz5W X-Received: by 2002:a17:906:52c5:: with SMTP id w5mr22093742ejn.567.1632043883945; Sun, 19 Sep 2021 02:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiIdx1f8hVgqGPm9ahXSP2VgGM2d2n4WF4eeiUA+ez9LIqX3F6ubdGXPQ6Oqkcr1zug1//Eg== X-Received: by 2002:a17:906:52c5:: with SMTP id w5mr22093732ejn.567.1632043883779; Sun, 19 Sep 2021 02:31:23 -0700 (PDT) Received: from kozik-lap.lan (lk.84.20.244.219.dc.cable.static.lj-kabel.net. [84.20.244.219]) by smtp.gmail.com with ESMTPSA id p24sm514111edq.27.2021.09.19.02.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 02:31:23 -0700 (PDT) From: Krzysztof Kozlowski To: Russell King , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki , Bartlomiej Zolnierkiewicz , Tomasz Figa , Arnd Bergmann , Olof Johansson , Alim Akhtar , Chanwoo Choi , Pankaj Dubey Subject: [PATCH v2 2/3] soc: samsung: exynos-chipid: convert to a module Date: Sun, 19 Sep 2021 11:31:13 +0200 Message-Id: <20210919093114.35987-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210919093114.35987-1-krzysztof.kozlowski@canonical.com> References: <20210919093114.35987-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210919_023125_629876_8C8E02F7 X-CRM114-Status: GOOD ( 21.06 ) 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 Exynos ChipID and ASV (Adaptive Supply Voltage) driver is not essential to system boot and it can successfully be built and loaded as module. This makes core kernel image smaller and reduces the memory footprint when multi-platform kernel is booted on non-Exynos board. Usually it is also distro-friendly. Add multiple authors of the driver since its conversion from mach-exynos, ordered alphabetically by first name. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sam Protsenko --- drivers/soc/samsung/Kconfig | 3 ++- drivers/soc/samsung/Makefile | 3 ++- drivers/soc/samsung/exynos-chipid.c | 11 ++++++++++- drivers/soc/samsung/exynos5422-asv.c | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/soc/samsung/Kconfig b/drivers/soc/samsung/Kconfig index 1f643c0f5c93..fe139f26d093 100644 --- a/drivers/soc/samsung/Kconfig +++ b/drivers/soc/samsung/Kconfig @@ -13,13 +13,14 @@ config EXYNOS_ASV_ARM depends on EXYNOS_CHIPID config EXYNOS_CHIPID - bool "Exynos ChipID controller and ASV driver" if COMPILE_TEST + tristate "Exynos ChipID controller and ASV driver" if COMPILE_TEST depends on ARCH_EXYNOS || COMPILE_TEST select EXYNOS_ASV_ARM if ARM && ARCH_EXYNOS select MFD_SYSCON select SOC_BUS help Support for Samsung Exynos SoC ChipID and Adaptive Supply Voltage. + This driver can also be built as module (exynos_chipid). config EXYNOS_PMU bool "Exynos PMU controller driver" if COMPILE_TEST diff --git a/drivers/soc/samsung/Makefile b/drivers/soc/samsung/Makefile index 0c523a8de4eb..2ae4bea804cf 100644 --- a/drivers/soc/samsung/Makefile +++ b/drivers/soc/samsung/Makefile @@ -1,8 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_EXYNOS_ASV_ARM) += exynos5422-asv.o +obj-$(CONFIG_EXYNOS_CHIPID) += exynos_chipid.o +exynos_chipid-y += exynos-chipid.o exynos-asv.o -obj-$(CONFIG_EXYNOS_CHIPID) += exynos-chipid.o exynos-asv.o obj-$(CONFIG_EXYNOS_PMU) += exynos-pmu.o obj-$(CONFIG_EXYNOS_PMU_ARM_DRIVERS) += exynos3250-pmu.o exynos4-pmu.o \ diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index dcd9a08ce706..b2627a3a127a 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -128,6 +129,7 @@ static const struct of_device_id exynos_chipid_of_device_ids[] = { { .compatible = "samsung,exynos4210-chipid" }, {} }; +MODULE_DEVICE_TABLE(of, exynos_chipid_of_device_ids); static struct platform_driver exynos_chipid_driver = { .driver = { @@ -137,4 +139,11 @@ static struct platform_driver exynos_chipid_driver = { .probe = exynos_chipid_probe, .remove = exynos_chipid_remove, }; -builtin_platform_driver(exynos_chipid_driver); +module_platform_driver(exynos_chipid_driver); + +MODULE_DESCRIPTION("Samsung Exynos ChipID controller and ASV driver"); +MODULE_AUTHOR("Bartlomiej Zolnierkiewicz "); +MODULE_AUTHOR("Krzysztof Kozlowski "); +MODULE_AUTHOR("Pankaj Dubey "); +MODULE_AUTHOR("Sylwester Nawrocki "); +MODULE_LICENSE("GPL"); diff --git a/drivers/soc/samsung/exynos5422-asv.c b/drivers/soc/samsung/exynos5422-asv.c index ca409a976e34..475ae5276529 100644 --- a/drivers/soc/samsung/exynos5422-asv.c +++ b/drivers/soc/samsung/exynos5422-asv.c @@ -503,3 +503,4 @@ int exynos5422_asv_init(struct exynos_asv *asv) return 0; } +EXPORT_SYMBOL_GPL(exynos5422_asv_init);