summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-etraxfs.c
AgeCommit message (Collapse)Author
2015-10-02gpio: etraxfs: use container_of() to get state containerLinus Walleij
The state container of the etraxfs GPIO driver is extracted from the gpio_chip exploiting the fact that offsetof() the struct gpio_chip inside the struct bgpio_chip are both 0, so the container_of() is in practice a noop. However if a member is added to struct etraxfs_gpio_chip in front of struct bgpio_chip, things will break. Using proper container_of() avoids this problem. Semantically this is a noop, the compiler will optimize it away, but syntactically it makes me happier. Acked-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-08-31Revert "gpio: extraxfs: fix returnvar.cocci warnings"Linus Walleij
This reverts commit 5e22ec019823b0204720e1ad9a5866c638332b3a.
2015-08-25gpio: extraxfs: fix returnvar.cocci warningsJulia Lawall
Remove unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-08-03gpio: etraxfs: add interrupt supportRabin Vincent
On ETRAX FS, all pins on the first port (and only the first port) have interrupt support. On ARTPEC-3, all pins on all ports have interrupt support. However, there are only eight interrupts. Each of the interrupts is associated with a group of pins and for each interrupt the one pin from the group which will trigger it can be selected. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-07-27gpio: etraxfs: add support for ARTPEC-3Rabin Vincent
Add support for the GIO block in the ARTPEC-3 SoC. The basic functionality is essentialy the same as the version in the ETRAX FS, except for a different set of ports, including a read-only port. Cc: devicetree@vger.kernel.org Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-07-27gpio: etraxfs: fix set register flagRabin Vincent
BGPIO_F_UNREADABLE_REG_SET is incorrect, since the set register _is_ readable. What's really required is BGPIO_F_READ_OUTPUT_REG_SET: reading the set register reads the set output value. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-07-17gpio: etraxfs: Fix devm_ioremap_resource return value checkKrzysztof Kozlowski
Value returned by devm_ioremap_resource() was checked for non-NULL but devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of error this could lead to dereference of ERR_PTR. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2015-06-10gpio: add ETRAXFS GPIO driverRabin Vincent
Add a GPIO driver for the General I/O block on Axis ETRAX FS SoCs. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>