From mboxrd@z Thu Jan 1 00:00:00 1970 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 0E3AEC433EF for ; Tue, 11 Jan 2022 08:52:28 +0000 (UTC) Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94.2) (envelope-from ) id 1n7Csx-0004JZ-9x; Tue, 11 Jan 2022 03:52:07 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n7Csu-0004Hh-1S for kernelnewbies@kernelnewbies.org; Tue, 11 Jan 2022 03:52:04 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1DBAF3200C10; Tue, 11 Jan 2022 03:51:59 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 11 Jan 2022 03:51:59 -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=06CTFETWseGlbYgm2kk6O/z77td nhIuSLL3OmK24144=; b=cRoa3pZ+yDLpjGkZAWHcCP2Saq/kY+qFSXTV4mUtmYh YfkxowURKaf1JN6iyHtivhxdoFHvHcO5eoF5c4VS+pdjjLWLHsHjpekgPAb6gun/ n0cJoq+cznofYGNTye3hCilier5zevaBUewoqKGRCxm01/+63YKS/q3sU3WTeufY OLS34RF7d7tOu0IFxbz8o5YZq9oJeEJhTmUk73ch//rJF5zhVpxk54LAktygqPqM 0Jjsx93CscZYos5Qc/oKsSENQS6AgJJ09hTsmENMqmVi2N7ry556iQOxWBZjAvCB WLre7tGOG/r0wIsnW4ibD/y2NB2q3e5tntJ9LJ7Bx0Q== 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=06CTFE TWseGlbYgm2kk6O/z77tdnhIuSLL3OmK24144=; b=UExpp0u4ntCB8i8hHjq3m5 AyQ/4iwSfYr/R1zT/hDZoUr4oeiojsKzL3TpTGdQ2ss9wnGnRQyRA8Me0GaXzKJM m177KVO10j+C4tvu5cz40H7RIU/aB7+TIEzY2/h73m+IlB5NheNd8xjsIPr5RVlB Haclz4IPqPrQDviLJBtjnkL1roIDZnKjwCTCiyCKgxV+E2cxBwZXvZXhm6Ut36X8 D1REJZ1hDyIFtY6HZpr9Gqsdi9pRSxrs6JCfkKqgt8tCszDN5FZzl9wf9QjTfwTk btC5Zqr3ivc1cJ9DbORQZ0OcOvlJLyiIQ1O1OhB3LZ6CaTp6D1Oyr58PNQ0ioGKA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudehvddguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepifhrvghg ucfmjfcuoehgrhgvgheskhhrohgrhhdrtghomheqnecuggftrfgrthhtvghrnhepveeuhe ejgfffgfeivddukedvkedtleelleeghfeljeeiueeggeevueduudekvdetnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghgsehkrhhorg hhrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Jan 2022 03:51:57 -0500 (EST) Date: Tue, 11 Jan 2022 09:51:56 +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: 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 Mon, Jan 10, 2022 at 10:31:28PM +0100, Philipp Hortmann wrote: > Hi all, > > template usb-skeleton.c is working but outdated, documentation is helpful > but years old and checkpatch.pl is giving hints to deprecated functions. > This information is helpful but it does not show the way how to write a > state of the art USB driver. Where to find this information? In the USB > mailing list? By checking in git on which files most maintenance activities > were done? First off, what do you mean by "state of the art"? USB drivers are almost never just a USB driver. The USB portion of the driver is the "simple" part. The "real" part of the driver is going to be doing whatever functionality the device is (i.e. sound device, keyboard device, video device, etc.) USB is just a dumb pipe. The USB portion of your driver just needs to set up the pipes, and get the data flowing in them. How you deal with that data is going to be the real work you have to do, and the majority of the driver size. Otherwise you really do not even need a USB driver, and you can just do everything from userspace and use libusb to read/write to the USB device directly. If you have a new driver you need to write, look at the existing drivers for guidance, and the documentation. Then submit it to the linux-usb mailing list for review, the people there will help you out with any portions that you have problems with. So, what have you tried so far that is not working and what type of device are you trying to control that needs a new USB driver for? thanks, greg k-h _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies