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