From: Stephen Boyd <swboyd@chromium.org>
To: Tri Vo <trong@android.com>,
gregkh@linuxfoundation.org, rjw@rjwysocki.net,
viresh.kumar@linaro.org
Cc: rafael@kernel.org, hridya@google.com, sspatil@google.com,
kaleshsingh@google.com, ravisadineni@chromium.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
kernel-team@android.com, Tri Vo <trong@android.com>
Subject: Re: [PATCH v7 3/3] PM / wakeup: Show wakeup sources stats in sysfs
Date: Mon, 05 Aug 2019 14:02:48 -0700 [thread overview]
Message-ID: <5d489979.1c69fb81.9480d.fd19@mx.google.com> (raw)
In-Reply-To: <20190805175848.163558-4-trong@android.com>
Quoting Tri Vo (2019-08-05 10:58:48)
> diff --git a/drivers/base/power/wakeup_stats.c b/drivers/base/power/wakeup_stats.c
> new file mode 100644
> index 000000000000..3a4f55028e27
> --- /dev/null
> +++ b/drivers/base/power/wakeup_stats.c
> @@ -0,0 +1,161 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Wakeup statistics in sysfs
> + *
> + * Copyright (c) 2019 Linux Foundation
> + * Copyright (c) 2019 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> + * Copyright (c) 2019 Google Inc.
> + */
> +
> +#include <linux/idr.h>
> +#include <linux/kdev_t.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/slab.h>
Can you include init.h, device.h, timekeeping.h, and kernel. here? This
file calls functions exported in those headers.
> +
> +#include "power.h"
> +
> +static struct class *wakeup_class;
> +
> +#define wakeup_attr(_name) \
> +static ssize_t _name##_show(struct device *dev, \
> + struct device_attribute *attr, char *buf) \
> +{ \
> + struct wakeup_source *ws = dev_get_drvdata(dev); \
> + \
> + return sprintf(buf, "%lu\n", ws->_name); \
> +} \
> +static DEVICE_ATTR_RO(_name)
> +
> +wakeup_attr(active_count);
> +wakeup_attr(event_count);
> +wakeup_attr(wakeup_count);
next prev parent reply other threads:[~2019-08-05 21:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 17:58 [PATCH v7 0/3] PM / wakeup: show wakeup sources stats in sysfs Tri Vo
2019-08-05 17:58 ` [PATCH v7 1/3] PM / wakeup: Drop wakeup_source_init(), wakeup_source_prepare() Tri Vo
2019-08-05 20:54 ` Stephen Boyd
2019-08-05 21:11 ` Tri Vo
2019-08-05 21:15 ` Stephen Boyd
2019-08-05 17:58 ` [PATCH v7 2/3] PM / wakeup: Use wakeup_source_register() in wakelock.c Tri Vo
2019-08-05 20:57 ` Stephen Boyd
2019-08-05 17:58 ` [PATCH v7 3/3] PM / wakeup: Show wakeup sources stats in sysfs Tri Vo
2019-08-05 21:02 ` Stephen Boyd [this message]
2019-08-05 23:29 ` Stephen Boyd
2019-08-06 18:51 ` Tri Vo
2019-08-06 21:32 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d489979.1c69fb81.9480d.fd19@mx.google.com \
--to=swboyd@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=hridya@google.com \
--cc=kaleshsingh@google.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=ravisadineni@chromium.org \
--cc=rjw@rjwysocki.net \
--cc=sspatil@google.com \
--cc=trong@android.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox