lkml.org 
[lkml]   [2011]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
Subjectproblems with GPIO
From
Hi There,

I am rather a novice with linux kernel and I have this problem.
My board is OMAP 3530 based and I use GPIO 21 to detect an external
device plug-in.
Now, when the board is just booted (after a complete power disconnect
), the GPIO is high, and when I plug in my external device, the GPIO
goes low, and I am able to detect it.
However, I see the voltage level still low after I remove the external
plug-in, and any further plug-ins, remain un-detected.
My H/W engineers say it is some config I am missing in Kernel.
can someone point me?

my code snippet is like:

omap_mux_init_gpio(MY_GPIO, OMAP_PIN_INPUT_PULLDOWN );
gpio_request(MY_GPIO,"CABLE IN");
gpio_direction_input(MY_GPIO);
gpio_set_value(MY_GPIO,1);

set_irq_type(MY_IRQ,
IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING
);

err = request_threaded_irq (MY_IRQ, NULL, my_dev_irq_thread,
IRQF_TRIGGER_FALLING,
"MY_DEV", NULL);

As I mentioned "my_dev_irq_thread" gets called when the actual GPIO is
detected to be going low.

Any pointers?
Thanks & regards
Murali


\
 
 \ /
  Last update: 2011-02-18 05:23    [W:0.035 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site