From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: "rui.zhang@intel.com" <rui.zhang@intel.com>,
"amit.kucheria@verdurent.com" <amit.kucheria@verdurent.com>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] thermal: core: Send a sysfs notification on trip points
Date: Mon, 6 Apr 2020 09:45:26 +0200 [thread overview]
Message-ID: <20200406074525.2bhseq3n5bw7dd2t@axis.com> (raw)
In-Reply-To: <e0c819ce-31f4-cee1-c7cc-7ecb73d374a3@linaro.org>
On Fri, Apr 03, 2020 at 05:26:39PM +0200, Daniel Lezcano wrote:
> On 03/04/2020 16:40, Vincent Whitchurch wrote:
> > Normally sysfs_notify() is used to notify userspace that the value
> > of the sysfs file has changed, but in this case it's being used on
> > a sysfs file whose value never changes. I don't know if there are
> > other drivers that do something similar.
>
> I think so:
>
> eg.
>
> drivers/hwmon/adt7x10.c:
> sysfs_notify(&dev->kobj, NULL, "temp1_max_alarm");
> drivers/hwmon/adt7x10.c:
> sysfs_notify(&dev->kobj, NULL, "temp1_min_alarm");
> drivers/hwmon/adt7x10.c:
> sysfs_notify(&dev->kobj, NULL, "temp1_crit_alarm");
>
> drivers/hwmon/abx500.c:
> sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node);
> drivers/hwmon/abx500.c:
> sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node);
>
> drivers/hwmon/stts751.c:
> sysfs_notify(&priv->dev->kobj, NULL, "temp1_max_alarm");
> drivers/hwmon/stts751.c:
> sysfs_notify(&priv->dev->kobj, NULL, "temp1_min_alarm");
>
> There are also some other places I believe they are doing the same like:
>
> drivers/md/md.c:
> sysfs_notify(&mddev->kobj, NULL, "sync_completed");
> drivers/md/md.c:
> sysfs_notify(&mddev->kobj, NULL, "degraded");
AFAICS all these drivers (including the hwmon ones) use sysfs_notify()
to notify that the value of the sysfs file has changed, unlike your
proposed patch.
next prev parent reply other threads:[~2020-04-06 7:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 13:52 [PATCH] thermal: Add ratelimited print for HOT trip point Vincent Whitchurch
2020-04-02 14:20 ` Daniel Lezcano
2020-04-02 14:21 ` [PATCH] thermal: core: Send a sysfs notification on trip points Daniel Lezcano
2020-04-03 14:40 ` Vincent Whitchurch
2020-04-03 15:26 ` Daniel Lezcano
2020-04-06 7:45 ` Vincent Whitchurch [this message]
2020-04-06 9:45 ` Daniel Lezcano
2020-04-06 9:58 ` Vincent Whitchurch
2020-04-06 9:25 ` Amit Kucheria
2020-04-06 9:53 ` Daniel Lezcano
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=20200406074525.2bhseq3n5bw7dd2t@axis.com \
--to=vincent.whitchurch@axis.com \
--cc=amit.kucheria@verdurent.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.