Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2221380ybh; Mon, 9 Mar 2020 01:20:16 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvboKtb13a90Tb57lipVToy+FeTdwvgMQH1rYE5eSQT+S1iOs5oP4XXHKiVQKAQTjfTlB5i X-Received: by 2002:aca:5508:: with SMTP id j8mr644510oib.71.1583742016175; Mon, 09 Mar 2020 01:20:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583742016; cv=none; d=google.com; s=arc-20160816; b=yC3KcigRC1w7uRPatDLkS4KTEoY+HwN+OptA8rzvW5YICIIVB1aT+VxAW9I2e9Fisz Ac8yvIW9KiXDkE0T9+wAKFIapLcmNWv0SDriFaNLNKvWUmanM0uyfE1DzRHqMd+4euJ2 5fw/rn0Y9C93cdYi8QU01qC0rEIk2z7sqoMBGiMEGT2lEINcR2Q7jvvtmgNRSeG+UHgg UkcSuSKv1sQcY1IKleYB4LmcFOkgGJO3jgLIxOCPnWL5pdx5yDYdi+xNdYsHiywXkZil WjMx4rOlA3DvfL1MnkOyAapjW/ix2OWXQYgxKArBwU03CiKf8Nrpj9vE847KDdFZ+F1B lGYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=IVmmUD2LX/XKO2jYcRB3hPlqs1LzccGE0vVFCynCeIQ=; b=NNIURqOAqywaHfdnLmZvGksoYib4pe0Uij1etQtjp+eTx6hwYevTpAVVgmcLczAhbJ 6zMUO6rn4v+RvJ+Yv/KrQaDDQp5BctTvaScwXd0rcpypejaOeiSiHF1r1f4oVrPAge5T KmNTQb2yhIICldNkUn8a2yFO23LczO7UcYi3IFSNtoEJ8VMMEFCxfNOfd1AbpI7i96vJ LhCGgC46H3ejarspwmaz2re7OBM7QZkbNrI3m83vSojeogiE2r9Rshl5gKU87I9VkGRj C7CvdljPmuAjnCc+aUpLg8Q8hZHKFsRqei0hie0btfq1scUDl9U6uUwN0E019R0uSBJv glGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T8JfBJxZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q16si5423393otc.293.2020.03.09.01.20.04; Mon, 09 Mar 2020 01:20:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=T8JfBJxZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726530AbgCIITQ (ORCPT + 99 others); Mon, 9 Mar 2020 04:19:16 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:53958 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726495AbgCIITO (ORCPT ); Mon, 9 Mar 2020 04:19:14 -0400 Received: by mail-pj1-f66.google.com with SMTP id l36so1266317pjb.3; Mon, 09 Mar 2020 01:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=IVmmUD2LX/XKO2jYcRB3hPlqs1LzccGE0vVFCynCeIQ=; b=T8JfBJxZhiNslsh1cb88g0iyg5Q3MO7I8FbcK7sDEiY+HOhUV1r6ZjD9yFzTbVowZ0 yhAajULCJsCJDzfGvl+IBZr6CtwW3P/vDya2QGwsZl1NF2F1md+R00gz2G1sV3wveeu0 x2SBI3zwsF+yTfEYUWs+tT3vEc1gSGt5QmTjJKd8N+ru3PyGRjN/MbLvZ9n0J21vVUeG hcTgpMqNnN2CBhlHVmfFEj0QazxS8MKT9jlUu6yFmorOjrjF3huvF+DZowAJJbuS/Nuo fi5+0k4GUR7ZA6XKv+Gaw79IVQfaAZKO/Xi5HGTszOZ2Bn8o1AfrGkb0p6IDqROi2kXq VKmQ== 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:in-reply-to:references; bh=IVmmUD2LX/XKO2jYcRB3hPlqs1LzccGE0vVFCynCeIQ=; b=AJTENxVKyBBjCeUHowjqkWQwkUAY3IUx72kJvZ2l+4g6cavPydrp0mA7UXALB0kqbJ Y+NMNOhTrX78rF6lniwgqFsH4SsGjH6932Rq2SbB5Ut/7LDiMyEFEXNqEaEGA1eQAmrB u46C41fdDZRSbBuJ/tis54IrqTSSNsjd5SjUed6oTB8FZV82moFsmnSbAg27Mtcirpb+ vB3S/bvTUXaN5RhCGW7uNjJscNpqulT21J3jJFRsAHvS85R0gDYjkp1JbB7z0KNoK3ow Waa0hh7yJuXmBioI+yxfe+QnhiflVZXLLRis9ATv8m2qsWog2HGT8WQg573btzK9Li0E mm4g== X-Gm-Message-State: ANhLgQ364kVCp02gs5Tq7dVC0gBUSxma5B7rOU3Ll1wIO7L0vPChA5+4 XHhE61iEDNOJmQOgCwkJ2kUZ0MGM X-Received: by 2002:a17:90a:a483:: with SMTP id z3mr12870263pjp.43.1583741952723; Mon, 09 Mar 2020 01:19:12 -0700 (PDT) Received: from sh03840pcu.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id 193sm21862277pfu.181.2020.03.09.01.19.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Mar 2020 01:19:12 -0700 (PDT) From: Baolin Wang To: sre@kernel.org Cc: baolin.wang7@gmail.com, orsonzhai@gmail.com, zhang.lyra@gmail.com, kernel-team@android.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module Date: Mon, 9 Mar 2020 16:18:46 +0800 Message-Id: <12b6c11ec62956173fcd84581720b4e0aed54a11.1583740881.git.baolin.wang7@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change the config to 'tristate' and use module_platform_driver() to allow the SC27XX poweroff driver building into a module, as well as adding some mudule information. Signed-off-by: Baolin Wang --- drivers/power/reset/Kconfig | 2 +- drivers/power/reset/sc27xx-poweroff.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index 513efe8..8903803 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -248,7 +248,7 @@ config SYSCON_REBOOT_MODE action according to the mode. config POWER_RESET_SC27XX - bool "Spreadtrum SC27xx PMIC power-off driver" + tristate "Spreadtrum SC27xx PMIC power-off driver" depends on MFD_SC27XX_PMIC || COMPILE_TEST help This driver supports powering off a system through diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c index 91b5ece..6986307 100644 --- a/drivers/power/reset/sc27xx-poweroff.c +++ b/drivers/power/reset/sc27xx-poweroff.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -71,4 +72,8 @@ static int sc27xx_poweroff_probe(struct platform_device *pdev) .name = "sc27xx-poweroff", }, }; -builtin_platform_driver(sc27xx_poweroff_driver); +module_platform_driver(sc27xx_poweroff_driver); + +MODULE_DESCRIPTION("Power off driver for SC27XX PMIC Device"); +MODULE_AUTHOR("Baolin Wang "); +MODULE_LICENSE("GPL v2"); -- 1.9.1