Re: [PATCH] usb: misc: Add driver for ALVA Nanoface

From: Greg Kroah-Hartman
Date: Tue Nov 11 2014 - 03:05:13 EST


On Tue, Nov 11, 2014 at 09:17:03AM +0200, Lauri Niskanen wrote:
> On 11/11/14 09:07, Greg Kroah-Hartman wrote:
> >Any reason this can't be a simple userspace program that writes the
> >needed command to the device using libusb instead of being a kernel
> >driver? This seems like overkill for a kernel driver to me.
>
> You are probably right. It indeed should be possible to do this in
> userspace. I thought that having a kernel driver would still be benefical
> since it adds plug-and-play availability for all Linux users without having
> to deal with userspace driver programs.

You can do that by just providing a package that adds a udev rule to run
your program when the device is seen.

Yes, it's not as "easy" as being in the main kernel tree, but we do like
to keep things out of the kernel that don't have to be in the kernel.
We removed a number of drivers like this about 10 years go for that very
reaason.

> You are far more experienced with these things than me, so I am happy to let
> you make the decision about whether to have a kernel driver or not.

I think a userspace program would be best.

sorry,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/