Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3211714imm; Fri, 24 Aug 2018 12:37:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYuoyj7dwNs1yu/YHQ8PjhgxO9Nld0b3G+w3f9QHNpvbNHELV0660GZIr3slFad8WWSSKhs X-Received: by 2002:a62:4808:: with SMTP id v8-v6mr3320194pfa.89.1535139435029; Fri, 24 Aug 2018 12:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535139435; cv=none; d=google.com; s=arc-20160816; b=KUUdriFrt3ZOWWKq9xbt/0dd0h7LxS2Rf79hezmlG8bfFP4DxLddcnXlc7CDZRV1b4 FfWzBb0ItFrHaMo6MHwNgTnoVojJOZh9w6Bdktf0Otf594IvMyKfnks0pK1xAA+u82W9 v7F/pB9OXbsUqbJtgXxBKUDc3N2OwTBocnLBWY1LseYkIO9qCt3Jm9ksBfaFPh9Ya90h /hfeChF0HT1BwRezttDFXsnoUIL/OyV8b9NkQ0HxHN+WBOMjJ7idvj0pDD0NMqy0Ip24 6LAyJIUlDlNvJUr7oxQvuS5DAOvSBxWfhwMCWs4hrp5c09iMB5fmQ/xsaWyNfiP34O0Z 6dPw== 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 :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=LCWUOe1P080w94f5cFz9Y2E7I9NyPSNaHl0hj1q5v6Y=; b=MpAgMjDwEoFRJZmoeJ8XIy+QH7Fas66S0BRd4Xme+/qL6mt8SrdL2hwxEIQlJ9R09I Cjx+ETedbyyi143K7vXtbS3XFfj397wB5ZyyvkumOkKHZA0Z8ngMRqDeqoGwpJIsPb7b FjK3aAL6agGryUosDHBaEAa0ezpCML0JGF1O8gKJ9WqKjQ2jknjToIjhB73YcE+bayFA Eli+va98W8nNM0DooHFa1M0k8Phlu35n1kSvK4rP4db5NQK+gGDVsODdilfDt/kNl3Go 0RHjCDMThgqGyUHjgSIPY9DO3HZwzlJ/nq61y6693xiMdTTnOlIHgD/kS0VFcpBk14xO WKTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="R/rr5Aqb"; dkim=pass header.i=@codeaurora.org header.s=default header.b="az/tfzVF"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si7768062pfn.212.2018.08.24.12.36.59; Fri, 24 Aug 2018 12:37:15 -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=@codeaurora.org header.s=default header.b="R/rr5Aqb"; dkim=pass header.i=@codeaurora.org header.s=default header.b="az/tfzVF"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727594AbeHXXKY (ORCPT + 99 others); Fri, 24 Aug 2018 19:10:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:34642 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726728AbeHXXKY (ORCPT ); Fri, 24 Aug 2018 19:10:24 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4E852601D1; Fri, 24 Aug 2018 19:34:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535139265; bh=0kPaNV4tPwy0jToH8yy7bXCcnwOqIEH8ct7he1VtjEE=; h=From:To:Cc:Subject:Date:From; b=R/rr5Aqbk4Rx/GWAJEYQDpc9A76KWIIznf1kWL42ubKLG1EcME3VaHy+Y1h74ymgh OZUq+wEYUyTPNKvN6RysyZHGIZcB0st2f65fefB5MW1ywuRErC8dVYip05xa5wFGff pLBLqy3TH3fZ+7mD+WqyepMntjd8tCWoKilAyCwM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,FROM_LOCAL_NOVOWEL,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from rplsssn-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rplsssn@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 91F06601D1; Fri, 24 Aug 2018 19:34:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1535139264; bh=0kPaNV4tPwy0jToH8yy7bXCcnwOqIEH8ct7he1VtjEE=; h=From:To:Cc:Subject:Date:From; b=az/tfzVFKmyTSjEDh4yNtIovgbN1TUnKtwSOuVJmUTUT1TGZ/3qa/aPwIARCrGEKN PBxLEbWRtIGfRK6TpmZW+Vccm6nsOtnUAifZb7jOYzKLXjCyUCuVm277WVg9pAQlJj IjORoFQ8xP1WIih5P2maazE0oxh+i67GvF64ympI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 91F06601D1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rplsssn@codeaurora.org From: "Raju P.L.S.S.S.N" To: andy.gross@linaro.org, david.brown@linaro.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org Cc: rnayak@codeaurora.org, bjorn.andersson@linaro.org, linux-kernel@vger.kernel.org, sboyd@kernel.org, evgreen@chromium.org, dianders@chromium.org, mka@chromium.org, ilina@codeaurora.org, "Raju P.L.S.S.S.N" Subject: [PATCH] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately Date: Sat, 25 Aug 2018 01:04:12 +0530 Message-Id: <1535139252-20066-1-git-send-email-rplsssn@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the redundant call being made to send the sleep and wake requests immediately to the controller. As per the patch[1], the sleep and wake request votes are cached in rpmh controller and sent during rpmh_flush(). These requests needs to be sent only during entry of deeper system low power modes or suspend. [1]https://patchwork.kernel.org/patch/10477533/ Signed-off-by: Raju P.L.S.S.S.N --- drivers/soc/qcom/rpmh.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/qcom/rpmh.c b/drivers/soc/qcom/rpmh.c index f81488b..390e779 100644 --- a/drivers/soc/qcom/rpmh.c +++ b/drivers/soc/qcom/rpmh.c @@ -237,9 +237,8 @@ static int __rpmh_write(const struct device *dev, enum rpmh_state state, WARN_ON(irqs_disabled()); ret = rpmh_rsc_send_data(ctrlr_to_drv(ctrlr), &rpm_msg->msg); } else { - ret = rpmh_rsc_write_ctrl_data(ctrlr_to_drv(ctrlr), - &rpm_msg->msg); /* Clean up our call by spoofing tx_done */ + ret = 0; rpmh_tx_done(&rpm_msg->msg, ret); } -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation.