Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3741748ima; Tue, 23 Oct 2018 10:30:09 -0700 (PDT) X-Google-Smtp-Source: AJdET5e4TkIZU5kEWY2Bl4r9q+8PbnUiMviT4P0WlmTGr06QooYCLZbB1ntM32kLtc621dtPdBls X-Received: by 2002:a17:902:b944:: with SMTP id h4-v6mr12815420pls.46.1540315809060; Tue, 23 Oct 2018 10:30:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540315809; cv=none; d=google.com; s=arc-20160816; b=VlnQdjN3viuVIdNAhgtFxqgZiDyd8jxnR0xHlpZLyOWJdoH7GC/3ZWKoAxCZw7XKEp neiPSJGlSzMFZqirvMvpefF7VAHQZfWF+ELwAWxt7lkWr9vcbBmuFCSz9LW/vdluZeRU eR7PhkbFLGmBCb3EIBSzb6uk5KNPP48Cd1yz9QSKOWz1k4toAJfKaqz+EWICmKmdbCz7 6V/Vwv5mCooD8UPl2knzKzvoD3teyI9MeeylixHoq0/Nw97WJDsD9JkvxREp2tOq2oSh lutTfdVMXbKg/p62xFW08rGQROLSR1KGpwgJ9qHyyl33pkSuzqz8iBjUDWPhUlGWdh3Z cAhA== 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; bh=Rj+jqOtsWMFvKtPocMRfkVtdY9QOOU6lW68ByU+8ooY=; b=MhTfN5UEyRinZmNmmXfQibC1ga2xJuTmi/gQYGCNnutXIV1PH7eoL12MvtasWymRFS 8TgO+oQGxPDFHslyFp1w4RzPcRTHJxUlatSXX3B0n2XpBHLEWCtWG61U1DDkJfUanCGn WdexP4o5/eeyA3HzT4rTMRLGiWfR8UIYqVtHLowKXtD0fQ8l51MGP32iNIEMomgY0u1f KgO2dFFmNSYZsEIWzfa+ITJOh0WLPwmdq/8JrrzaLJQNVi/AdjYhlwG3uL27UPwX6A+v pN61nJSUfAmRHEixoCb/4Wqi+KtzDfnuPMV2cLLyRW7brCIaY/szL/YQRxYz2zujOUfu ZfAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=JXkNY4am; dkim=pass header.i=@codeaurora.org header.s=default header.b=b8kWxyxk; 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 b34-v6si1750965plc.428.2018.10.23.10.29.53; Tue, 23 Oct 2018 10:30:09 -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=JXkNY4am; dkim=pass header.i=@codeaurora.org header.s=default header.b=b8kWxyxk; 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 S1728402AbeJXBxn (ORCPT + 99 others); Tue, 23 Oct 2018 21:53:43 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35268 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbeJXBxn (ORCPT ); Tue, 23 Oct 2018 21:53:43 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8FC9660CEB; Tue, 23 Oct 2018 17:29:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1540315764; bh=kB6K0tSdLvYt2Ks47uPYUbg18/vHjM3H3D7/OeLsz5I=; h=From:To:Cc:Subject:Date:From; b=JXkNY4ammaBYuRV29PRr/eGFzuYBRBwPyq/l2xlD6jQj6eyM6EYGsLgLGuWRQVFn4 YCvwRFErp+nF8vTBs6lhWlstRtFvj1t11wbeWP7CaEjcNSTUg8N/bM+1QHHzLe25Tx evQoCv2k+guiHe8skNwcwbcFDxgHMLBZA9UBSFgg= 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.2 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,FROM_LOCAL_NOVOWEL 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 ADDED6034D; Tue, 23 Oct 2018 17:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1540315763; bh=kB6K0tSdLvYt2Ks47uPYUbg18/vHjM3H3D7/OeLsz5I=; h=From:To:Cc:Subject:Date:From; b=b8kWxyxkq5gTBhm5jFemnGhA9hw0Co0gpWh1bs/qYmNlXabGnjZmkujD66EAAMYtj OH3sIRJ9WweW/wSu+mI1yz3tCXw+2WWOY5YBD7dRE8V9Y6iB0Ii3GenB8JihW4ofDn flkckskAl3Dzs1/PH7icyp8OYtNCMOgfD/jAZ0+U= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ADDED6034D 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, linux-pm@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 RESEND] drivers: qcom: rpmh: avoid sending sleep/wake sets immediately Date: Tue, 23 Oct 2018 22:59:08 +0530 Message-Id: <1540315748-29158-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 Reviewed-by: Lina Iyer --- 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 e6e98d4..877fe78 100644 --- a/drivers/soc/qcom/rpmh.c +++ b/drivers/soc/qcom/rpmh.c @@ -228,9 +228,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.