aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mt7621.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-05drivers: gpio: mt7621: use devm_platform_ioremap_resource()Enrico Weigelt, metux IT consult1-2/+1
Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-02-08gpio: MT7621: use a per instance irq_chip structureRené van Dorst1-10/+10
This fixes the kernel complains: gpio gpiochip1: (1e000600.gpio-bank1): detected irqchip that is shared with multiple gpiochips: please fix the driver. gpio gpiochip2: (1e000600.gpio-bank2): detected irqchip that is shared with multiple gpiochips: please fix the driver. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Cc: stable@vger.kernel.org Signed-off-by: René van Dorst <opensource@vdorst.com> Cc: linux-gpio@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Tested-by: Greg Ungerer <gerg@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: mt7621: pass mediatek_gpio_bank_probe() failure up the stackNicholas Mc Guire1-2/+6
The error cases of mediatek_gpio_bank_probe() would go unnoticed (except for the dev_err() messages). The probe function should return an error if one of the banks failed to initialize properly indicated by not returning non-0. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Sean Wang <sean.wang@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: mt7621: report failure of devm_kasprintf()Nicholas Mc Guire1-0/+2
kasprintf() may return NULL on failure of internal allocation thus the assigned label is not safe if not explicitly checked. On error mediatek_gpio_bank_probe() returns negative values so -ENOMEM in the (unlikely) failure case should be fine here. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Sean Wang <sean.wang@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-07-09gpio: mt7621: Edit to preferred syntaxLinus Walleij1-44/+41
This fixes some syntactic nits that makes the GPIO maintainer happier. It is way easier to show by example and do it myself than to try to explain it with comments. It's just my personal taste of minimalism. Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com> Cc: NeilBrown <neil@brown.name> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-07-09gpio: mt7621: Add a driver for MT7621Sergio Paracuellos1-0/+335
Add driver support for gpio of MT7621 SoC. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> [Switched wording WIDTH to STRIDE] Signed-off-by: Linus Walleij <linus.walleij@linaro.org>