Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1426766

Re: [PATCH] gpio: sx150x: Update OF configuration

From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] gpio: sx150x: Update OF configuration
Date 2016-06-20 18:20 +0200
Message-ID <rMa5z-24j-7@gated-at.bofh.it> (permalink)
References <rKYJc-4U2-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <narmstrong@baylibre.com>
> ---
>  .../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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] gpio: sx150x: Update OF configuration Neil Armstrong <narmstrong@baylibre.com> - 2016-06-17 12:00 +0200
  Re: [PATCH] gpio: sx150x: Update OF configuration kbuild test robot <lkp@intel.com> - 2016-06-17 13:20 +0200
  Re: [PATCH] gpio: sx150x: Update OF configuration Linus Walleij <linus.walleij@linaro.org> - 2016-06-18 11:10 +0200
    Re: [PATCH] gpio: sx150x: Update OF configuration Neil Armstrong <narmstrong@baylibre.com> - 2016-06-20 11:20 +0200
  Re: [PATCH] gpio: sx150x: Update OF configuration Rob Herring <robh@kernel.org> - 2016-06-20 18:20 +0200
    Re: [PATCH] gpio: sx150x: Update OF configuration Linus Walleij <linus.walleij@linaro.org> - 2016-06-23 10:10 +0200
      Re: [PATCH] gpio: sx150x: Update OF configuration Neil Armstrong <narmstrong@baylibre.com> - 2016-06-23 10:20 +0200
        Re: [PATCH] gpio: sx150x: Update OF configuration Linus Walleij <linus.walleij@linaro.org> - 2016-06-23 11:10 +0200

csiph-web