From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751403AbdGQQsk (ORCPT ); Mon, 17 Jul 2017 12:48:40 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:36522 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbdGQQsj (ORCPT ); Mon, 17 Jul 2017 12:48:39 -0400 Date: Mon, 17 Jul 2017 18:48:36 +0200 From: Jiri Pirko To: Greg KH Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, mchehab@kernel.org, jikos@kernel.org Subject: Re: [patch 0/2] add actuators support Message-ID: <20170717164836.GB1920@nanopsycho.orion> References: <20170717161914.5043-1-jiri@resnulli.us> <20170717162838.GF9786@kroah.com> <20170717163458.GA1920@nanopsycho.orion> <20170717164006.GB11246@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170717164006.GB11246@kroah.com> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Jul 17, 2017 at 06:40:06PM CEST, gregkh@linuxfoundation.org wrote: >On Mon, Jul 17, 2017 at 06:34:58PM +0200, Jiri Pirko wrote: >> Mon, Jul 17, 2017 at 06:28:38PM CEST, gregkh@linuxfoundation.org wrote: >> >On Mon, Jul 17, 2017 at 06:19:12PM +0200, Jiri Pirko wrote: >> >> From: Jiri Pirko >> >> >> >> 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. > >For USB devices, especially ones as simple as this, we don't want them >to have kernel drivers. It's just overkill. > >And never create a class if you only have one type of device, otherwise >you don't know if you really have it properly defined or not. 3 is a >good number to start with. You are making it hard for me :) Have to find other 2 then. And I thought that this spare time quest is coming to an end... > >sorry, > >greg k-h