IMX LED Driver TP

From ArmadeusWiki
Jump to navigationJump to search

Page under construction... Informations on this page are not guaranteed !!

Proposal

The goal of this tutorial is to build from scratch a simple led driver wire on GPIO of the iMX. This document will describes step by step how to implement a such driver

Howto Load/unload modules : "hwmon" module

Load module is quite simple once it is compile an in the rootfs of the apf board. All the compiled driver modules are in the "/lib/modules/<kernel version>/kernel". To find all the loadable modules by the kernel in the board type :

 # find /lib/modules/`uname -r`/kernel -name "*.ko"
/lib/modules/2.6.27.13/kernel/sound/arm/snd-imx-alsa-tsc2102.ko
/lib/modules/2.6.27.13/kernel/sound/arm/snd-mx2.ko
/lib/modules/2.6.27.13/kernel/sound/core/snd-page-alloc.ko
/lib/modules/2.6.27.13/kernel/sound/core/snd-timer.ko
/lib/modules/2.6.27.13/kernel/sound/core/snd.ko
/lib/modules/2.6.27.13/kernel/sound/core/snd-pcm.ko
/lib/modules/2.6.27.13/kernel/sound/soundcore.ko
/lib/modules/2.6.27.13/kernel/drivers/spi/tsc2102.ko
/lib/modules/2.6.27.13/kernel/drivers/scsi/scsi_wait_scan.ko
/lib/modules/2.6.27.13/kernel/drivers/hwmon/hwmon.ko
/lib/modules/2.6.27.13/kernel/drivers/input/touchscreen/tsc2102_ts.ko
/lib/modules/2.6.27.13/kernel/drivers/video/backlight/lcd.ko
/lib/modules/2.6.27.13/kernel/drivers/video/backlight/backlight.ko
/lib/modules/2.6.27.13/kernel/drivers/armadeus/max1027/max1027.ko
/lib/modules/2.6.27.13/kernel/drivers/armadeus/backlight/imx_bl.ko

For example, I will load "/lib/modules/2.6.27.13/kernel/drivers/hwmon/hwmon.ko" module :

 # modprobe hwmon
 #

To unload it just type :

 # rmmod hwmon
 #

TBC

Howto Build a simple module and load/unload it : the "Hello World" module

Howto Provide read/write commands to the user though /dev/hello : "Hello World Read Write" module

Howto Build a register use module : "iMX LED" module