From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932459AbcFTQQe (ORCPT ); Mon, 20 Jun 2016 12:16:34 -0400 Received: from mail-ob0-f196.google.com ([209.85.214.196]:36071 "EHLO mail-ob0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754767AbcFTQQZ (ORCPT ); Mon, 20 Jun 2016 12:16:25 -0400 Date: Mon, 20 Jun 2016 10:57:44 -0500 From: Rob Herring To: Neil Armstrong Cc: Linus Walleij , Alexandre Courbot , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: sx150x: Update OF configuration Message-ID: <20160620155744.GA1419@rob-hp-laptop> References: <1466157063-10955-1-git-send-email-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466157063-10955-1-git-send-email-narmstrong@baylibre.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 17, 2016 at 11:51:03AM +0200, Neil Armstrong wrote: > In case of OF probing, the driver fails to initialize : > - gpio_chip.base must be -1 > - irq_summary must be either -1 or valid > - There is no way to use the other configurations > > Add OF parsing function to complete the HW configuration, make > OF configuration dynamic instead of static with #defines and > update the DT bindings. > > Signed-off-by: Neil Armstrong > --- > .../devicetree/bindings/gpio/gpio-sx150x.txt | 17 ++++++ > drivers/gpio/gpio-sx150x.c | 65 +++++++++++++++++++--- > 2 files changed, 75 insertions(+), 7 deletions(-) > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-sx150x.txt b/Documentation/devicetree/bindings/gpio/gpio-sx150x.txt > index c809acb..d2b5bb3 100644 > --- a/Documentation/devicetree/bindings/gpio/gpio-sx150x.txt > +++ b/Documentation/devicetree/bindings/gpio/gpio-sx150x.txt > @@ -22,6 +22,17 @@ Required properties: > > - interrupt-controller: Marks the device as a interrupt controller. > > +Optional Properties: > +- oscio-is-gpo: Boolean, Indicated the oscio pin can be used as additional > + output gpo port. > + > +- pull-up-ports: Array of port numbers which must have pull-up enabled. > +- pull-down-ports: Array of port numbers which must have pull-down enabled. > +- open-drain-ports: Array of port numbers which must be configured as open-drain, > + Push-Pull mode is default. > +- polarity-invert-ports: Array of port numbers whih port polarity must be inverted. Seems like these should be done in a common way. If not, they all need a vendor prefix. > +- probe-reset: Boolean, Indicates the expander must be resetted.