From patchwork Mon Jan 8 03:33:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 10148957 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 D7362601A1 for ; Mon, 8 Jan 2018 03:33:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDB242887A for ; Mon, 8 Jan 2018 03:33:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2B1F28885; Mon, 8 Jan 2018 03:33:21 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 79A412887A for ; Mon, 8 Jan 2018 03:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755148AbeAHDdU (ORCPT ); Sun, 7 Jan 2018 22:33:20 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:44662 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755245AbeAHDdR (ORCPT ); Sun, 7 Jan 2018 22:33:17 -0500 Received: by mail-pf0-f193.google.com with SMTP id m26so5058188pfj.11 for ; Sun, 07 Jan 2018 19:33:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=IukNW906p8w5XXniPXJCMw0iQikE81Ge8dKcvN0IPiw=; b=BFgx5tTlb5fr9eaTDDjmEWyjHkXLaRiE9Ck8YCZ7+a1CT6DoLbDp4hz1opBOcMmtOG Q6czzb2OLYV3OewsOOrF8A3mR2lqsEezvKAifkv3PCm/BmQ3+KieKvNMhHO6Va1Rg2Pb rJnhG7d3FyDHpWXMavrSkNqV7x/i9NDv770nc= 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; bh=IukNW906p8w5XXniPXJCMw0iQikE81Ge8dKcvN0IPiw=; b=anbUezQ3Sq+TwMdKti4p4F/uCiWtcJP+8R5oJBfp9cT8EatVZC8XF6Lwe3Tojj9iPv MdE4BIMMTShfl9Uc7Nm6wZKgmR/2M+LnrPNJHAuf6MjjTsudtkMaWcT6ZInkwpLWtCEj CQ9B1D8mp+vd2/DgK5amBMuKR4D7Ybq2pE0OOch8aoWZwUDhjCo8RO1Eg/zlt+8R/mkS 63tu42HQlVPtzZYAiFOwsIDqKMwOhWg2ObVv/SKHVLHhTohhn1g7JQ1mfi3EhNv1S4do nTisFU2WMVhCqvxmRXdfOJpDJVPCJM9WeH9tJMT39r3Dl8vVguiaU19+ShG7XkGzD/6t w0zQ== X-Gm-Message-State: AKGB3mLM9kEcpYgg2ZXJuI4uZnsSKNvJtaJgCUPERTkLbstSZY2mwD7f +doByI184UGmByr4s7i/IaphQQ== X-Google-Smtp-Source: ACJfBosSAqE7uDbp/5qNCC4JhDMZw3nHOBelpeUy3PGpBiE/PfKekakJz1FHb7W1Y2I2T6o0pV0PBA== X-Received: by 10.159.204.146 with SMTP id t18mr3520487plo.370.1515382396252; Sun, 07 Jan 2018 19:33:16 -0800 (PST) Received: from localhost.localdomain (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id f188sm3761794pfc.22.2018.01.07.19.33.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jan 2018 19:33:15 -0800 (PST) From: Bjorn Andersson To: Sebastian Reichel Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH] power: reset: msm: Clarify restart and poweroff Date: Sun, 7 Jan 2018 19:33:13 -0800 Message-Id: <20180108033313.13538-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.15.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When PSHOLD in a Qualcomm platform is deasserted the PMIC will perform either a power off or a restart of the system. The action to take is configured in the PON block, which is controlled by a separate driver. As the configuration logic was added to the pm8941-pwrkey driver the comment in do_msm_poweroff() is no longer valid and the name do_msm_restart() is misleading. Update the naming and drop the comment. Signed-off-by: Bjorn Andersson --- drivers/power/reset/msm-poweroff.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/power/reset/msm-poweroff.c b/drivers/power/reset/msm-poweroff.c index 4702efdfe466..01b8c71697cb 100644 --- a/drivers/power/reset/msm-poweroff.c +++ b/drivers/power/reset/msm-poweroff.c @@ -23,7 +23,7 @@ #include static void __iomem *msm_ps_hold; -static int do_msm_restart(struct notifier_block *nb, unsigned long action, +static int deassert_pshold(struct notifier_block *nb, unsigned long action, void *data) { writel(0, msm_ps_hold); @@ -33,14 +33,13 @@ static int do_msm_restart(struct notifier_block *nb, unsigned long action, } static struct notifier_block restart_nb = { - .notifier_call = do_msm_restart, + .notifier_call = deassert_pshold, .priority = 128, }; static void do_msm_poweroff(void) { - /* TODO: Add poweroff capability */ - do_msm_restart(&restart_nb, 0, NULL); + deassert_pshold(&restart_nb, 0, NULL); } static int msm_restart_probe(struct platform_device *pdev)