1. 10 Dec, 2018 1 commit
    • Vladimir Zapolskiy's avatar
      gpio: lpc18xx: fix GPIO controller driver build as a module · 67566ae4
      Vladimir Zapolskiy authored
      The problem is reported for allmodconfig build setup:
      
        ERROR: "irq_chip_retrigger_hierarchy" [drivers/gpio/gpio-lpc18xx.ko] undefined!
        make[2]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
        make[1]: *** [Makefile:1271: modules] Error 2
      
      My testing in runtime shows that it is sufficient to remove .irq_retrigger
      callback, which is assigned to unexported irq_chip_retrigger_hierarchy()
      function, I did't observe any regressions, and thus apparently it is a
      better fix rather than exporting the function defined in kernel/irq/chip.c
      (see commit 52b2a05f ("genirq: Export IRQ functions for module use"))
      or sticking the GPIO controller driver build to built-in option only.
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Fixes: 5ddabfe8 ("gpio: lpc18xx: add GPIO pin interrupt controller support")
      Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      67566ae4
  2. 07 Dec, 2018 12 commits
  3. 05 Dec, 2018 1 commit
  4. 29 Nov, 2018 1 commit
    • Linus Walleij's avatar
      gpio: OF: Parse MMC-specific CD and WP properties · 81c85ec1
      Linus Walleij authored
      When retrieveing CD (card detect) and WP (write protect)
      GPIO handles from the device tree, make sure to assign
      them active low by default unless the "cd-inverted" or
      "wp-inverted" properties are set. These properties mean
      that respective signal is active HIGH since the SDHCI
      specification stipulates that this kind of signals
      should be treated as active LOW.
      
      If the twocell GPIO flag is also specified as active
      low, well that's nice and we will silently ignore the
      tautological specification.
      
      If however the GPIO line is specified as active low
      in the GPIO flasg cell and "cd-inverted" or "wp-inverted"
      is also specified, the latter takes precedence and we
      print a warning.
      
      The current effect on the MMC slot-gpio core are as
      follows:
      
      For CD GPIOs: no effect. The current code in
      mmc/core/host.c calls mmc_gpiod_request_cd() with
      the "override_active_level" argument set to true,
      which means that whatever the GPIO descriptor
      thinks about active low/high will be ignored, the
      core will use the MMC_CAP2_CD_ACTIVE_HIGH to keep
      track of this and reads the raw value from the
      GPIO descriptor, totally bypassing gpiolibs inversion
      semantics. I plan to clean this up at a later point
      passing the handling of inversion semantics over
      to gpiolib, so this patch prepares the ground for
      that.
      
      Fow WP GPIOs: this is probably fixing a bug, because
      the code in mmc/core/host.c calls mmc_gpiod_request_ro()
      with the "override_active_level" argument set to false,
      which means it will respect the inversion semantics of
      the gpiolib and ignore the MMC_CAP2_RO_ACTIVE_HIGH
      flag for everyone using this through device tree.
      However the code in host.c confusingly goes to great
      lengths setting up the MMC_CAP2_RO_ACTIVE_HIGH flag
      from the GPIO descriptor and by reading the "wp-inverted"
      property of the node. As far as I can tell this is all
      in vain and the inversion is broken: device trees that
      use "wp-inverted" do not work as intended, instead the
      only way to actually get inversion on a line is by
      setting the second cell flag to GPIO_ACTIVE_HIGH (which
      will be the default) or GPIO_ACTIVE_LOW if they want
      the proper MMC semantics. Presumably all device trees do
      this right but we need to parse and handle this properly.
      
      Cc: linux-mmc@vger.kernel.org
      Cc: linux-gpio@vger.kernel.org
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      81c85ec1
  5. 26 Nov, 2018 1 commit
  6. 25 Nov, 2018 1 commit
  7. 19 Nov, 2018 1 commit
  8. 16 Nov, 2018 3 commits
  9. 15 Nov, 2018 2 commits
  10. 05 Nov, 2018 17 commits