Re: fs: layered device driver to write to evdev

From: Christoph Hellwig
Date: Thu Nov 03 2022 - 03:47:35 EST


On Wed, Nov 02, 2022 at 05:04:11PM -0700, Luis Chamberlain wrote:
> On Wed, Nov 02, 2022 at 02:14:24PM +0100, Guillermo Rodriguez Garcia wrote:
> > 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 ?
>
> Shouldn't just writing write_iter support make this work?

Writing to evdev just sound like a lot of troble. evdev is a tiny
wrapper to expose the in-kernel input API to userspace. Anything
in-kernel should just directly interact with the input subsystem.