Re: [patch 0/2] add actuators support

From: Jiri Pirko
Date: Mon Jul 17 2017 - 12:35:07 EST


Mon, Jul 17, 2017 at 06:28:38PM CEST, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
>On Mon, Jul 17, 2017 at 06:19:12PM +0200, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@xxxxxxxxxxxx>
>>
>> I am owner of height adjustable desk and naturally, as it has an USB
>> interface, I need to controll it from my computer. Started to think
>> about what would be the best way, I realized that I need to introduce
>> a new driver class in kernel. The reason is a need to have one API
>> for all possible kinds of actuator devices (USB, I2C, gpio, etc).
>
>Why does this have to be a kernel driver at all? Your USB driver should
>really just be a simple userspace application (use libusb to have it
>work on all operating systems.)

Yeah, I was thinking about it as well. To have some kind of single
purpose app like sispmctl (control of surge protector). But that would
limit you only for this specific device. And for multiple devices you
would have to have multiple apps.

So it seems to me like a suitable solution to have this as a driver
class.


>
>While the idea of a "generic class" is nice, given that there is only
>one device of this type out there so far, and it's a USB one, kind of
>implies that a generic class isn't needed just yet.

We have to start somewhere. The world is full of actuators. Connected
over diferent buses. I think it is good to have a class,lib,app so the
drivers could be easily added, apps could be written using single api.


>
>Oh, and it's nice to cc: the linux-usb@vger mailing list for USB patches
>in the future :)

Will do.


>
>thanks,
>
>greg k-h