Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1354120
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog |
| Date | 2016-03-09 14:40 +0100 |
| Message-ID | <raMvg-5O-11@gated-at.bofh.it> (permalink) |
| References | <raoMi-Hp-7@gated-at.bofh.it> <raoMi-Hp-5@gated-at.bofh.it> <raFN8-41M-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wednesday 09 March 2016 11:58 AM, Markus Pargmann wrote:
> * PGP Signed by an unknown key
>
> Hi,
>
> On Tue, Mar 08, 2016 at 05:32:07PM +0530, Laxman Dewangan wrote:
>> The child node for gpio hogs under gpio controller's node
>> provide the mechanism to automatic GPIO request and
>> configuration as part of the gpio-controller's driver
>> probe function.
>>
>> 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.
> So if I read this correctly you want to have multiple GPIOs with the
> same line name? Why don't you use multiple child nodes with individual
> line names?
>
There is cases on which particular functional configuration needs sets
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
maintainability.
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:
gpio@0,6000d000 {
wlan_input {
gpio-hog;
gpios = <TEGRA_GPIO(H, 2) 0>;
input;
};
wlan_output {
gpio-hog;
gpios = <TEGRA_GPIO(H, 0) 0 TEGRA_GPIO(H, 1) 0>;
output-high;
};
};
So here I am grouping the multiple output GPIO together.
This looks much similar if we have many GPIOs for one type of
configurations.
Even it looks better if we have something:
gpio@0,6000d000 {
wlan_control {
gpio-hog;
gpios-input = <TEGRA_GPIO(H, 2) 0>;
gpios-output-high = <TEGRA_GPIO(H, 0) 0
TEGRA_GPIO(H, 1) 0>;
};
};
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-08 13:20 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Markus Pargmann <mpa@pengutronix.de> - 2016-03-09 07:30 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-09 14:40 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Stephen Warren <swarren@wwwdotorg.org> - 2016-03-09 18:20 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-10 08:30 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Markus Pargmann <mpa@pengutronix.de> - 2016-03-10 12:20 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-10 13:10 +0100
Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog Rob Herring <robh@kernel.org> - 2016-03-17 16:50 +0100
csiph-web