1. 26 Jan, 2017 1 commit
    • Mika Westerberg's avatar
      pinctrl / gpio: Introduce .set_config() callback for GPIO chips · 2956b5d9
      Mika Westerberg authored
      Currently we already have two pin configuration related callbacks
      available for GPIO chips .set_single_ended() and .set_debounce(). In
      future we expect to have even more, which does not scale well if we need
      to add yet another callback to the GPIO chip structure for each possible
      configuration parameter.
      
      Better solution is to reuse what we already have available in the
      generic pinconf.
      
      To support this, we introduce a new .set_config() callback for GPIO
      chips. The callback takes a single packed pin configuration value as
      parameter. This can then be extended easily beyond what is currently
      supported by just adding new types to the generic pinconf enum.
      
      If the GPIO driver is backed up by a pinctrl driver the GPIO driver can
      just assign gpiochip_generic_config() (introduced in this patch) to
      .set_config and that will take care configuration requests are directed
      to the pinctrl driver.
      
      We then convert the existing drivers over .set_config() and finally
      remove the .set_single_ended() and .set_debounce() callbacks.
      Suggested-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: Mika Westerberg's avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
      2956b5d9
  2. 26 Oct, 2016 1 commit
  3. 18 Sep, 2016 1 commit
  4. 13 Sep, 2016 1 commit
  5. 04 Jul, 2016 1 commit
  6. 14 Apr, 2016 1 commit
  7. 19 Feb, 2016 1 commit
  8. 16 Feb, 2016 2 commits
  9. 11 Feb, 2016 1 commit
    • Nicolas Saenz Julienne's avatar
      gpio: add tps65218 gpio · c366c76a
      Nicolas Saenz Julienne authored
      Driver for the GPIO block found in ti's tps65218 pmics.
      
      The device has two GPIOs and one GPO pin which can be configured as follows:
      GPIO1:
      	-general-purpose, open-drain output controlled by GPO1 user bit and/or
      	 sequencer
      	-DDR3 reset input signal from SOC. Signal is either latched or
      	 passed-trough to GPO2 pin. See below for details.
      GPO2:
      	-general-purpose output controlled by GPO2 user bit
      	-DDR3 reset output signal. Signal is controlled by GPIO1 and PGOOD.
      	 See below for details.
      	-Output buffer can be configured as open-drain or push-pull.
      GPIO3:
      	-general-purpose, open-drain output controlled by GPO3 user bit and/or
      	 sequencer
      	-reset input-signal for DCDC1 and DCDC2.
      
      The input configurations are not meant to be used by the user so the driver
      only offers GPOs.
      
      v2: Added request routine that evaluates the fw config flags and removed module
          owner
      v3: Added .direction_input() routine, and took care of all Linus Walleij
      suggestions (clamp to bool, use proper include)
      Signed-off-by: Nicolas Saenz Julienne's avatarNicolas Saenz Julienne <nicolassaenzj@gmail.com>
      Signed-off-by: Linus Walleij's avatarLinus Walleij <linus.walleij@linaro.org>
      c366c76a