1. 27 3月, 2019 8 次提交
  2. 22 3月, 2019 3 次提交
  3. 18 3月, 2019 7 次提交
    • A
      gpio: vf610: Don't use explicit &pdev->dev in vf610_gpio_probe() · 2e35bb6c
      Andrey Smirnov 提交于
      The code already defines "dev" variable to help with that, so make
      sure all of the code uses it.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      2e35bb6c
    • A
      gpio: vf610: Use devres to remove gpiochip · a74b4b11
      Andrey Smirnov 提交于
      Now that the driver's custom remove hook contains only a single
      action, replace it by converting the code to use
      devm_gpiochip_add_data() to simplify things.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      a74b4b11
    • A
      gpio: vf610: Use devres to disable clk_gpio · fc57949c
      Andrey Smirnov 提交于
      Clk_gpio should be disabled in all error paths in the code that
      follws, including the case when either gpiochip_add_data() or
      gpiochip_irqchip_add() fail. To simplify things fix this by using
      devm_add_action() to disable corresponding clock in case of any erros
      as well as driver/device removal.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      fc57949c
    • A
      gpio: vf610: Use devres to disable clk_port · db9ed63c
      Andrey Smirnov 提交于
      Clk_port should be disabled in all error paths in the code that
      follws, including the case when either gpiochip_add_data() or
      gpiochip_irqchip_add() fail. To simplify things fix this by using
      devm_add_action_or_reset() to disable corresponding clock in case of
      any erros as well as driver/device removal.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      db9ed63c
    • A
      gpio: vf610: Simplify vf610_gpio_get() · 4a8909d0
      Andrey Smirnov 提交于
      Both branches of the if statement do exactly the same thing, just at
      different offsets. Simplify the code a bit by moving shared action
      code outside of the if statement. No functional change intended.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      4a8909d0
    • A
      gpio: vf610: Simplify vf610_gpio_set() · a262555b
      Andrey Smirnov 提交于
      The only difference between two codepaths is register offset
      used. Simplify the code a bit by replacing explicit calls with a
      single call with a variable offset. No functional change intended.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      a262555b
    • A
      gpio: vf610: Do not share irq_chip · 338aa107
      Andrey Smirnov 提交于
      Fix the warning produced by gpiochip_set_irq_hooks() by allocating a
      dedicated IRQ chip per GPIO chip/port.
      Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Chris Healy <cphealy@gmail.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Fabio Estevam <festevam@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-imx@nxp.com
      Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      338aa107
  4. 08 3月, 2019 3 次提交
    • R
      gpio: gpio-omap: fix level interrupt idling · d01849f7
      Russell King 提交于
      Tony notes that the GPIO module does not idle when level interrupts are
      in use, as the wakeup appears to get stuck.
      
      After extensive investigation, it appears that the wakeup will only be
      cleared if the interrupt status register is cleared while the interrupt
      is enabled. However, we are currently clearing it with the interrupt
      disabled for level-based interrupts.
      
      It is acknowledged that this observed behaviour conflicts with a
      statement in the TRM:
      
      CAUTION
        After servicing the interrupt, the status bit in the interrupt status
        register (GPIOi.GPIO_IRQSTATUS_0 or GPIOi.GPIO_IRQSTATUS_1) must be
        reset and the interrupt line released (by setting the corresponding
        bit of the interrupt status register to 1) before enabling an
        interrupt for the GPIO channel in the interrupt-enable register
        (GPIOi.GPIO_IRQSTATUS_SET_0 or GPIOi.GPIO_IRQSTATUS_SET_1) to prevent
        the occurrence of unexpected interrupts when enabling an interrupt
        for the GPIO channel.
      
      However, this does not appear to be a practical problem.
      
      Further, as reported by Grygorii Strashko <grygorii.strashko@ti.com>,
      the TI Android kernel tree has an earlier similar patch as "GPIO: OMAP:
      Fix the sequence to clear the IRQ status" saying:
      
       if the status is cleared after disabling the IRQ then sWAKEUP will not
       be cleared and gates the module transition
      
      When we unmask the level interrupt after the interrupt has been handled,
      enable the interrupt and only then clear the interrupt. If the interrupt
      is still pending, the hardware will re-assert the interrupt status.
      
      Should the caution note in the TRM prove to be a problem, we could
      use a clear-enable-clear sequence instead.
      
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      [tony@atomide.com: updated comments based on an earlier TI patch]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      d01849f7
    • A
      gpio: amd-fch: Set proper output level for direction_output · f777cda3
      Axel Lin 提交于
      Current amd_fch_gpio_direction_output implementation ignores the value
      argument, fix it so direction_output will set proper output level.
      Signed-off-by: NAxel Lin <axel.lin@ingics.com>
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Reviewed-by: NEnrico Weigelt <info@metux.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f777cda3
    • A
      gpio: pca953x: Use PCA_LATCH_INT · 2870b3c5
      Andy Shevchenko 提交于
      The commit 0cdf21b3
      
        ("gpio: pca953x: set the PCA_PCAL flag also when matching by DT")
      
      introduces a helper macro which tells that chip supports latched interrupts,
      but the macro was never used for ACPI or legacy enumeration.
      
      So, make use of it for legacy and ACPI enumeration.
      
      Cc: H. Nikolaus Schaller <hns@goldelico.com>
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      2870b3c5
  5. 01 3月, 2019 2 次提交
    • M
      gpio: pca953x: Fix dereference of irq data in shutdown · c378b3aa
      Mark Walton 提交于
      If a PCA953x gpio was used as an interrupt and then released,
      the shutdown function was trying to extract the pca953x_chip
      pointer directly from the irq_data, but in reality was getting
      the gpio_chip structure.
      
      The net effect was that the subsequent writes to the data
      structure corrupted data in the gpio_chip structure, which wasn't
      immediately obvious until attempting to use the GPIO again in the
      future, at which point the kernel panics.
      
      This fix correctly extracts the pca953x_chip structure via the
      gpio_chip structure, as is correctly done in the other irq
      functions.
      
      Fixes: 0a70fe00 ("gpio: pca953x: Clear irq trigger type on irq shutdown")
      Cc: stable@vger.kernel.org
      Signed-off-by: NMark Walton <mark.walton@serialtek.com>
      Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c378b3aa
    • L
      gpio: amd-fch: Fix type error found by sparse · e226e3c3
      Linus Walleij 提交于
      Sparse complains:
      
      gpio-amd-fch.c:45:27: sparse: expected void *
      gpio-amd-fch.c:45:27: sparse: got void [noderef] <asn:2> *
      gpio-amd-fch.c:45:27: sparse: warning: incorrect type in return
      		              expression (different address spaces)
      gpio-amd-fch.c:56:9: sparse:  expected void const volatile [noderef]
      		              <asn:2> *addr
      gpio-amd-fch.c:56:9: sparse:  expected void volatile [noderef] <asn:2> *addr
      gpio-amd-fch.c:56:9: sparse:  got void *ptr
      gpio-amd-fch.c:56:9: sparse:  warning: incorrect type in argument 1 (different address spaces)
      
      I think it is because void * is returned rather than void __iomem *,
      so fix it up.
      
      Cc: Enrico Weigelt <info@metux.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      e226e3c3
  6. 25 2月, 2019 4 次提交
  7. 23 2月, 2019 1 次提交
  8. 21 2月, 2019 5 次提交
  9. 20 2月, 2019 7 次提交