LDD 3 How to write linux device driver and test it - limingth/LASO GitHub Wiki

write driver code

method 1

using ioremap(SFR_ADDR, size);
int * pled = ioremap(0xE0200284, 4);

method 2

using kernel mothed 
gpio_set_value(S5PV210_GPJ(x), 0/1);

method 3

using file_operations & miscdevice 

test driver

method 1/2

insmod led.ko
rmmod led

method 3

insmod led.ko
rmmod led
./led_app l 1