Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1901417ybh; Thu, 23 Jul 2020 22:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxARWa0jl3ehfaxcXtXczeT1zHJwKU2225TP3u7oLMgYMUz4GEW8XxSaQZR757RsbltL/bq X-Received: by 2002:a17:906:c943:: with SMTP id fw3mr7457888ejb.55.1595568501703; Thu, 23 Jul 2020 22:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595568501; cv=none; d=google.com; s=arc-20160816; b=cOHbgC0GXtJJLA9dlGLHQGpPDK+pXecFWE/ds8FZhX/sEPMj/2/wSBNl4MPGukh35z oln44zCTykwRhlkwRfnwOFJeSFAyK6sl5XatwFsECmdSkoA1he8MiWOxFtWFXUbAbrH/ ZMsmZZ+YIegjkugFukHSm1hVfp5NzvDDT1ENCFrHjqWU4uAiTKi0Il7AafAUdcD0Lxr0 jyVrQOm3k9Ub+uaZ+EWLPNjIOlkfnRwTQJW4sn+hMlDMjVvukpucRXaibsGSPtgKvWnT V3w+GvFYgwRO+efoOLY86OB9OPIR4sCQYjQ7pI16TDXD8g9zHWlTsgFlGrgNCqRoD6sj PNxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bG5kNzTRUe2ISI1cNtIgna1XqT+GgCV0bBepvmFfMDM=; b=ky66r01L9anG6Ej00u5XWfHHnH/yT6sY69ENjJ0cbofj2yde0hed2VpsXM1sAT9Y7P Qfeeme5A0KJtRJXaDYrUF3NuFL6+6Tprxudl43qSD1jSbhRdkikcFMlgzoqrACFF8HYZ GmHythdztjeK09WEk6QXDqyuU6o4ARSLKfoTCKtZUpo4CExRtK09aM0SOqFi3cXEAsGi Utq9WsVjSlBpW8l0MJFfKnSUeAamCEGL3jUUPSIyoincaAao6VAkerG7iaQMCh9N7h+K /fOdjDoGv5KV9JsexbW4j/mHRXWg6sgAknTdeF9dHk5cyT0lIBBAEF82mJlFFOY/xfFy sijQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NDO0TW1N; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nv2si2537493ejb.154.2020.07.23.22.27.58; Thu, 23 Jul 2020 22:28:21 -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=pass header.i=@linaro.org header.s=google header.b=NDO0TW1N; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726178AbgGXFYp (ORCPT + 99 others); Fri, 24 Jul 2020 01:24:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgGXFYp (ORCPT ); Fri, 24 Jul 2020 01:24:45 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFC02C0619E4 for ; Thu, 23 Jul 2020 22:24:43 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id o13so4654337pgf.0 for ; Thu, 23 Jul 2020 22:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bG5kNzTRUe2ISI1cNtIgna1XqT+GgCV0bBepvmFfMDM=; b=NDO0TW1NrTksFUPwBY0dAXFynV3sNPbEBxcLWo5US91+b+pW2JxXNIyjcG1DiQcR8O dGyiYwFswmY8rM5Kr+HaJZljSN98MISK1yP1Nx79+s7ezZ3Dpz8FIDgt5rKVHQWNO6Wm GZnhYJYr/aXKWJnMzyVZkD3lyIaJdeaq9DhCjBEsDYi1vWGI+icd0krY+2JJngX3uZFb TuaNzAHV5tHSaCNbemLOewqIMeuw2J1CGckq/eRRysVZEVWJH9VXDi7y0tDJMo+dygZz k86QZJi2l9WatawOtE/LBA0+7tbR1HIGT7RexhDHch7wzBx6MpeyzUTmgk2CJUYotN0Q I3cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bG5kNzTRUe2ISI1cNtIgna1XqT+GgCV0bBepvmFfMDM=; b=CnDJZ6khXI/Yat7M6exNv3M5e3qcAJMHwKy2Y7tq+3X0tP1UhQXXjaHDUwteQAGo4p HjvAXxWiQkEH4lMumtbZnvhcg/AZQC0KmBR04GLpnSfQiFE+SuuN8+HjoxKtblGp5NeT XL4Hy+j4T7/cw4575qeJv7z70ajV8O3TlaAz7g+Cn541iw62raEhQS2ssfSvj7Ohn3sD KDbteZaw6vdPb9+w5IX2D1YJ51PdiP4LT0imXP8sA0vVCeIPW0sGmyCjnXKdTsTvM5Vk 89ei4ct32EdTFC8QYK8c6uvfWYLNnUg3jqzbq4TMfmE2VxbX9XX6VX6mZjNuQE68fIP+ lc0g== X-Gm-Message-State: AOAM530MBp+UCyHsHHjwr6wKm314lJtCdG92tjgnhScwwM6NqH/dRsdC 0WIr4zyGhnUgJR8oQ2ghOaA1ckkrrg== X-Received: by 2002:aa7:97a1:: with SMTP id d1mr7378437pfq.190.1595568282985; Thu, 23 Jul 2020 22:24:42 -0700 (PDT) Received: from Mani-XPS-13-9360 ([2409:4072:6c9b:7816:d54:f58c:a790:e57b]) by smtp.gmail.com with ESMTPSA id g10sm4734079pfr.164.2020.07.23.22.24.37 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Jul 2020 22:24:42 -0700 (PDT) Date: Fri, 24 Jul 2020 10:54:34 +0530 From: Manivannan Sadhasivam To: Bhaumik Bhatt Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 08/10] bus: mhi: core: Use counters to track MHI device state transitions Message-ID: <20200724052434.GB17957@Mani-XPS-13-9360> References: <1595543802-17859-1-git-send-email-bbhatt@codeaurora.org> <1595543802-17859-9-git-send-email-bbhatt@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1595543802-17859-9-git-send-email-bbhatt@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 23, 2020 at 03:36:40PM -0700, Bhaumik Bhatt wrote: > Use counters to track MHI device state transitions such as those > to M0, M2, or M3 states. This helps in better debug by allowing > the user to see the number of transitions to a certain state when > queried using the states debugfs entry. > > Signed-off-by: Bhaumik Bhatt This patch should come before the debugfs patch. Also the header addition should be here. Thanks, Mani > --- > drivers/bus/mhi/core/pm.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/bus/mhi/core/pm.c b/drivers/bus/mhi/core/pm.c > index 27bb471..ce4d969 100644 > --- a/drivers/bus/mhi/core/pm.c > +++ b/drivers/bus/mhi/core/pm.c > @@ -256,6 +256,7 @@ int mhi_pm_m0_transition(struct mhi_controller *mhi_cntrl) > dev_err(dev, "Unable to transition to M0 state\n"); > return -EIO; > } > + mhi_cntrl->M0++; > > /* Wake up the device */ > read_lock_bh(&mhi_cntrl->pm_lock); > @@ -326,6 +327,8 @@ void mhi_pm_m1_transition(struct mhi_controller *mhi_cntrl) > mhi_cntrl->dev_state = MHI_STATE_M2; > > write_unlock_irq(&mhi_cntrl->pm_lock); > + > + mhi_cntrl->M2++; > wake_up_all(&mhi_cntrl->state_event); > > /* If there are any pending resources, exit M2 immediately */ > @@ -362,6 +365,7 @@ int mhi_pm_m3_transition(struct mhi_controller *mhi_cntrl) > return -EIO; > } > > + mhi_cntrl->M3++; > wake_up_all(&mhi_cntrl->state_event); > > return 0; > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project >