lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 3 Mar 2011 09:43:59 -0700
From:	Grant Likely <grant.likely@...retlab.ca>
To:	"Murali K. Vemuri" <vemuri.muralikrishna@...il.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: problems with GPIO

"Murali K. Vemuri" <vemuri.muralikrishna@...il.com> wrote:

>hi,
>I am doing a gpio_set_value() to ensure it is an input pin to OMAP.
>I tried my device with and without that, and no difference though.
>any pointers?

Please don't top post on lkml replies.  Put your reply below the text
you're replying to.  Also, don't forget to "reply-all".  You replied
to me personally instead of on-list.

gpio_set_value() is for setting gpio output value, not input.  It
won't have any usefulness for a pin configured for input.

I don't know anything about the specific gpio controller driver that
you're using.  You'll need to read up in the reference manual to
figure out if there is any other SoC configuration that you need to
do.

g.

>
>On Thu, Mar 3, 2011 at 3:24 PM, Grant Likely
><grant.likely@...retlab.ca> wrote:
>> On Thu, Feb 17, 2011 at 9:21 PM, Murali K. Vemuri
>> <vemuri.muralikrishna@...il.com> wrote:
>>> 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);
>>
>> It depends on the gpio controller driver, but gpio_set_value() is
>very
>> likely switching the GPIO pin from input to output.  Why are you
>> calling gpio_set_value()?
>>
>> g.
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ