Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2969824ybt; Mon, 29 Jun 2020 11:45:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNh+NZYfgNEm5nyFGcMn8P/3GBxpnTNTJgPAnDVNTJ/cOLVcCcVvc4+7lMxBWlv+OVx484 X-Received: by 2002:a17:906:d963:: with SMTP id rp3mr15764190ejb.54.1593456325432; Mon, 29 Jun 2020 11:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593456325; cv=none; d=google.com; s=arc-20160816; b=OA6whZU0gyNpiuDPqnPB1VSkcRPKzNaYLO2yMuANbYkpgGXZpSN9ZjoUJi3J0iTbMZ jnC+jGgLs2gUFAFwXoBtOui6WbgCvZwAZRHqwDgal7nq/Jps7Q3ayl+zoBn0PLUVkH2g zOhGKmIe2KepUz9U4rr4QL47rNTcUwqoSkjZgtO/GeI8xJekdt24murziZHHaQ45XYNh ZwXhDI6ArsIXq0zIqvWAPAhcI5x29hLHN0PsBIxUXn6aNR1l5xsLRyT1Yh+jq8hpYnRJ opVuCnqNa+BJGhZzAQj5rx4oV1qX6IrIWWrbV1aUHqPXxoS93YucICqIKWtOzLRI4fKV 0LdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=itBjfoTY2CE+2xkkeHu4KwEKUm7GR4539nJhYnVkVgI=; b=Viv1lJqnXYj6ahcRifCGiur0LjDanfcPW9HDzXrf6HImuZl+Ln2u1UxDGwHtA1cvlu FljnPhdVkscZuN7TLeSNOCXoIv2wdrsNTg+DrlJblLzNBXoO6Fh4sV7wurIduwtNyUym /fxklPzdps9KV9Ml1CxH6ARtWgfmA/ycsHNPm8g0CvJNidK58jL//IE5IfAMwqJPpjao UlJVc+omcD41cmTzo/70SaMV1Szi17U+hfh3JhhRGlFhBp91dR7ZSPjh5vk4I1115lES e8l1V3hODexxGM5z+CxtFHCtwFNJVXutHk++epSrfL9i5MqfUUq18grH1LmzMZYcqIw+ u4uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="k8k/6l7o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si220384edu.253.2020.06.29.11.45.01; Mon, 29 Jun 2020 11:45:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b="k8k/6l7o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728116AbgF2So6 (ORCPT + 99 others); Mon, 29 Jun 2020 14:44:58 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:45611 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729233AbgF2Sos (ORCPT ); Mon, 29 Jun 2020 14:44:48 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1593456287; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=itBjfoTY2CE+2xkkeHu4KwEKUm7GR4539nJhYnVkVgI=; b=k8k/6l7o/EblYID3dzR2RvNd8s5cjTGt4zwOxcRvKJFJ6B3UneQ2JMDc75t2bTH+svHXcF9K VJJbUWCFzniGRgfgEZpN6WASFyQk1WBduss2e+anrLHsDhekjMtRSYeHlNcwrSDnA7/RSSfY vmQWl6X7jlw2wIQykmLm4tdp+M8= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n02.prod.us-west-2.postgun.com with SMTP id 5efa195afe1db4db89233d83 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Mon, 29 Jun 2020 16:39:54 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 1C368C433C6; Mon, 29 Jun 2020 16:39:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 82126C433C8; Mon, 29 Jun 2020 16:39:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 82126C433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v4 4/9] bus: mhi: core: Trigger a host resume when device vote is requested Date: Mon, 29 Jun 2020 09:39:37 -0700 Message-Id: <1593448782-8385-5-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593448782-8385-1-git-send-email-bbhatt@codeaurora.org> References: <1593448782-8385-1-git-send-email-bbhatt@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It is possible that the host may be suspending or suspended and may not allow an outgoing device wake assert immediately if a client has requested for it. Ensure that the host wakes up and allows for it so the client does not have to wait for an external trigger or an outgoing packet to be queued for the host resume to occur. Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/pm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c index 5e3994e..74c5cb1 100644 --- a/drivers/bus/mhi/core/pm.c +++ b/drivers/bus/mhi/core/pm.c @@ -1115,6 +1115,9 @@ void mhi_device_get(struct mhi_device *mhi_dev) mhi_dev->dev_wake++; read_lock_bh(&mhi_cntrl->pm_lock); + if (MHI_PM_IN_SUSPEND_STATE(mhi_cntrl->pm_state)) + mhi_trigger_resume(mhi_cntrl, false); + mhi_cntrl->wake_get(mhi_cntrl, true); read_unlock_bh(&mhi_cntrl->pm_lock); } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project