1. 26 Apr, 2016 3 commits
    • Linus Walleij's avatar
      gpio: remove deps on ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB · 296ad4ac
      Linus Walleij authored
      The GPIOLIB symbol currently require that
      ARCH_WANT_OPTIONAL_GPIOLIB or ARCH_REQUIRE_GPIOLIB is selected
      to be selectable.
      
      The ARCH_REQUIRE_GPIOLIB does only one thing: select GPIOLIB.
      
      This is just confusing: architectures that want GPIOLIB should
      be able to configure it in no matter what, and those who
      require it should just select GPIOLIB.
      
      It also creates problems for drivers that need to state
      "select GPIOLIB" to get dependencies: those depend on the
      selected architecture to select
      ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB first, and will cause
      compile errors for the few archs that state neither.
      
      These intermediary symbols need to go.
      
      As a first step, remove the dependencies so that:
      
      - ARCH_WANT_OPTIONAL_GPIOLIB becomes a noop (GPIOLIB will be
        available for everyone) and
      
      - "select ARCH_REQUIRE_GPIOLIB" can be replaced by just
        "select GPIOLIB"
      
      After this patch we can follow up with patches cleaning up the
      architectures one-by one and eventually remove the
      ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB symbols altogether.
      Reported-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
      Cc: Michael Büsch <m@bues.ch>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      296ad4ac
    • Linus Walleij's avatar
      gpio: revert bank bindings · a89d6cb3
      Linus Walleij authored
      Keep the words talking about what a GPIO bank is, but remove the
      binding. We have not agreed that this is something we want to have.
      Acked-by: default avatarRob Herring <robh+dt@kernel.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      a89d6cb3
    • Linus Walleij's avatar
      gpio: move gpiod_set_array_value_priv() · 44c7288f
      Linus Walleij authored
      This renames gpiod_set_array_value_priv() to
      gpiod_set_array_value_complex() and moves it to the gpiolib.h
      private header file so we can reuse it in the subsystem.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      44c7288f
  2. 18 Apr, 2016 1 commit
  3. 15 Apr, 2016 2 commits
  4. 14 Apr, 2016 13 commits
  5. 13 Apr, 2016 2 commits
  6. 09 Apr, 2016 4 commits
  7. 05 Apr, 2016 9 commits
    • Paul Gortmaker's avatar
      gpio: tps6586x: make explicitly non-modular · a0e63738
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_TPS6586X
      drivers/gpio/Kconfig:   bool "TPS6586X GPIO"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was not in use by this code, the init ordering
      remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      a0e63738
    • Paul Gortmaker's avatar
      gpio: tps65910: make explicitly non-modular · 02c7a13e
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_TPS65910
      drivers/gpio/Kconfig:   bool "TPS65910 GPIO"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was not in use by this code, the init ordering
      remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Graeme Gregory <gg@slimlogic.co.uk>
      Cc: Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      02c7a13e
    • Paul Gortmaker's avatar
      gpio: palmas: make explicitly non-modular · f9f2b5cb
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_PALMAS
      drivers/gpio/Kconfig:   bool "TI PALMAS series PMICs GPIO"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was not in use by this code, the init ordering
      remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      f9f2b5cb
    • Paul Gortmaker's avatar
      gpio: sx150x: make explicitly non-modular · 24a876ce
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_SX150X
      drivers/gpio/Kconfig:   bool "Semtech SX150x I2C GPIO expander"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was not in use by this code, the init ordering
      remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      was (or is now) contained at the top of the file in the comments.
      
      Cc: Gregory Bean <gbean@codeaurora.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      24a876ce
    • Paul Gortmaker's avatar
      gpio: tc3589x: make explicitly non-modular · 85133341
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_TC3589X
      drivers/gpio/Kconfig:   bool "TC3589X GPIOs"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was not in use by this code, the init ordering
      remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Rabin Vincent <rabin.vincent@stericsson.com>
      Cc: Hanumath Prasad <hanumath.prasad@stericsson.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      85133341
    • Paul Gortmaker's avatar
      gpio: rc5t583: make explicitly non-modular · fe7b7788
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_RC5T583
      drivers/gpio/Kconfig:   bool "RICOH RC5T583 GPIO"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_init was not in use by this code, the init ordering
      remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Laxman Dewangan <ldewangan@nvidia.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      fe7b7788
    • Linus Walleij's avatar
      gpio: tc3589x: implement open drain/source callback · 8b866b06
      Linus Walleij authored
      This makes use of the new .set_single_ended() callback to
      set the GPIO line as open drain/open source using hardware.
      The TC3589x can do this by either disabling the N-MOS
      transistor (open drain) or the P-MOS transistor (open source)
      of the output driver stage, in the first case making the signal
      drive actively low and high impedance as "high" and in the second
      case actively high and high impedance, which is as close to native
      open drain support as we come.
      
      Cc: Michael Hennerich <michael.hennerich@analog.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      8b866b06
    • Linus Walleij's avatar
      gpio: tc3589x: use BIT() macro · cee1b40d
      Linus Walleij authored
      This switch to use BIT(n) instead of (1 << n) which is less
      to the point. Most GPIO drivers do this to avoid mistakes.
      Also switch from using <linux/gpio.h> to the apropriate
      <linux/gpio/driver.h> include.
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      cee1b40d
    • Linus Walleij's avatar
      gpio: support native single-ended hardware drivers · c663e5f5
      Linus Walleij authored
      Some GPIO controllers has a special hardware bit we can flip
      to support open drain / source. This means that on these hardwares
      we do not need to emulate OD/OS by setting the line to input
      instead of actively driving it high/low. Add an optional vtable
      callback to the driver set_single_ended() so that driver can
      implement this in hardware if they have it.
      
      We may need a pinctrl_gpio_set_config() call at some point to
      propagate this down to a backing pin control device on systems
      with split GPIO/pin control.
      Reported-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      c663e5f5
  8. 31 Mar, 2016 6 commits
    • Axel Lin's avatar
      gpio: tpic2810: Make sure cached buffer has consistent status with h/w status · 6e66a659
      Axel Lin authored
      i2c_smbus_write_byte_data() can fail. To ensure the
      cached buffer has consistent status with h/w status, don't
      update the cached gpio->buffer if write fails.
      
      Also refactor the code a bit by adding a tpic2810_set_mask_bits()
      helper and use it to simplify the code.
      Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
      Reviewed-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      6e66a659
    • Paul Gortmaker's avatar
      gpio: zx: make explicitly non-modular · 18fb0a98
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      config GPIO_ZX
              bool "ZTE ZX GPIO support"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the couple traces of modularity so that when reading the
      driver there is no doubt it is builtin-only.
      
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      was (or is now) contained at the top of the file in the comments.
      
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Jun Nie <jun.nie@linaro.org>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      18fb0a98
    • Paul Gortmaker's avatar
      gpio: xgene: make explicitly non-modular · b33d12d3
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_XGENE
      drivers/gpio/Kconfig:   bool "APM X-Gene GPIO controller support"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the modular code that is essentially orphaned, so that
      when reading the driver there is no doubt it is builtin-only.
      
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Feng Kan <fkan@apm.com>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      b33d12d3
    • Paul Gortmaker's avatar
      gpio: sta2x11: make explicitly non-modular · 3c90c6d6
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_STA2X11
      drivers/gpio/Kconfig:   bool "STA2x11/ConneXt GPIO support"
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the couple traces of modularity, so that when reading
      the driver there is no doubt it is builtin-only.
      
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      is already contained at the top of the file in the comments.
      
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      3c90c6d6
    • Paul Gortmaker's avatar
      gpio: pl061: make explicitly non-modular · ef3e7100
      Paul Gortmaker authored
      The Kconfig for this driver is currently:
      
      config GPIO_PL061
              bool "PrimeCell PL061 GPIO support"
      
      ...meaning that it currently is not being built as a module by anyone.
      Lets remove the couple traces of modularity, so that when reading the
      driver there is no doubt it is builtin-only.
      
      Since module_init translates to device_initcall in the non-modular
      case, the init ordering remains unchanged with this commit.
      
      We also delete the MODULE_LICENSE tag etc. since all that information
      was (or is now) contained at the top of the file in the comments.
      
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Acked-by: default avatarBaruch Siach <baruch@tkos.co.il>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      ef3e7100
    • Paul Gortmaker's avatar
      gpio: mvebu: make explicitly non-modular · ed329f3a
      Paul Gortmaker authored
      The Kconfig currently controlling compilation of this code is:
      
      drivers/gpio/Kconfig:config GPIO_MVEBU
      drivers/gpio/Kconfig:   def_bool y
      
      ...meaning that it currently is not being built as a module by anyone.
      
      Lets remove the couple traces of modularity so that when reading the
      driver there is no doubt it is builtin-only.
      
      Since module_platform_driver() uses the same init level priority as
      builtin_platform_driver() the init ordering remains unchanged with
      this commit.
      
      Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
      
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      ed329f3a