From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932539AbcCINd5 (ORCPT ); Wed, 9 Mar 2016 08:33:57 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:12284 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753536AbcCINdw (ORCPT ); Wed, 9 Mar 2016 08:33:52 -0500 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Wed, 09 Mar 2016 05:33:17 -0800 Message-ID: <56E02335.6020901@nvidia.com> Date: Wed, 9 Mar 2016 18:50:53 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Markus Pargmann CC: , , , , , , , , , Benoit Parrot , Alexandre Courbot Subject: Re: [PATCH 4/5] gpio: of: Add support to have multiple gpios in gpio-hog References: <1457438528-29054-1-git-send-email-ldewangan@nvidia.com> <1457438528-29054-5-git-send-email-ldewangan@nvidia.com> <20160309062849.GB10454@pengutronix.de> In-Reply-To: <20160309062849.GB10454@pengutronix.de> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRUKMAIL102.nvidia.com (10.25.59.20) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = ; input; }; wlan_output { gpio-hog; gpios = ; 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 = ; gpios-output-high = ; }; };