Re: GPIO issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux