On 03/09/2016 06:20 AM, Laxman Dewangan wrote:
On Wednesday 09 March 2016 11:58 AM, Markus Pargmann wrote:
* PGP Signed by an unknown keyThere is cases on which particular functional configuration needs sets
On Tue, Mar 08, 2016 at 05:32:07PM +0530, Laxman Dewangan wrote:
The child node for gpio hogs under gpio controller's nodeSo if I read this correctly you want to have multiple GPIOs with the
provide the mechanism to automatic GPIO request and
configuration as part of the gpio-controller's driver
Currently, property "gpio" takes one gpios for such
configuration. Add support to have multiple GPIOs in
this property so that multiple GPIOs of gpio-controller
can be configured by this mechanism with one child node.
same line name? Why don't you use multiple child nodes with individual
of GPIO to set. On this case, making sub node for each GPIOs creates
lots of sub-nodes and add complexity on readability, usability and
Example: for my board, I wanted to set GPIO H2 to input and H0 and H1 to
be output high.
Instead of three nodes, I can have two here:
gpios = <TEGRA_GPIO(H, 2) 0>;
gpios = <TEGRA_GPIO(H, 0) 0 TEGRA_GPIO(H, 1) 0>;
So here I am grouping the multiple output GPIO together.
This looks much similar if we have many GPIOs for one type of
Even it looks better if we have something:
gpios-input = <TEGRA_GPIO(H, 2) 0>;
gpios-output-high = <TEGRA_GPIO(H, 0) 0
TEGRA_GPIO(H, 1) 0>;
The problem with that is the description used when acquiring the GPIO is just "wlan_input", "wlan_output", or "wlan_control". There's nothing to indicate what those individual pins do (perhaps one is a reset signal, one is a regulator enable, etc.?) By requiring separate nodes for each GPIO, then the node name can provide a meaningful semantic name/description for each GPIO, which provides much more information.
If the approach in this patch is acceptable though, I think you want to update the description of "gpios" (in the GPIO hog definition section) in Documentation/devicetree/bindings/gpio/gpio.txt to mention that multiple GPIO entries are legal. Right now it says that property much contain exactly #gpio-cells, not a multiple of #gpio-cells.