mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Constantine Shulyupin <const@MakeLinux.com>,
	linux-kernel@vger.kernel.org, celinux-dev@lists.celinuxforum.org,
	Ryan Mallon <rmallon@gmail.com>, Tim Bird <tim.bird@am.sony.com>,
	Baruch Siach <baruch@tkos.co.il>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Peter Korsgaard <jacmet@sunsite.dk>,
	Ezequiel Garcia <elezegarcia@gmail.com>,
	Selim TEMUR <selimtemur@gmail.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Subject: Re: [PATCH v2] LDT - Linux Driver Template
Date: Fri, 16 Nov 2012 10:46:18 +0100	[thread overview]
Message-ID: <87zk2hubh1.fsf@nemi.mork.no> (raw)
In-Reply-To: <20121115224030.GA16377@kroah.com> (Greg KH's message of "Thu, 15 Nov 2012 14:40:30 -0800")

Greg KH <gregkh@linuxfoundation.org> writes:

>  Normally you just start with a
> driver for a device like the one you need to write and modify it from
> there.

Yes.

Even if the template driver is fixed up to be the most beautiful driver
ever made, it will still always be made for non-existing hardware.  This
causes two major problems:
 - the driver will not be tested, so it will have bugs
 - the driver will not be used by anyone, so it will not be maintained
   (remember that it is initially perfect, so there is no reason to
   change it)

May I suggest another approach?  How about selecting a set of existing
drivers which are suitable as templates, and put all this effort into
making those drivers *the* perfect examples instead? Start submitting
cleanup patches for the selected drivers until everyone is satisfied and
then document them as starting points for anyone wanting to write a
similar driver.

I believe many subsystem maintainers already have such sample drivers
which they point new submitters to when asked.  That does not mean that
these drivers necessarily are perfect, so there is still work to do here
for anyone interested.  And collecting this information and documenting
it would be useful in itself.

It would also be nice if hardware availability was considered when
selecting the sample drivers.  Buying an already supported device to
experiment with its driver can be useful even if you have another device
you want to write a driver for.  Or just for the learning experience.

Just my € .02


Bjørn

  reply	other threads:[~2012-11-16  9:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1353007337-12791-1-git-send-email-const@MakeLinux.com>
2012-11-15 22:40 ` Greg KH
2012-11-16  9:46   ` Bjørn Mork [this message]
2012-11-16 10:27     ` Constantine Shulyupin
2012-11-16 12:08     ` Greg KH
2012-11-17 12:52   ` Constantine Shulyupin

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=87zk2hubh1.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=baruch@tkos.co.il \
    --cc=celinux-dev@lists.celinuxforum.org \
    --cc=const@MakeLinux.com \
    --cc=elezegarcia@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacmet@sunsite.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=rmallon@gmail.com \
    --cc=selimtemur@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=tim.bird@am.sony.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®