From patchwork Wed May 27 11:26:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 11572637 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 971A192A for ; Wed, 27 May 2020 11:26:34 +0000 (UTC) Received: by mail.kernel.org (Postfix) id 9245620873; Wed, 27 May 2020 11:26:34 +0000 (UTC) Delivered-To: soc@kernel.org Received: from mail-lf1-f68.google.com (mail-lf1-f68.google.com [209.85.167.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45A6D207D3 for ; Wed, 27 May 2020 11:26:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XsUGywVb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45A6D207D3 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=anders.roxell@linaro.org Received: by mail-lf1-f68.google.com with SMTP id x27so14220804lfg.9 for ; Wed, 27 May 2020 04:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7O70g2lJGWAJBSxv7+BPv+EgaUlJHCXJMM3QrFbfLoU=; b=XsUGywVbPPu2a5crGLJmxPTCsuzR0OuIQ+aBzOOBv++1v3NKjBLrrjSSZcDpiYN0qf Dqa0KgBDDL2GMXstARbs0S3GGlmSB6moGoADwt2Gf9llGEkgAQoEEbIxpiCeugl/wXdJ 1Y7er1GA02R3sgkVvwl7nNkN/XKDaMMP9Wjvt0SWx7XmF54qZM7DmAzM4MJwI1dZ8eli ASI8yK3ag/j5xU4oDjT5/oP5EaLGYEpesbrFqrn6AVy/NiIea1s2hRKTrr2EHjKvVfgG 4J+BYiAZgDrSD/C3CkWmD+A/yT8MjSYIMj7StC2bFYg9auoVk0KpMirlMocizL+A561/ 0/0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7O70g2lJGWAJBSxv7+BPv+EgaUlJHCXJMM3QrFbfLoU=; b=gyNiqALzf56STSEu50XazrZjzVlFdtLsuH9x+HYn2+RUX7vlnss364pdzYd7NDWrwN V0znYPTnUUwiEzC969ZksjCoFvKVpOZ1+jxNaXACUsGi3D7H35wgiA2WEJyRv7MByEtz RV6liF2hEurzyfZ1TSbD8RnQjgv+x0EHqPTpstsRPDJCm0hRfA0DnOvp8Nw3P/nJoL/C DCwYv9zuqRG3VGo798zwp9FuOseCSVb2EaMNeUfXLu/SUAgfy7bWQaKGlXg7jFiMuyCL znjatOYk+dbfCayP3GZ16q252qm9Ol/VVNh/JxoKZslAnwgFi0QKqPFFrDaq2brsBTIL Q4eA== X-Gm-Message-State: AOAM532gxPohgRgFnw+jVbDb3uIznpWqNEJIAbypKCS4NwP41KBjMX2o v64fVDHqiS3d8Sv21OezItROCLSIfms= X-Google-Smtp-Source: ABdhPJxqhuM7NA8BFMzydGM+AFjiGQCKOMTJMKG2dfNheWXSg5exJmnEkRYX48DfquyDmwLY2gQZtQ== X-Received: by 2002:ac2:5604:: with SMTP id v4mr2364028lfd.124.1590578792196; Wed, 27 May 2020 04:26:32 -0700 (PDT) Received: from localhost (c-8c28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.140]) by smtp.gmail.com with ESMTPSA id n22sm627557ljj.138.2020.05.27.04.26.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2020 04:26:31 -0700 (PDT) From: Anders Roxell List-Id: To: soc@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh@kernel.org, linus.walleij@linaro.org, Anders Roxell Subject: [PATCH 5/5] power: vexpress: make the reset driver a module Date: Wed, 27 May 2020 13:26:08 +0200 Message-Id: <20200527112608.3886105-6-anders.roxell@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200527112608.3886105-1-anders.roxell@linaro.org> References: <20200527112608.3886105-1-anders.roxell@linaro.org> MIME-Version: 1.0 Today the vexpress power driver can only be builtin. Rework so it's possible for the vexpress power driver to be a module. Signed-off-by: Anders Roxell --- arch/arm/mach-vexpress/Kconfig | 1 - drivers/power/reset/Kconfig | 5 +++-- drivers/power/reset/vexpress-poweroff.c | 12 +++++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig index 065e12991663..4b54d8cf897d 100644 --- a/arch/arm/mach-vexpress/Kconfig +++ b/arch/arm/mach-vexpress/Kconfig @@ -15,7 +15,6 @@ menuconfig ARCH_VEXPRESS select NO_IOPORT_MAP select PLAT_VERSATILE select POWER_RESET - select POWER_RESET_VEXPRESS select POWER_SUPPLY select REGULATOR if MMC_ARMMMCI select REGULATOR_FIXED_VOLTAGE if REGULATOR diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index f07b982c8dff..8468d42b0198 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -189,9 +189,10 @@ config POWER_RESET_VERSATILE reference boards. config POWER_RESET_VEXPRESS - bool "ARM Versatile Express power-off and reset driver" + tristate "ARM Versatile Express power-off and reset driver" depends on ARM || ARM64 - depends on VEXPRESS_CONFIG=y + depends on VEXPRESS_CONFIG + default VEXPRESS_CONFIG help Power off and reset support for the ARM Ltd. Versatile Express boards. diff --git a/drivers/power/reset/vexpress-poweroff.c b/drivers/power/reset/vexpress-poweroff.c index 1fdbcbd95fc2..b1eef95132d9 100644 --- a/drivers/power/reset/vexpress-poweroff.c +++ b/drivers/power/reset/vexpress-poweroff.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include @@ -146,4 +147,13 @@ static struct platform_driver vexpress_reset_driver = { .suppress_bind_attrs = true, }, }; -builtin_platform_driver(vexpress_reset_driver); + +static int __init vexpress_reset_init(void) +{ + return platform_driver_register(&vexpress_reset_driver); +} +module_init(vexpress_reset_init); + +MODULE_AUTHOR("Pawel Moll "); +MODULE_DESCRIPTION("Vexpress reset driver"); +MODULE_LICENSE("GPL v2");