All of lore.kernel.org
 help / color / mirror / Atom feed
* proposal to delete the skeleton driver
@ 2021-12-07 10:16 Oliver Neukum
  2021-12-07 10:24 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Oliver Neukum @ 2021-12-07 10:16 UTC (permalink / raw)
  To: linux-usb; +Cc: linux-doc, Philipp Hortmann

Hi,

it seems to me that the method of maintaining an example driver
does not work because it will inevitably be

* untested

* out of date

Thus our documentation would be improved by replacing its examples
with code from drivers for real hardware. Such code wouldn't be pretty
or written for text books, but it would be tested.
I could do it this week in a first proposal. But I don't want to start
if somebody feels that the skeleton driver absolutely has to stay.

    Regards

        Oliver


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposal to delete the skeleton driver
  2021-12-07 10:16 proposal to delete the skeleton driver Oliver Neukum
@ 2021-12-07 10:24 ` Greg KH
  2021-12-07 22:43 ` Theodore Y. Ts'o
  2021-12-08 18:13 ` Philipp Hortmann
  2 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2021-12-07 10:24 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb, linux-doc, Philipp Hortmann

On Tue, Dec 07, 2021 at 11:16:37AM +0100, Oliver Neukum wrote:
> Hi,
> 
> it seems to me that the method of maintaining an example driver
> does not work because it will inevitably be
> 
> * untested
> 
> * out of date
> 
> Thus our documentation would be improved by replacing its examples
> with code from drivers for real hardware. Such code wouldn't be pretty
> or written for text books, but it would be tested.
> I could do it this week in a first proposal. But I don't want to start
> if somebody feels that the skeleton driver absolutely has to stay.

As the author of the skeleton driver, I have no objections to removing
it as it is showing its age and all of the problems that you mention
here are real.

So sure, delete away!

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposal to delete the skeleton driver
  2021-12-07 10:16 proposal to delete the skeleton driver Oliver Neukum
  2021-12-07 10:24 ` Greg KH
@ 2021-12-07 22:43 ` Theodore Y. Ts'o
  2021-12-08 11:13   ` Oliver Neukum
  2021-12-08 18:13 ` Philipp Hortmann
  2 siblings, 1 reply; 6+ messages in thread
From: Theodore Y. Ts'o @ 2021-12-07 22:43 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb, linux-doc, Philipp Hortmann

On Tue, Dec 07, 2021 at 11:16:37AM +0100, Oliver Neukum wrote:
> 
> Thus our documentation would be improved by replacing its examples
> with code from drivers for real hardware. Such code wouldn't be pretty
> or written for text books, but it would be tested.
> I could do it this week in a first proposal. But I don't want to start
> if somebody feels that the skeleton driver absolutely has to stay.

In addition to your idea, I wonder if we could point people at some
simple "real world" drivers that people could look at which are (a)
simple, and (b) relatively clean and free of anti-patterns that we
don't want driver authors to copy pasta into their drivers.

Sort of like how we have the "minix" and "ext2" file systems as
examples that we will sometimes point people to who want to understand
how to do their own new file systems.

       	  	    	     - Ted

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposal to delete the skeleton driver
  2021-12-07 22:43 ` Theodore Y. Ts'o
@ 2021-12-08 11:13   ` Oliver Neukum
  2021-12-11 16:28     ` Philipp Hortmann
  0 siblings, 1 reply; 6+ messages in thread
From: Oliver Neukum @ 2021-12-08 11:13 UTC (permalink / raw)
  To: Theodore Y. Ts'o, Oliver Neukum
  Cc: linux-usb, linux-doc, Philipp Hortmann


On 07.12.21 23:43, Theodore Y. Ts'o wrote:
> In addition to your idea, I wonder if we could point people at some
> simple "real world" drivers that people could look at which are (a)
> simple, and (b) relatively clean and free of anti-patterns that we
> don't want driver authors to copy pasta into their drivers.
I will try to. It may come as a surprise but if we want to limit
ourselves to drivers implementing a classical character device,
the number of recent examples dwindles rapidly.

And I think we should stick to such devices to give examples
comprehensible and relevant to as many people as possible.

    Regards
        Oliver



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposal to delete the skeleton driver
  2021-12-07 10:16 proposal to delete the skeleton driver Oliver Neukum
  2021-12-07 10:24 ` Greg KH
  2021-12-07 22:43 ` Theodore Y. Ts'o
@ 2021-12-08 18:13 ` Philipp Hortmann
  2 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2021-12-08 18:13 UTC (permalink / raw)
  To: Oliver Neukum, linux-usb; +Cc: linux-doc, tytso, Greg KH

On 12/7/21 11:16 AM, Oliver Neukum wrote:
> Hi,
> 
> it seems to me that the method of maintaining an example driver
> does not work because it will inevitably be
> 
> * untested
> 
> * out of date
> 
> Thus our documentation would be improved by replacing its examples
> with code from drivers for real hardware. Such code wouldn't be pretty
> or written for text books, but it would be tested.
> I could do it this week in a first proposal. But I don't want to start
> if somebody feels that the skeleton driver absolutely has to stay.
> 
>      Regards
> 
>          Oliver
> 

My wish is that it is only deleted when you have something similar as 
proposed by Ted.

I have tested the driver during the last three month. I used different 
devices. The best one was a USB to serial adapter, as it has the by the 
driver expected bulk in and out endpoints. In the skel_open() I was 
putting in an initialization and was able to set RTS and other signals 
on the RS232 side. I was also able to test the usb_bulk_msg() receiving 
example for my patch…

I truly believe that it has issues. But it is usable.

I liked that it is a character device and that it is one file and not 
distributed among many files.

Regards
Philipp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: proposal to delete the skeleton driver
  2021-12-08 11:13   ` Oliver Neukum
@ 2021-12-11 16:28     ` Philipp Hortmann
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Hortmann @ 2021-12-11 16:28 UTC (permalink / raw)
  To: Oliver Neukum, Theodore Y. Ts'o; +Cc: linux-usb, linux-doc, Greg KH

On 12/8/21 12:13 PM, Oliver Neukum wrote:
> 
> On 07.12.21 23:43, Theodore Y. Ts'o wrote:
>> In addition to your idea, I wonder if we could point people at some
>> simple "real world" drivers that people could look at which are (a)
>> simple, and (b) relatively clean and free of anti-patterns that we
>> don't want driver authors to copy pasta into their drivers.
> I will try to. It may come as a surprise but if we want to limit
> ourselves to drivers implementing a classical character device,
> the number of recent examples dwindles rapidly.
> 
> And I think we should stick to such devices to give examples
> comprehensible and relevant to as many people as possible.
> 
>      Regards
>          Oliver
> 
> 
I like drivers/usb/misc/usblcd.c as one simple example. An older version 
of usb-skeleton was the template. It is using urbs only for writing.

Since no driver seems to cover everything we may need two examples of 
maintained drivers as transfer performance and interrupt endpoints are 
not relevant for usblcd.

Regards
Philipp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-11 16:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 10:16 proposal to delete the skeleton driver Oliver Neukum
2021-12-07 10:24 ` Greg KH
2021-12-07 22:43 ` Theodore Y. Ts'o
2021-12-08 11:13   ` Oliver Neukum
2021-12-11 16:28     ` Philipp Hortmann
2021-12-08 18:13 ` Philipp Hortmann

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.