Re: Right amount of info in the DT

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

 



On 05/11/2017 05:22 PM, Linus Walleij wrote:
> Just make sure your driver also provides a gpio_chip and
> write good looking code.

OK, IMHO the code I attached earlier would do that.

> Implement everything you have a data sheet for even if you
> do not use it right now. It is good to have.

Do you mean that I should submit a driver for every single device
before I can declare its pins in the DT? That will surely take
quite a long time, and I'm required to get GPIO functionality before
that.

Furthermore, even if I had a driver for a device whose pins can also
be GPIOs, say smartcard. If the driver is built as a module, and has
not been yet loaded in, then, since you want the pinctrl node has a
child node, no gpiochip struct could have been registered, and the pins
can't be used as GPIOs.
Does this mean that to use the smartcard's pin as GPIOs, the smartcard
driver must absolutely be loaded, even though smartcards are never used?

> Have you read the section "GPIO mode pitfalls" in the documentation?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/pinctrl.txt
> 
> It is very important that you know for sure whether it is actual
> GPIO or just named that way by some hardware engineer.

I did read the documentation, and I'm pretty sure those pins are all
actual GPIOs: once a pin's mode flag has been cleared, it can be
arbitrarily set high or low, or listened to by kernel code.

Regards,
Yves.

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



[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