Re: Tegra gpio driver: Need to configure pins in gpio mode/nontristate with gpio-request

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

 



On Thu, May 5, 2011 at 3:16 AM, Laxman Dewangan <ldewangan@xxxxxxxxxx> wrote:
> Hi All,
> When working on gpio driver for tegra, I found that gpio_request() does not
> make the corresponding soc pins to gpio mode. It still keeps the pins in SFIO mode.
> So we need to call two extra function along with gpio_request():
> Tegra_gpio_enable() and function for setting the pins in no non-tristate.
>
> Sue to this, the gpio sysfs interface does not work properly from user space /sys/class/gpio/.
> To make the pin in gpio mode fom user space, need to have changes in kernel.
>
> I think the gpio_request() should make the pins to gpio mode and make ready for use.
> Similarly gpio_free() should again put the pin into sfio mode with tristate disable.
>
> Please comment if there is any better way..

>From Documentation/gpio.txt:
Note that requesting a GPIO does NOT cause it to be configured in any
way; it just marks that GPIO as in use.  Separate code must handle any
pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown).
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux