linux-old/Documentation/SubmittingDrivers
<<
>>
Prefs
   1Submitting Drivers For The Linux Kernel
   2---------------------------------------
   3
   4This document is intended to explain how to submit device drivers to the
   5various kernel trees. Note that if you are interested in video card drivers
   6you should probably talk to XFree86 (http://www.xfree86.org) instead.
   7
   8Also read the Documentation/SubmittingPatches document.
   9
  10
  11Allocating Device Numbers
  12-------------------------
  13
  14Major and minor numbers for block and character devices are allocated
  15by the Linux assigned name and number authority (currently better
  16known as H Peter Anvin). The site is http://www.lanana.org/. This
  17also deals with allocating numbers for devices that are not going to
  18be submitted to the mainstream kernel.
  19
  20If you don't use assigned numbers then when you device is submitted it will
  21get given an assigned number even if that is different from values you may
  22have shipped to customers before.
  23
  24Who To Submit Drivers To
  25------------------------
  26
  27Linux 2.0:
  28        No new drivers are accepted for this kernel tree
  29
  30Linux 2.2:
  31        If the code area has a general maintainer then please submit it to
  32        the maintainer listed in MAINTAINERS in the kernel file. If the
  33        maintainer does not respond or you cannot find the appropriate
  34        maintainer then please contact Alan Cox <alan@lxorguk.ukuu.org.uk>
  35
  36Linux 2.4:
  37        The same rules apply as 2.2. The final contact point for Linux 2.4 
  38        submissions is Marcelo Tosatti <marcelo.tosatti@cyclades.com>.
  39
  40Linux 2.5:
  41        The same rules apply as 2.4 except that you should follow linux-kernel
  42        to track changes in API's. The final contact point for Linux 2.5
  43        submissions is Linus Torvalds <torvalds@osdl.org>.
  44
  45What Criteria Determine Acceptance
  46----------------------------------
  47
  48Licensing:      The code must be released to us under the
  49                GNU General Public License. We don't insist on any kind
  50                of exclusively GPL licensing, and if you wish the driver
  51                to be useful to other communities such as BSD you may well
  52                wish to release under multiple licenses.
  53
  54Interfaces:     If your driver uses existing interfaces and behaves like
  55                other drivers in the same class it will be much more likely
  56                to be accepted than if it invents gratuitous new ones. 
  57                If you need to implement a common API over Linux and NT
  58                drivers do it in userspace.
  59
  60Code:           Please use the Linux style of code formatting as documented
  61                in Documentation/CodingStyle. If you have sections of code
  62                that need to be in other formats, for example because they
  63                are shared with a windows driver kit and you want to
  64                maintain them just once seperate them out nicely and note
  65                this fact.
  66
  67Portability:    Pointers are not always 32bits, not all computers are little
  68                endian, people do not all have floating point and you
  69                shouldn't use inline x86 assembler in your driver without
  70                careful thought. Pure x86 drivers generally are not popular.
  71                If you only have x86 hardware it is hard to test portability
  72                but it is easy to make sure the code can easily be made
  73                portable.
  74
  75Clarity:        It helps if anyone can see how to fix the driver. It helps
  76                you because you get patches not bug reports. If you submit a
  77                driver that intentionally obfuscates how the hardware works
  78                it will go in the bitbucket.
  79
  80Control:        In general if there is active maintainance of a driver by
  81                the author then patches will be redirected to them unless 
  82                they are totally obvious and without need of checking.
  83                If you want to be the contact and update point for the
  84                driver it is a good idea to state this in the comments,
  85                and include an entry in MAINTAINERS for your driver.
  86
  87What Criteria Do Not Determine Acceptance
  88-----------------------------------------
  89
  90Vendor:         Being the hardware vendor and maintaining the driver is
  91                often a good thing. If there is a stable working driver from
  92                other people already in the tree don't expect 'we are the
  93                vendor' to get your driver chosen. Ideally work with the 
  94                existing driver author to build a single perfect driver.
  95
  96Author:         It doesn't matter if a large Linux company wrote the driver,
  97                or you did. Nobody has any special access to the kernel
  98                tree. Anyone who tells you otherwise isn't telling the
  99                whole story.
 100
 101
 102Resources
 103---------
 104
 105Linux kernel master tree:
 106        ftp.??.kernel.org:/pub/linux/kernel/...
 107        ?? == your country code, such as "us", "uk", "fr", etc.
 108
 109Linux kernel mailing list:              
 110        linux-kernel@vger.kernel.org
 111        [mail majordomo@vger.kernel.org to subscribe]
 112
 113Kernel traffic:
 114        Weekly summary of kernel list activity (much easier to read)
 115        [http://kt.zork.net/kernel-traffic]
 116
 117Linux USB project:
 118        http://sourceforge.net/projects/linux-usb/
 119
 120
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.