Changeset 1175
- Timestamp:
- 09/08/01 18:27:32 (7 years ago)
- Files:
-
- lm-sensors/trunk/doc/developers/new_drivers (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/doc/developers/new_drivers
r1097 r1175 15 15 Tell us it's OK to put your name on the "New Drivers" page. 16 16 17 * Check out our latest code from CVS. 18 You should use this as a base for your development. 19 See instructions on our download page. 20 17 21 * Write the new driver. 18 22 For a chip driver, use lm78.c as template. For an SMBus-only adapter, … … 25 29 the configuration file. 26 30 27 * Meet Kernel coding standards 31 * Meet Kernel coding standards. 28 32 See Documentation/CodingStyle in the kernel source. 29 33 Be sure and use 8 column tabs. 30 34 31 * Add the driver to the Module.mk (makefile) 35 * Meet /proc naming standards in the ctl_table (for chip drivers only). 36 See doc/developers/proc for information. 37 38 * Add the driver to the Module.mk (makefile). 32 39 Usually, you can just add it to KERNEL{CHIPS,DRIVERS}TARGETS in the 33 40 Module.mk file in the directory itself. … … 41 48 information. 42 49 43 * Check for external symbols 50 * Check for external symbols. 44 51 'nm --extern --defined' should only output symbols starting with __module, 45 52 cleanup_module, init_module and some kernel versioning symbols. Mark all 46 53 other symbols as static in your source file. 47 54 48 * Test the module 55 * Test the module. 49 56 This is usually the boring part... 50 57 Test both with 2.2.x and 2.4.x kernels. 51 58 52 * Add detection information to prog/detect/sensors-detect 59 * Add detection information to prog/detect/sensors-detect. 53 60 This is a perl script that automatically detects what chips and adapters 54 are present. Contact Frodoif you need help.61 are present. Contact us if you need help. 55 62 56 * Add chip information to lib/chips.{c,h} (for chip drivers only) 63 * Add chip information to lib/chips.{c,h} (for chip drivers only). 57 64 Until you have done this, the chip will be invisible for user-level 58 programs. Again, contact Frodo if you need help with this. 65 programs which use libsensors. Use standard names in lib/chips.c; 66 see also the comments in etc/sensors.conf.eg for help. 67 Contact us if you need more assistance. 59 68 60 * Add entries to etc/sensors.conf.eg (for chip drivers only) 69 * Add entries to etc/sensors.conf.eg (for chip drivers only). 61 70 If needed, you can set defaults here. 62 71 63 * Add a dedicated procedure to prog/sensors/chips.[ch] (for chip drivers only) 64 This makes the included sensors program pretty-print your chip information. 72 * Add a procedure to prog/sensors/chips.[ch] (for chip drivers only). 73 This is a function specific for your driver that 74 makes the included 'sensors' program pretty-print your chip information. 65 75 66 76 * Add the name of the device to the README file. … … 72 82 * Write a doc/chips/xxx or doc/busses/xxx file. 73 83 74 * Make sure the GPL boilerplate and your name (and if applicable your 75 company's name) is at the top of the 84 * Clearly specify licensing and copyright. 85 Make sure the GPL boilerplate and your name 86 (or if applicable your company's name) is at the top of the 76 87 new driver so we know you are giving it to us under the GPL. 77 88 78 * Submit the changes to us a patch against CVS. 89 * Submit the changes to us. 90 Check out a clean version of CVS again (things will have changed since 91 you started), then submit the changes to us as a patch against CVS. 79 92 80 93 ---------------------------------------------------------------------
