public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* GPIO issue
@ 2008-04-15 22:29 Luís Vitório Cargnini
  2008-04-15 22:39 ` Luís Vitório Cargnini
  0 siblings, 1 reply; 4+ messages in thread
From: Luís Vitório Cargnini @ 2008-04-15 22:29 UTC (permalink / raw)
  To: linux-omap

dear fellows:

I have the following problem:
I have an OSK (5912 dev board) and I written a device driver that does
the following:

omap_request_gpio(8);
omap_request_gpio(11);

omap_set_gpio_direction(8,1);
omap_set_gpio_direction(11, 1);

omap_set_gpio_dataout(8, 0);
omap_set_gpio_dataout(11, 1);


But none of this pins are driving signals, please someone can help me
with this minimal issue.

-- 
------------------------------------------------------------------------------
Thanks && Regards
M.Sc. B.Sc. Luís Vitório Cargnini
IEEE Member
Electrical Engineer Faculty @ PUCRS
Ipiranga Avenue, 6681 – Building 30
P.O. Box: 90619-900 – Porto Alegre/RS
Phone: +55 51 3320 3500  extension: 7696
---------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GPIO issue
  2008-04-15 22:29 GPIO issue Luís Vitório Cargnini
@ 2008-04-15 22:39 ` Luís Vitório Cargnini
  2008-04-15 22:55   ` David Brownell
  0 siblings, 1 reply; 4+ messages in thread
From: Luís Vitório Cargnini @ 2008-04-15 22:39 UTC (permalink / raw)
  To: linux-omap

excuse me now I saw I just put the wrong value in  set_direction
  omap_set_gpio_direction(8,1);

must be
  omap_set_gpio_direction(8,0);

now it is working
silly mistake.

On Tue, Apr 15, 2008 at 7:29 PM, Luís Vitório Cargnini
<lvcargnini@gmail.com> wrote:
> dear fellows:
>
>  I have the following problem:
>  I have an OSK (5912 dev board) and I written a device driver that does
>  the following:
>
>  omap_request_gpio(8);
>  omap_request_gpio(11);
>
>  omap_set_gpio_direction(8,1);
>  omap_set_gpio_direction(11, 1);
>
>  omap_set_gpio_dataout(8, 0);
>  omap_set_gpio_dataout(11, 1);
>
>
>  But none of this pins are driving signals, please someone can help me
>  with this minimal issue.
>
>  --
>  ------------------------------------------------------------------------------
>  Thanks && Regards
>  M.Sc. B.Sc. Luís Vitório Cargnini
>  IEEE Member
>  Electrical Engineer Faculty @ PUCRS
>  Ipiranga Avenue, 6681 – Building 30
>  P.O. Box: 90619-900 – Porto Alegre/RS
>  Phone: +55 51 3320 3500  extension: 7696
>  ---------------------------------------------------------------------------------
>



-- 
------------------------------------------------------------------------------
Thanks && Regards
M.Sc. B.Sc. Luís Vitório Cargnini
IEEE Member
Electrical Engineer Faculty @ PUCRS
Ipiranga Avenue, 6681 – Building 30
P.O. Box: 90619-900 – Porto Alegre/RS
Phone: +55 51 3320 3500  extension: 7696
---------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GPIO issue
  2008-04-15 22:39 ` Luís Vitório Cargnini
@ 2008-04-15 22:55   ` David Brownell
       [not found]     ` <ae36f8040804151600j2319929epeb6a9e54db28d2ea@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2008-04-15 22:55 UTC (permalink / raw)
  To: lvcargnini; +Cc: linux-omap

On Tuesday 15 April 2008, Luís Vitório Cargnini wrote:
> 
> excuse me now I saw I just put the wrong value in  set_direction
>   omap_set_gpio_direction(8,1);
> 
> must be
>   omap_set_gpio_direction(8,0);

This is one of *many* reasons to avoid using those
legacy GPIO calls.  If you had written

	gpio_direction_input(8)

instead of that first call, the issue would have been obvious.  :)

	if (gpio_request(8, "signal_name") == 0)
		gpio_direction_output(8, 1 /* initial value */);
	else
		/* ERROR */ ;

Note that /sys/kernel/debug/gpio shows GPIO status,
assuming you have debugfs mounted in the normal way.

- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: GPIO issue
       [not found]     ` <ae36f8040804151600j2319929epeb6a9e54db28d2ea@mail.gmail.com>
@ 2008-04-15 23:04       ` David Brownell
  0 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2008-04-15 23:04 UTC (permalink / raw)
  To: lvcargnini; +Cc: linux-omap

On Tuesday 15 April 2008, Luís Vitório Cargnini wrote:
> where I found the documentation of the new GPIO lib ? since I'm using
> legacy functions.

Documentation/gpio.txt ...


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-15 23:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-15 22:29 GPIO issue Luís Vitório Cargnini
2008-04-15 22:39 ` Luís Vitório Cargnini
2008-04-15 22:55   ` David Brownell
     [not found]     ` <ae36f8040804151600j2319929epeb6a9e54db28d2ea@mail.gmail.com>
2008-04-15 23:04       ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox