lkml.org 
[lkml]   [2022]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 2/2] leds: trigger: pattern: notify usespace if pattern finished
On Mon, Nov 21, 2022 at 2:39 PM Martin Kurbanov
<mmkurbanov@sberdevices.ru> wrote:
>
> In the current moment, userspace caller can schedule LED pattern with

a LED pattern

> appropriate parameters, but it doesn't have ability to listen to any
> events indicated pattern finished. This patch implements such an event
> using sysfs node and sysfs_notify_dirent() call.

...

> +Date: October 2022
> +KernelVersion: 6.1

It can't be. Have you read my previous comments?

...

> + 1 means pattern is running and number 0 are finish or not run.

are finished

...

> +static void pattern_trig_remove_is_running(struct led_classdev *led_cdev)
> +{
> + struct pattern_trig_data *data = led_get_trigger_data(led_cdev);
> +
> + sysfs_put(data->is_running_kn);
> + device_remove_file(led_cdev->dev, &dev_attr_is_running);
> +}

If the file is opened at this time, what would happen during execution
of this function?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-11-21 14:28    [W:0.041 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site