This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

loading driver module in to target.

Other Parts Discussed in Thread: AM1808

Hi,

 

I am working with AM1808. I want to enable GPIO driven matrix keypad support. I have interfaced external matrix keypad(6x7) circuitary.

How to load matrix_keypad driver module in AM1808 target. 

 

I have cross compiled with matrix_keypad driver. How to insert and get the key response data from /dev/input/event0. I am unable to

load the matrix_keypad.ko in to the target using "INSMOD" and "MODPROBE" commands. 

 

As per the matrix keypad driver it should give some response from /dev/input/event0 using console test application.  

 

Regards,

Francis 

  • Hi,

    When you say you are not able do insmod, are you seeing any error message on the console during insmod?

    Which version of release you are using? What is the compiler you are using?

    Regards, Sudhakar

  • Hi Sudhakar,

     

    I am using AM1808 DaVinci-PSP-SDK-03.20.00.11 version. I have cross compiled the modules using arm-none-linux-gnueabi-gcc-4.3.3.

    and the kernel using 2.6.33-rc4 version.

     

    I followed these steps to compile all the modules: 

     

    root@da850-omapl138-evm:/home/kumar# ls -l

    -rwxrwxrwx    1 root     root        18016 Oct 21  2011 event_test

    -rwxrwxrwx    1 root     root          961 Oct 20  2011 key_script

    -rwxrwxrwx    1 root     root         7455 Oct 20  2011 matrixTest

    -rwxrwxrwx    1 root     root        11229 Oct 19  2011 matrix_keypad.ko

     

    root@da850-omapl138-evm:/home/kumar# insmod matrix_keypad.ko 

    insmod: error inserting 'matrix_keypad.ko': -1 File exists

     

    To build all features configured as modules (M), issue the following command:

    host$ make modules ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-

     

    To install the compiled modules into the target root file system, issued the following command:

    host$ make modules_install INSTALL_MOD_PATH=/home/kumar/filesys ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi 

     

    where the <root fs path> is the path of your target root file system on the host machine (/home/kumar/filesys).

    Created all the compiled modules are located in filesystem(/lib/modules/2.6.33-rc4/kernel/drivers/input/keyboard/matrix_keypad.ko)

     

    root@da850-omapl138-evm:/lib/modules/2.6.33-rc4/kernel/drivers/input/keyboard# ls -l

    -rwxrw-rw-    1 1000     1000        26844 Mar 25  2010 atkbd.ko

    -rwxr--r--    1 root     root        11229 Oct 19  2011 matrix_keypad.ko

    -rwxrw-rw-    1 1000     1000         6099 Mar 25  2010 xtkbd.ko

     

    root@da850-omapl138-evm:/lib/modules/2.6.33-rc4/kernel/drivers/input/keyboard# insmod matrix_keypad.ko  

    insmod: error inserting 'matrix_keypad.ko': -1 File exists

     

    please correct me if i did any mistake. please suggest me.

     

    Regards,

    Francis Kumar

  • Hi,

    francis kumar said:

    root@da850-omapl138-evm:/lib/modules/2.6.33-rc4/kernel/drivers/input/keyboard# insmod matrix_keypad.ko  

    insmod: error inserting 'matrix_keypad.ko': -1 File exists

    This error means, the module is already present in the kernel. Before doing insmod you can execute "lsmod" command and find out the kernel modules which are already inserted.

    Regards, Sudhakar

  • Hi,

    Ok, that means my matrix_keypad.ko module is already inserted in AM1808 target.

    while testing my keypad, i have written the console application to read keypad data from /dev/input/eventX device. But i am not able to see any such devices in AM1808 target.

    While searching my device in AM1808 target, I did't find any registered "matrix_keypad" device under the /dev/input/even0 or event1 such devices names.

    Please find the below command:

    root@da850-omapl138-evm:~# cd /dev/

    /dev/block/  /dev/bus/    /dev/char/   /dev/pts/    /dev/shm/    /dev/snd/

    For showing /dev/input directory created by user or while including my module will take it by deafault. How to create a default node in AM1808 target.

    Example: while i added the touch screen driver in makemenuconfig, and loading the image in AM1808 target, then it shows the following command:

    root@da850-omapl138-evm:~# cd /dev/

    /dev/block/  /dev/bus/    /dev/char/  /dev/input/  /dev/pts/    /dev/shm/    /dev/snd/

    root@da850-omapl138-evm:~# cd /dev/input

    event0    TPS6507x Touchscreen

    How to resolve this issue, I need to modify in driver or i have to run any commands in AM1808 target. Because these all the modules installed and tested by TI while procure this AM1808 target. 

     

    Regards,

    Francis Kumar.B

     

  • Hi,

    Can you send me the output of lsmod command on the target?

    Also, send the complete booting log of the kernel.

    Regards, Sudhakar