From patchwork Thu Aug 5 07:50:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12420559 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=-17.4 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=ham 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 73474C4338F for ; Thu, 5 Aug 2021 07:52:58 +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 2FEDA61008 for ; Thu, 5 Aug 2021 07:52:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2FEDA61008 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=bgBSR4o3bd45im7nt1H7Bn+qkbf/poAHEN4YH0yMQLg=; b=lBfHquQ9tIBqVg zBfEVziULA9pTwjL4Q28IOc2uCIteDnom8bIpTLCtb6H1BeIU0X+Kt7y3UzVmgcRhl9FWLQ0mXoqM 3nNBxpgohxibLzVOlop0G24HFFDTUpxcEUY50DoqEJuM8UDxzJIP8mZe88WPSt14ojmZGavduaqc0 tbHiUSb1sXQlWa/HIja0kSeBgeYRrT0084kEfXvzuSpgXjS0Je4HX5FWV/jnoCjpRFEc12//snO27 ec/ZDUwWXfu/bN2NCUR79y/U3vvMcmGvF1cXgZYlO2bQHfr4l0FP4YZU+SM35ibUSQbqDvcyHksaA GHP2IMBvyc4dx8H6OWFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBY9e-008TxL-83; Thu, 05 Aug 2021 07:51:02 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBY9I-008TnE-LK for linux-arm-kernel@lists.infradead.org; Thu, 05 Aug 2021 07:50:44 +0000 Received: by mail-wr1-x431.google.com with SMTP id c9so5240583wri.8 for ; Thu, 05 Aug 2021 00:50:39 -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=zUZnybOtcqfD5sy4n9GcAXWKsLqQn6Mi0yNhn1TJs8Q=; b=b40vf5opQl78jOOKEADu2/NGxsLEAHcx8zb/g/Xv69lyRp/lPO5wRx52tjAhOsi74g R+0P7hiy5tO+TFrrSQtM++yqPRACRZJOju/FYgYAiraWnkfJw9nvSS/fwRTA18SU3Y/F eFfC7B3Qlf6jtN0ehG2ufafKVp4Yzxq5fpSF2uVD0zPkSsiFtCJtOC4RhGibi/aoQXmW Sd06F1YpApSGrMx3SpV/9Hrk8nvxi1NCf3TTvcWslxQ4jzEHhGjQ1q4X21BuW/YM2l55 OiOOsBv1uUs5RKn7QYTv7wL+7MzbJxgep3Cu2AvR3hEEUwjGqW8+yflMCMgfxi0CkQcF 6ClA== 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=zUZnybOtcqfD5sy4n9GcAXWKsLqQn6Mi0yNhn1TJs8Q=; b=UFOlwNm6EeNzlnshV2gbbJsIOYTvzX2LAiyvLZOcMAXKeQ5R7ilV3B79WQH2fAIkXf /GwTI+O2UqasX8NqMpnc9bMUryI3/Le2Ml+0sUwJNdEX3Sj7Ffoqm9CIrJrHdjVMPPSr FFpfnR/CXcypDmtt3UtUXI0pl6e9UP+PbVhLGFM6xbdmQhlTpwyH2ok8JOY7+aQyaUOI pyeFEaLNCQrI2FFMW1upKcFkF1V/LgBUoyTnM+ge1DqE4x9SI5YsXo9a01X7KObZJeTm t5r8BLwloGsTCHbho+/ieg3PH87IOxQVOruduhdKO/jPzvLERKKaqbrGci+g6wo9VkEh ApQg== X-Gm-Message-State: AOAM530Ouqah2VDI79Z+NdxrUwmOBNecKEQzeVOyvDZPYSDA1xY8/T3s 2Nk3hc2ccCzRzNyznJg+TaVlFg== X-Google-Smtp-Source: ABdhPJy+3j19yabOOIazM6nVcJ8O5oEhgcEZA226SMM1ZKJ/q0ZyCET2ren5wvi/NjD7Zm6ek9eg2Q== X-Received: by 2002:adf:dcd1:: with SMTP id x17mr3503054wrm.59.1628149838895; Thu, 05 Aug 2021 00:50:38 -0700 (PDT) Received: from localhost.localdomain ([109.180.115.228]) by smtp.gmail.com with ESMTPSA id h16sm5154491wre.52.2021.08.05.00.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 00:50:38 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Elliot Berman , Bjorn Andersson , Greg Kroah-Hartman Subject: [PATCH 2/3] reboot: Export reboot_mode Date: Thu, 5 Aug 2021 08:50:31 +0100 Message-Id: <20210805075032.723037-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210805075032.723037-1-lee.jones@linaro.org> References: <20210805075032.723037-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210805_005040_760034_8A716D79 X-CRM114-Status: GOOD ( 12.76 ) 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 From: Elliot Berman Export reboot_mode to support kernel modules wishing to modify reboot_mode. Signed-off-by: Elliot Berman Reviewed-by: Bjorn Andersson Reviewed-by: Greg Kroah-Hartman Signed-off-by: Lee Jones --- kernel/reboot.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/reboot.c b/kernel/reboot.c index a6ad5eb2fa733..7ca414aa070b6 100644 --- a/kernel/reboot.c +++ b/kernel/reboot.c @@ -32,7 +32,9 @@ EXPORT_SYMBOL(cad_pid); #define DEFAULT_REBOOT_MODE #endif enum reboot_mode reboot_mode DEFAULT_REBOOT_MODE; +EXPORT_SYMBOL_GPL(reboot_mode); enum reboot_mode panic_reboot_mode = REBOOT_UNDEFINED; +EXPORT_SYMBOL_GPL(panic_reboot_mode); /* * This variable is used privately to keep track of whether or not From patchwork Thu Aug 5 07:50:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 12420561 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=-17.4 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=ham 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 CF51AC4338F for ; Thu, 5 Aug 2021 07:53:11 +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 9790460E53 for ; Thu, 5 Aug 2021 07:53:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9790460E53 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=odU9q1bLul1beHOe3zfHOHID4jsG6PaQiD+NJntD5AM=; b=ZGkrtMzpBFwLys yg9WPqiUkog7k8LkR9Vy7puZS/OU9XYgEzcxCR0JZJ62VDsSlOqDnIwNyumgyfXybU3k7GujPitV6 C5BVm7Hs2bq8tbiNBGG8pCSxvl/mYZXDO0dm0I9SY249a77ynuU2L/2A3YT7kk6PtWPfDhtPatuC+ VVKlJC0m+04qd5wewOjl8dnoOHZ3MeGvkWnx/p7pfEdkWk9xcyi9xDcl6eCJhAD4rDR/np1z1+IdW nVskTF+YCQleVwBqA+YdSYWzE0hjeUyhMwYjAxlDGfKX9046oQuRHGuyQCRzWc1EhhacZI+QmTYvA H/VJ32NPZEUDWjxV/r/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBYA8-008UBV-1P; Thu, 05 Aug 2021 07:51:32 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mBY9J-008Tnd-Qw for linux-arm-kernel@lists.infradead.org; Thu, 05 Aug 2021 07:50:45 +0000 Received: by mail-wr1-x42b.google.com with SMTP id d8so5263129wrm.4 for ; Thu, 05 Aug 2021 00:50:41 -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=CCSL/LzkhNi9/Yo+HPZHeRZeUrOizjlzKGlapanJ1xM=; b=EGafhqL1Z5qYCyFU9z7qCD4nHfiAFaHvh7zujYFKyXSfInrII2dGXP77Je5mwrf/ot ROPPuNlOtT3GtNKXrSrIxPLiNnEkUiOxxvxQ7C7E79JNOMr5elb/t0U4KCc3raZNxWdU bTPvtPuCdUXKSQTZuJOa4/AQbKomztVCvJo30PunNBkedhCyJYgSJsbJ/DhGx+caypLn EYu0RaDOohf6aLBMsdqOfid7cuf5bckmNiWA7By44CkPYFW/2zTXbPjEwpdwEiXw3BRO /MvzZIdIHEya9M3y1fd9S0zJB7e8NvDnPYw5fA+c+YKmATmvdaI1z1lx54f30adYdNMU /UHQ== 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=CCSL/LzkhNi9/Yo+HPZHeRZeUrOizjlzKGlapanJ1xM=; b=HTvcohTobcQN8dJrUfKHDr6rILLXbUcICtl6kEnDRPzHCTnl4WnIp3FgjZOf7Ky0A+ sndbip/ezoK9lQGojqWBlL/oaOph7ky9tA2XuyWuqTglOTospjpUDQQBrsv0nAw9G3zT xmCN4sLWhQ4GNHWwvaAN2gxtYtE4nQFf389Aw3Uggdh1kTrTWyEoS8HmxyB24B34Ruw9 aYVEqn+d3iVZgoaEim2CGK96DEogL7qwblLZrWc/iDB4ombeJOUctSmSn/33VlVQPwsu TBc6qaHTADCOTeNLP+7I5o0ALI9tBwqnQ0RnW1Xkg4NqzJy0oyfWczobdtAcBmL4Lvr7 mRWg== X-Gm-Message-State: AOAM533H0dR/4qo+0xNNJkuvWh1mMcMHJ0AjFX+A6bdayylio2JBN2K8 VAmI06jItjDrmHXa08qHHazbAQ== X-Google-Smtp-Source: ABdhPJyXq2uFNzdT1Lkr6Bc6wkcyQlArBSXonBxiZ9uC4RsgaiSryy2j2LFgganO1LozKse60VZKYg== X-Received: by 2002:adf:e9ca:: with SMTP id l10mr3635782wrn.37.1628149839997; Thu, 05 Aug 2021 00:50:39 -0700 (PDT) Received: from localhost.localdomain ([109.180.115.228]) by smtp.gmail.com with ESMTPSA id h16sm5154491wre.52.2021.08.05.00.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 00:50:39 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Elliot Berman , Sebastian Reichel Subject: [PATCH 3/3] power: reset: Enable tristate on restart power-off driver Date: Thu, 5 Aug 2021 08:50:32 +0100 Message-Id: <20210805075032.723037-4-lee.jones@linaro.org> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210805075032.723037-1-lee.jones@linaro.org> References: <20210805075032.723037-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210805_005041_954459_8BC8AFD9 X-CRM114-Status: GOOD ( 14.02 ) 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 From: Elliot Berman Since reboot_mode is an exported symbol, restart power-off driver can be compiled as module. Signed-off-by: Elliot Berman Signed-off-by: Lee Jones Acked-by: Sebastian Reichel --- drivers/power/reset/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index 4d1192062508d..e155b2e2a75c4 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -192,7 +192,7 @@ config POWER_RESET_REGULATOR power regulator defined in the devicetree. config POWER_RESET_RESTART - bool "Restart power-off driver" + tristate "Restart power-off driver" help Some boards don't actually have the ability to power off. Instead they restart, and u-boot holds the SoC until the