Re: [PATCH] Input: serio - add writing multiple bytes at once

From: David Engraf
Date: Wed May 02 2018 - 03:08:08 EST


Hi Dmitry,

On 30.04.2018 at 23:20, Dmitry Torokhov wrote:
Hi David,

On Mon, Apr 30, 2018 at 11:03:24AM +0200, David Engraf wrote:
The current version only supports forwarding a single byte to the tty
layer.

This patch adds serio_write_length() to allow a serport driver writing
multiple bytes at once. The patch also includes a fallback to
serio_write_length() when a driver did not register a single byte function.

Without users I do not see point for this API.

Here is an incomplete list of drivers calling serio_write() in a loop:

- drivers/media/usb/rainshadow-cec/rainshadow-cec.c
- drivers/input/serio/serio_raw.c
- drivers/input/touchscreen/elo.c

I can simplify these drivers by using serio_write_length() if you want to have some users for the new API.

Best regards
- David