Changeset 931 for lm-sensors/trunk/doc/developers/new_drivers
- Timestamp:
- 11/22/00 18:55:46 (13 years ago)
- Files:
-
- 1 modified
-
lm-sensors/trunk/doc/developers/new_drivers (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/trunk/doc/developers/new_drivers
r334 r931 1 These are the steps you should follow to write a new driver and 2 submit it to us so that it will be applied cleanly to our package. 3 1 4 * Contact us first. 2 5 You are of course free to write your own drivers, but it is smart to 3 6 check first nobody else is already working on it. 7 Check our "New Drivers" page for information also. 8 4 9 * Write the new driver. 5 10 For a chip driver, use lm78.c as template. For an SMBus-only adapter, … … 11 16 chip. If these sensor values need scaling, this should be done through 12 17 the configuration file. 18 19 * Meet Kernel coding standards 20 See Documentation/CodingStyle in the kernel source. 21 Be sure and use 8 column tabs. 22 13 23 * Add the driver to the Makefile. 14 24 Usually, you can just add it to KERNEL{CHIPS,DRIVERS}TARGETS in the 15 25 Module.mk file in the directory itself. 26 16 27 * Make sure it compiles cleanly. 17 28 If you compile with 'make WARN=1', you usually get many additional … … 21 32 stop the driver from functioning; they should just output additional 22 33 information. 34 23 35 * Check for external symbols 24 36 'nm --extern --defined' should only output symbols starting with __module, 25 37 cleanup_module, init_module and some kernel versioning symbols. Mark all 26 38 other symbols as static in your source file. 39 27 40 * Test the module 28 41 This is usually the boring part... 42 Test both with 2.2.x and 2.4.x kernels. 43 29 44 * Add detection information to prog/detect/sensors-detect 30 45 This is a perl script that automatically detects what chips and adapters 31 46 are present. Contact Frodo if you need help. 47 32 48 * Add chip information to lib/chips.{c,h} for chip drivers 33 49 Until you have done this, the chip will be invisible for user-level 34 50 programs. Again, contact Frodo if you need help with this. 51 35 52 * Add entries to etc/sensors.conf.eg 36 53 If needed, you can set defaults here. 54 37 55 * Add a dedicated procedure to prog/sensors/chips.[ch] 38 56 This makes the included sensors program pretty-print your chip information. 57 58 * Add the name of the device to the README file. 59 60 * Add your name to the CONTRIBUTORS file. 61 62 * Add entries to the CHANGES file. 63 64 * Write a doc/chips/xxx or doc/busses/xxx file. 65 66 * Make sure the GPL boilerplate and your name (and if applicable your 67 company's name) is at the top of the 68 new driver so we know you are giving it to us under the GPL. 69 70 * Submit the changes to us a patch against CVS.
