Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75941C433EF for ; Thu, 13 Jan 2022 15:34:39 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1n826y-0004nx-0C; Thu, 13 Jan 2022 10:34:00 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n826w-0004nq-3Y for kernelnewbies@kernelnewbies.org; Thu, 13 Jan 2022 10:33:59 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 023B75C008B; Thu, 13 Jan 2022 10:33:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 13 Jan 2022 10:33:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=9Tzptu5Mk2vVdfNXjY9YXioNJ4o J9H+M4uC+Bdkdbow=; b=n/JbSHjHNiXU4riMSR2jIZ6AVZ1F/S7L6/sdlzivbL8 0XvSGk8meVuGSWF72Fc84ZNfcc293dTIt+FY1Zh65skctwk0dEvonUa5isjrPIRt ICQrPdVTJhNkoJKVu3XL2O4Wrb8TOYh33stJ3IbeNMay1Lkh/shFQ4RAK1u+js1b hCICgP7rEPv7ahP0+trJcMP3dicSX9TOYGWuPnn5m4/ImboqvsInV+T6cMVclyQt Pl/PuzSjpQyhMPR1mbgJ2QdxH/3ktF2CzIU3jYhCxUziPr9LFFWr0KDVgGMGtu75 vZFdSmtLi8onodvulEb6+pQs0GP3wHxCk17XKxMVdSg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=9Tzptu 5Mk2vVdfNXjY9YXioNJ4oJ9H+M4uC+Bdkdbow=; b=PZqCVpCjn5qaUABgfGc9HF EDAOi9QGlBsCfTAHeRwzSC4M8/mZhU25a7QH8imop5k5mNK4aH0ssUI1CKCJmZwM K/OCA0cwomnZsYc5R8H8rn2WPFv7s6bryYATW5DkQ0K1e37OZns+t1TKZSzgSr+U HpD5Q3CEoVBGRsoO0XmXlZPMt8VhtSsS0kCL+kwcne3ZbO4nHVVzloDILmkCaWym SU5gxneh/WE6xJ0tFjUnouR4/q2/CqVU0+eyY9Z/Auwv7No64S16SlTfVUGP74YX H8lM3YQQXbuDtqOTnelHB80fchDw2/eN7UzGf3pDg1mEwu61WJslLJ87c9RAYc5w == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrtdefgdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghgucfm jfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepveeuheejgf ffgfeivddukedvkedtleelleeghfeljeeiueeggeevueduudekvdetnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorghhrd gtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jan 2022 10:33:54 -0500 (EST) Date: Thu, 13 Jan 2022 16:33:50 +0100 From: Greg KH To: Philipp Hortmann Subject: Re: Where to find the information how to write a state of the art USB driver? Message-ID: References: <28e1c700-da54-8793-8c60-4ec3697fe35d@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: kernelnewbies@kernelnewbies.org X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: > On 1/12/22 10:54 AM, Greg KH wrote: > > That driver tried to be an example for an unknown device, doing multiple > > different things that no single driver/device would probably ever need. > > Also it can almost always just be replaced with a simple userspace > > program using libusb, as I bet your driver could be replaced with as > > well, right? > Yes it can be replaced by a userspace program but even this is not required. It is an issue if you are trying to write a new driver. We do not take new drivers into the kernel tree if they can be in the kernel instead. > For the USB LCD a userspace program is available from vendor. Great! > For the USB to serial Adapter the driver exists in the kernel ch341.c. > It appears as a ttyUSB0 device. For devices that need to show up to userspace as a common device type (like a serial port), we need to have a kernel driver, so this is to be expected. > I think what happens to very custom drivers that could be userspace programs > can be seen in the file /drivers/usb/misc/usblcd.c > - It is written in 2005 and is only supporting one device from one vendor. > - I cannot find/buy a suitable device. > - I have tried two times to contact the author of the driver but: > The response from the remote server was: > 550 5.1.1 : Recipient address rejected: User unknown > - The idVendor = 0x10D2 does also not help because RayComposer - R. Adams > does not response and does not seam to offer such products. What is the problem with this driver? If it is not hurting anyone, and still builds, it's not causing any problems. > To me it is unused code but how to verify? When it is unused what does the > kernel do with it? Putting it to the staging area? Why do you want to delete it? We can remove old drivers that no one uses, we do that all the time. But usually that is because the maintance burden on them get too high and we determine that no one actually uses the thing. This driver doesn't seem to be causing any problems that I can see, so why delete it? That being said, if you do think it should be removed, great, let's do so and if someone later shows up that uses it, we can trivially add it back. Just submit a patch to do so. But this doesn't have much to do with your original question, so I'm confused as to what usblcd.c has to do with writing a new USB driver? thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies