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: 123677 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2229939qgn; Sun, 7 Jan 2018 19:33:20 -0800 (PST) X-Google-Smtp-Source: ACJfBou8iWPB68dTrozfPWkxY0HuAktFTH4DIQQNZCAvZtJy6sVGlu3WOBpFMhG653CYsr8Ho0pL X-Received: by 10.99.0.80 with SMTP id 77mr8593958pga.109.1515382400260; Sun, 07 Jan 2018 19:33:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515382400; cv=none; d=google.com; s=arc-20160816; b=A7ZdCuPwA1X5lE4UJk2b+/CO02j/xILFBEGqJMoLV2+NF7mlyPARokh3lL+e0Cj1z3 y/kaLpRqrtxzD7Ltc7QdjSQpozIcjTt474IqPTjk0FcE6DkP0upx87krvjlJwSDte0K3 Hy56YEYyvyTPL2kttdthIYsEyy4cklmjmGqexsPGRkpBz5UL7pEVBfcUUddjkjbIIerD d2jXt2737aXmq5uBTh1pBq0Qtp27tK7Jjs5oi3UEdv4nbrPVDwt3zavKBRvWr6Jonf0w UIXXZBTvqpyDoPDlMD8EZ9CJFiwRAPx8puSFnyTnTzx62xrDey2IvfLZKihiji3GD+J/ tyJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=hAzh223uyNsWMgOMpQXXAdRVjmH1twYISkUWOzJEXrM=; b=f5oU685unmnwAQK82z1LdI/4xweu4P/mCluLSYofAbL4PknSpTMqgvgdfdD2ZtDHaC +P+4uijC4TlWrcyenTcI/S2JcGA0jAMScryv5zQggjOIxaxaJbw3U4rG5S8kMBtAzdS9 3JudrTE2ueuQSDLT/H47V3GHcPMPMksy0GYrC++cY8pDsb7H6PJVFoOtLPGoRxLwVuVK r8PWih7AS0Wlt7m5Mf7ljuTtMDuD6W7mPWnCi0gB7UkEVmJv0cfKTA6rJgYy+RgTJWNK vkaKAQuCrcjeoCz6nPlnR47FdELUMdkRLK3Ho+JPrWJuSqWbMpyULB6wqWqHypNqJIk4 ULVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BFgx5tTl; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si8069666plk.103.2018.01.07.19.33.19; Sun, 07 Jan 2018 19:33:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=BFgx5tTl; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755326AbeAHDdR (ORCPT + 10 others); Sun, 7 Jan 2018 22:33:17 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34176 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755148AbeAHDdQ (ORCPT ); Sun, 7 Jan 2018 22:33:16 -0500 Received: by mail-pf0-f195.google.com with SMTP id e76so285184pfk.1 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=dcofMjbR1gnGH7wPQRrxG11KYew+psiBlrTq1LMxSOZaVl7tb83A/81CcR0i3X+iZY tIV9QP8mNErd08AlFZyo6zTtGZBFlsTgeUQVb613pXyKeLvp2PM2jFvNdZ1yxWSPUq43 n/hq7U47GUjx4K9SXR3QqpPMS9CGt4jv21QY4lDH+fxYbT2XAIJmRGl0Uh9KCfsJ/czP hJSvxrzeg1TLZpI3FLc/0kDgjPhvKqQ6jfXy/2o3tN+eotw6gOOsKwOX7p4GwqosQli6 3XkQet+uhZSXbm5zmDgVTwpHjdX1MqNVbsDh3iHavz2Jffz0ME0R0fFK9gwC9EgJO4zs frLg== X-Gm-Message-State: AKGB3mLXb+QYT+g+J/WztiVlmQRcL92P+/Oy94EHFHutamBeSfhZgM0M P+Wxo1aAx25PhC5X5ogwyIX4Zg== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(-) -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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)