All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Where to find the information how to write a state of the art USB driver?
Date: Tue, 11 Jan 2022 09:51:56 +0100	[thread overview]
Message-ID: <Yd1FLDC3/eML8TfQ@kroah.com> (raw)
In-Reply-To: <a620f4fb-ff9e-7b82-d92c-a67f002d2221@gmail.com>

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

  reply	other threads:[~2022-01-11  8:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 21:31 Where to find the information how to write a state of the art USB driver? Philipp Hortmann
2022-01-11  8:51 ` Greg KH [this message]
2022-01-11 20:09   ` Philipp Hortmann
2022-01-12  9:54     ` Greg KH
2022-01-13  6:39       ` Philipp Hortmann
2022-01-13 15:33         ` Greg KH
2022-01-13 15:37           ` Greg KH
2022-01-13 18:54           ` Philipp Hortmann
2022-01-13 19:01             ` Greg KH
2022-01-13 19:07               ` Greg KH
2022-01-16 13:45             ` Pavel Skripkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yd1FLDC3/eML8TfQ@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=philipp.g.hortmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.