lkml.org 
[lkml]   [2022]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectfs: layered device driver to write to evdev
Hi all,

I have a number of embedded boards that integrate a pwm-based buzzer
device, and use the pwm-beeper device driver in order to control this.

However the pwm-beeper device driver only supports simple (play /
stop) ioctls, so I had implemented a "layered" device driver that
would talk to the pwm-beeper device (through evdev), and provide
additional ioctls to userspace so that an application could say e.g.
"beep for 50ms", and the driver would take care of the timing.

This layered device driver used set_fs + vfs_write to talk to the
underlying device. However, since [1] this no longer works.

I understand that device drivers should implement ->write_iter if they
need to be written from kernel space, but evdev does not support this.
What is the recommended way to have a layered device driver that can
talk to evdev ?

Thanks in advance,

(If possible, please CC me in any replies)

[1]: https://lore.kernel.org/lkml/20200626075836.1998185-9-hch@lst.de/

--
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

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