Changeset 1836
- Timestamp:
- 07/03/03 04:29:11 (5 years ago)
- Files:
-
- lm-sensors/trunk/doc/developers/new_drivers (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/doc/developers/new_drivers
r1648 r1836 10 10 Steps which apply to only one type of driver are noted. 11 11 12 These instructions are for 2.4-kernel-compatible drivers. 13 If you wish to write a driver for 2.5 only, email us for information. 12 14 13 * Contact us first. 15 --------------------------------------------------------------------- 16 17 * Check our "New Drivers" page for status!! 18 19 * Contact us. 14 20 You are of course free to write your own drivers, but it is smart to 15 check first nobody else is already working on it .16 Check our "New Drivers" page for information also.21 check first nobody else is already working on it, in case the 22 New Drivers page is out of date. 17 23 You will also need to ask us to have an ID reserved in 18 24 i2c-id.h in the i2c package. … … 26 32 * Write the new driver. 27 33 For a chip driver, use lm78.c as template. For an SMBus-only adapter, 28 use i2c-piix4.c. Use i2c-via.c for an I2C-level adapter .34 use i2c-piix4.c. Use i2c-via.c for an I2C-level adapter ('bit banger'). 29 35 Usually, we make all prefixes start with the driver name. This is not 30 36 really necessary, as these symbols will not be exported anyway. But by … … 46 52 47 53 * Meet /proc naming standards in the ctl_table (for chip drivers only). 48 See doc/developers/proc for information. 54 See doc/developers/proc for information. Please do not deviate from 55 this without discussion. 49 56 50 57 * Add the driver to the Module.mk (the makefile). … … 54 61 55 62 * Make sure it compiles cleanly. 56 If you compile with 'make WARN=1', you usually get many additional 57 warnings. Please resolve these too, even if you know they are 58 harmless. Do the same with 'make DEBUG=1 WARN=1' if you use debugging 63 Check compilation with 'make DEBUG=1' if you use debugging 59 64 information. Remember, things put between #ifdef DEBUG #endif may never 60 65 stop the driver from functioning; they should just output additional … … 80 85 Contact us if you need more assistance. 81 86 82 * Add alarm definitions to kernel/include/sensors.h (for chip drivers only). 83 These define the bits in the 'alarms' entry in /proc. 87 * Be sure that SYSCTL and ALARM definitions in the driver are bracketed 88 by the special comments so that the kernel/include/sensors.h 89 file, which is generated automatically, contains your definitions. 90 (for chip drivers only) 84 91 85 92 * Add a procedure to prog/sensors/chips.[ch] (for chip drivers only). … … 128 135 129 136 * Add makefile entry in mkpatch/mkpatch.pl (2 places - old and new formats). 137 (don't bother with old format, obsolete) 130 138 131 139 * Add config help to mkpatch/mkpatch.pl. … … 134 142 135 143 * Add config entry in mkpatch/mkpatch.pl (bus drivers only) 136 137 * Add declaration and init. call to kernel/sensors.c (chip drivers only)138 (verify init function name)139 140 * Add declaration and init. call in mkpatch/mkpatch.pl (bus drivers only)141 (verify init function name)142 144 143 145 * Move .o reference in kernel/[chips,busses]/Module.mk
