What should be the value of ngpio field for multiplexed GPIO Pins

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

 



Hello,
I am writing driver for USB Based device which has 4 pins which can be
configured for GPIO or alternate functions. 2 pins are configured for
GPIO while other 2 pins for alternate function. In this scenario, what
is correct approach 1 or 2 and why from linux gpio framework
perspective?

1. Register all 4 pins and return -ENODEV in request calback for pins
used for alternate function.
struct gpio_chip *gc;
gc.ngpio = 4;

2. Register only 2: gc.ngpio = 2;

Regards,
Rishi



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux