From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Cc: Martin Kurbanov <mmkurbanov@sberdevices.ru>,
Pavel Machek <pavel@ucw.cz>,
Raphael Teysseyre <rteysseyre@gmail.com>,
Baolin Wang <baolin.wang@linaro.org>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
kernel <kernel@sberdevices.ru>
Subject: Re: [PATCH v1] leds: trigger: pattern: notify userpace if pattern finished
Date: Fri, 2 Sep 2022 08:35:12 +0300 [thread overview]
Message-ID: <CAHp75VeFT4coDG-fpZ2sErBxnhOpgU98Ctf+vcGcgLRTO6YMuQ@mail.gmail.com> (raw)
In-Reply-To: <20220901224345.fy6xvbpdn4axtlks@Rockosov-MBP>
On Fri, Sep 2, 2022 at 1:43 AM Dmitry Rokosov <ddrokosov@sberdevices.ru> wrote:
...
> > > +static void pattern_trig_remove_pattern_ended(struct led_classdev *led_cdev)
> > > +{
> > > + struct pattern_trig_data *data = led_get_trigger_data(led_cdev);
> > > +
> > > + sysfs_put(data->pattern_ended);
> > > + device_remove_file(led_cdev->dev, &dev_attr_pattern_ended);
> > > +}
> >
> > I'm wondering if you can always have a file and instead provide a
> > value there, so user space may use epoll() mechanism on that. It will
> > simplify your code here.
>
> Could you please explain what you mean? In the current implementation
> userspace can use epoll() already.
On the suddenly disappeared file?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2022-09-02 5:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 11:49 [PATCH v1] leds: trigger: pattern: notify userpace if pattern finished Martin Kurbanov
2022-08-24 15:51 ` Andy Shevchenko
2022-08-25 21:16 ` Martin Kurbanov
2022-09-01 22:43 ` Dmitry Rokosov
2022-09-02 5:35 ` Andy Shevchenko [this message]
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=CAHp75VeFT4coDG-fpZ2sErBxnhOpgU98Ctf+vcGcgLRTO6YMuQ@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=baolin.wang@linaro.org \
--cc=ddrokosov@sberdevices.ru \
--cc=kernel@sberdevices.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mmkurbanov@sberdevices.ru \
--cc=pavel@ucw.cz \
--cc=rteysseyre@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).