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.

C6-Integra GPIO (TMS320C6A816x)

Hello,

 I am having trouble getting the Linux GPIO driver to work and was hoping that someone could point out what I am doing wrong.  I am trying to control pin GP025, which I believe is not muxed with any other pin.  I have the following simple module code…

      status= gpio_request(25, "gpio");

     printk(KERN_INFO "GPIO 25 request status = %d\n", status);

     status = gpio_is_valid(25);

     printk(KERN_INFO "GPIO 25 is  valid = %d\n", status);

     status = gpio_direction_output(25, 1);

     printk(KERN_INFO "GPIO 25 set status = %d\n", status);

     gpio_set_value(25, 1);

 

All the status comes back ok, but the pin does not go high. I have also tried to control pin 6, with basically the same code (except for 6) and have configured the pin in the mux code for IO.  I have also enabled the sys/class/gpio interface and tried using it, but still no luck. 

Do I need to enable the GPIO model somewhere in the kernel?  If so where would be the place to put this?  It is not obvious to me where other modules are being enabled/ taken out of sleep.

 Any ideas would be appreciated. Thanks for the help…

FYI: Using  ti-ezsdk-dm816x-evm_5_01_00_77

  • Linux seems to have a lot of indirection and auto-magic stuff in. From what I can tell drivers will generally init the HW as appropriate. Only the MUX needs to be manually setup. A post by N.S.SriHarsha made this suggestion to check the MUX settings.

    mount -t debugfs debug /sys/kernel/debug
    cd /sys/kernel/debug/omap_mux

    Maybe double check the kernel config mux option. On my board it is CONFIG_DAVINCI_MUX. On others it could be CONFIG_OMAP_MUX. Assumes you are letting Linux do the MUX config.