For example, kernel version: 2.6.29.
Driver: g-sensor.
1. Copy drivers or kernel modules srouce code to ./devices/misc/g-sensor
2. Modification ./devices/misc/Kconfig, add some code:
#wenxy add it, for g-sensor driver, 20100717,pm.
source "drivers/misc/g-sensor/Kconfig"
3. Modification ./devices/misc/Makefile, add some code:
#wenxy add it, for g-sensor driver, 20100717,pm.
obj-y += g-sensor/
or obj-$(CONFIG_XXX) += g-sensor/
this line code depend on Kconfig or Makefile of your drivers or kernel modules
4. Run "make menuconfig", you can see menu items for support the drivers or kernel modules.
PS. tips, use "/" for search a menu item.