summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-siox.c
Commit message (Collapse)AuthorAgeFilesLines
* gpio: siox: Use devm_ managed gpiochipLinus Walleij2019-07-031-10/+1Star
| | | | | | | | | By using devm_gpiochip_add_data() we can get rid of the remove() callback. As this driver doesn't use the gpiochip data pointer we simply pass in NULL. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: siox: Add struct device *dev helper variableLinus Walleij2019-07-031-5/+5
| | | | | | | This makes the code easier to read. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: siox: Pass irqchip when adding gpiochipLinus Walleij2019-07-031-9/+7Star
| | | | | | | | | | | | We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For chained irqchips this is a pretty straight-forward conversion. Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: siox: Switch to IRQ_TYPE_NONELinus Walleij2019-06-271-1/+1
| | | | | | | | | | | | The siox driver is hardcoding a default type of IRQ_TYPE_EDGE_RISING to the irq helper, but this should only be applicable to old boardfiles and odd device tree irqchips with just onecell irq (no flags). I doubt this is the case with the siox, I think all consumers specify the flags they use in the device tree. Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: siox: Do not call gpiochip_remove() on errorpathLinus Walleij2019-06-271-5/+2Star
| | | | | | | | | | gpiochip_remove() was called on the errorpath if gpiochip_add() failed: this is wrong, if the chip failed to add it is not there so it should not be removed. Fixes: be8c8facc707 ("gpio: new driver to work with a 8x12 siox") Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: siox: Use module_siox_driver()Enrico Weigelt2019-06-271-12/+1Star
| | | | | | | | Reduce driver init boilerplate by using the new module_siox_driver() macro. Signed-off-by: Enrico Weigelt <info@metux.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
* gpio: new driver to work with a 8x12 sioxUwe Kleine-König2018-09-281-0/+293
This driver controls a SIOX device that provides 20 I/O lines. The first twelve are fixed inputs, the remaining eight are outputs. Acked-by: Gavin Schenk <g.schenk@eckelmann.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>