RHEL4/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/) and/or X.Org
   7(http://x.org/) instead.
   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        The same rules apply as 2.2. The final contact point for Linux 2.4
  39        submissions is Marcelo Tosatti <marcelo.tosatti@cyclades.com>.
  40
  41Linux 2.6:
  42        The same rules apply as 2.4 except that you should follow linux-kernel
  43        to track changes in API's. The final contact point for Linux 2.6
  44        submissions is Andrew Morton <akpm@osdl.org>.
  45
  46What Criteria Determine Acceptance
  47----------------------------------
  48
  49Licensing:      The code must be released to us under the
  50                GNU General Public License. We don't insist on any kind
  51                of exclusively GPL licensing, and if you wish the driver
  52                to be useful to other communities such as BSD you may well
  53                wish to release under multiple licenses.
  54
  55Copyright:      The copyright owner must agree to use of GPL.
  56                It's best if the submitter and copyright owner
  57                are the same person/entity. If not, the name of
  58                the person/entity authorizing use of GPL should be
  59                listed in case it's necessary to verify the will of
  60                the copright owner.
  61
  62Interfaces:     If your driver uses existing interfaces and behaves like
  63                other drivers in the same class it will be much more likely
  64                to be accepted than if it invents gratuitous new ones. 
  65                If you need to implement a common API over Linux and NT
  66                drivers do it in userspace.
  67
  68Code:           Please use the Linux style of code formatting as documented
  69                in Documentation/CodingStyle. If you have sections of code
  70                that need to be in other formats, for example because they
  71                are shared with a windows driver kit and you want to
  72                maintain them just once separate them out nicely and note
  73                this fact.
  74
  75Portability:    Pointers are not always 32bits, not all computers are little
  76                endian, people do not all have floating point and you
  77                shouldn't use inline x86 assembler in your driver without
  78                careful thought. Pure x86 drivers generally are not popular.
  79                If you only have x86 hardware it is hard to test portability
  80                but it is easy to make sure the code can easily be made
  81                portable.
  82
  83Clarity:        It helps if anyone can see how to fix the driver. It helps
  84                you because you get patches not bug reports. If you submit a
  85                driver that intentionally obfuscates how the hardware works
  86                it will go in the bitbucket.
  87
  88Control:        In general if there is active maintainance of a driver by
  89                the author then patches will be redirected to them unless 
  90                they are totally obvious and without need of checking.
  91                If you want to be the contact and update point for the
  92                driver it is a good idea to state this in the comments,
  93                and include an entry in MAINTAINERS for your driver.
  94
  95What Criteria Do Not Determine Acceptance
  96-----------------------------------------
  97
  98Vendor:         Being the hardware vendor and maintaining the driver is
  99                often a good thing. If there is a stable working driver from
 100                other people already in the tree don't expect 'we are the
 101                vendor' to get your driver chosen. Ideally work with the 
 102                existing driver author to build a single perfect driver.
 103
 104Author:         It doesn't matter if a large Linux company wrote the driver,
 105                or you did. Nobody has any special access to the kernel
 106                tree. Anyone who tells you otherwise isn't telling the
 107                whole story.
 108
 109
 110Resources
 111---------
 112
 113Linux kernel master tree:
 114        ftp.??.kernel.org:/pub/linux/kernel/...
 115        ?? == your country code, such as "us", "uk", "fr", etc.
 116
 117Linux kernel mailing list:              
 118        linux-kernel@vger.kernel.org
 119        [mail majordomo@vger.kernel.org to subscribe]
 120
 121Kernel traffic:
 122        Weekly summary of kernel list activity (much easier to read)
 123        http://www.kerneltraffic.org/kernel-traffic/
 124
 125LWN.net:
 126        Weekly summary of kernel development activity - http://lwn.net/
 127        2.6 driver porting information:
 128                http://lwn.net/Articles/driver-porting/
 129
 130KernelTrap:
 131        Occasional Linux kernel articles and developer interviews
 132        http://kerneltrap.org/
 133
 134KernelNewbies:
 135        Documentation and assistance for new kernel programmers
 136        http://kernelnewbies.org/
 137
 138Linux USB project:
 139        http://sourceforge.net/projects/linux-usb/
 140
 141