Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4222061pxb; Tue, 10 Nov 2020 10:45:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMxQ4p7D432Gb+4dWb1IyiSBowhKougCCdl1/zzKGn8YJ6J1NsYQKwWmsfO2VmTYA5ablE X-Received: by 2002:a17:906:3541:: with SMTP id s1mr22063625eja.413.1605033950256; Tue, 10 Nov 2020 10:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605033950; cv=none; d=google.com; s=arc-20160816; b=evhNZe5arJP8Csbz8sb1cdBh16XEsWVpJ8nQAmke8NOD4SiDtHVHXAPFByhAoYmF46 yyt1aVbT4JK1q+Oiypb4u7wA4QJUkT705NBJQ5Y2eZYiJsqb4chaOtgplSwQ5FYmliKp wA8CIiqobQnONTNXs+N7ss8jMjWQShW1X/Ue1mMdeo/OcPfeuCT2st7ve+b6PYIyAQRQ HUS/bvDy2spT09aENLMSEXKEKP4y8ByK8GBxUHMaLBIM6KcGaqHAp+GBBevI3QBRhlY6 PvfnPxv6i6PFVhhWFg8rJgzNtZ5eJRIEHz4vQFKRBfhCJ+lWdt4QbQpXcEc3tleRnN+g 6W7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=qfF817wJaKnDcwT0IKwc1uZghn3u6l9Ye68zq2YepQ4=; b=kHwQY2duVg2VRkSsTS/D/JWYcWlDLs6WgcX6P4rTDGAoYZWOf+2pTymzkM7qRwW0no JGRZ4pFqq6X+C9mujgq7pa7kuRecI6crM8RDpWRqr318eZkEgk6nfrLd5Lug4uGqwJuO 2wyjUttvrL1D+ZGMZcaBnpCViupmPB8vUsOLwuA4r1bBkFys/qfnzlpCoItEsYaH+s0m RKlstdQV/gS9e5zRlEqFBI/ZDa737oLW5ToF/mMnQXDLWfmGAopvJHnVlVhLNfjA7GoQ 2Gm+o/Mh7RWET99q6Bn9QQUaZMqFH5amPw0dqLihgBVcnTNgPDice5tUJ/1T/3tphIuT q9kQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi20si9897401ejb.639.2020.11.10.10.45.26; Tue, 10 Nov 2020 10:45:50 -0800 (PST) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731451AbgKJSnh (ORCPT + 99 others); Tue, 10 Nov 2020 13:43:37 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:41793 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbgKJSnh (ORCPT ); Tue, 10 Nov 2020 13:43:37 -0500 Received: by mail-ot1-f65.google.com with SMTP id n15so13537047otl.8; Tue, 10 Nov 2020 10:43:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qfF817wJaKnDcwT0IKwc1uZghn3u6l9Ye68zq2YepQ4=; b=dbG98dFfBLRxD8drxvR28faKe9i2vy5hpxiQZhN39Wc13ZqCcXGyLy6/OoWAzHKIis Fazp8LmxfhUJJsyzOSUgasZUE+HT8AABly7KG0S8YPbggVO5XpgTbD+kESUR08TfXhUb c3crBVq2pwV20viGjCBxpOj2d1ADD9m/MHOWO70LXjRV/FL0aYhkK0f3iz+gw0XNeKiU 0/o78U+4fjL7jEURVBBb2Q1mtOtWz4Ul+7E5oH6p13TsVYzRw9NuOsKPYYYigtexj35S v6GGEOa2CB/4kouqlEcy+o/Nn6Hy1CiyrrTKR6bzRdRXeby50xTeDumBzKhkPmc6ruoh 4hbA== X-Gm-Message-State: AOAM532mHVvZVFWRzFOhGgAq+B0mvv6vzIN+HB4ICXKbn51RaOLT+Z1f UlycBmPj+sYXxt7+mHs/CucRuCTlGRltvPQBCqt7g/6Q X-Received: by 2002:a9d:171a:: with SMTP id i26mr15722847ota.260.1605033816601; Tue, 10 Nov 2020 10:43:36 -0800 (PST) MIME-Version: 1.0 References: <20201023110254.26360-1-yu.c.chen@intel.com> In-Reply-To: <20201023110254.26360-1-yu.c.chen@intel.com> From: "Rafael J. Wysocki" Date: Tue, 10 Nov 2020 19:43:25 +0100 Message-ID: Subject: Re: [PATCH] PM / suspend: Print the driver flags of device during suspend resume To: Chen Yu Cc: "Rafael J. Wysocki" , Len Brown , Greg Kroah-Hartman , Linux PM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 1:02 PM Chen Yu wrote: > > Currently there are 4 driver flags to control system suspend/resume > behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE, > DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Print these flags > during suspend resume so as to get a brief understanding of the > expected behavior of each device, and to facilitate suspend/resume > debugging/tuning. > > To enable this tracing: > echo 'file drivers/base/power/main.c +p' > > /sys/kernel/debug/dynamic_debug/control > > Signed-off-by: Chen Yu > --- > drivers/base/power/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c > index 205a06752ca9..be6744bdfc93 100644 > --- a/drivers/base/power/main.c > +++ b/drivers/base/power/main.c > @@ -442,9 +442,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat > > static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info) > { > - dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event), > + dev_dbg(dev, "%s%s%s driver flags: %x\n", info, pm_verb(state.event), > ((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ? > - ", may wakeup" : ""); > + ", may wakeup" : "", dev->power.driver_flags); > } > > static void pm_dev_err(struct device *dev, pm_message_t state, const char *info, > -- Applied (with some edits in the subject and changelog) as 5.11 material, thanks!