summaryrefslogtreecommitdiff
path: root/drivers/gpio/xilinx_gpio.c
AgeCommit message (Collapse)AuthorFilesLines
2018-08-07gpio: xilinx: Add support for using label propertyMichal Simek1-1/+9
Add support for reading label property from DT and set up bank name based on that. If label property is not present full device node name is used. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Return 0 from xilinx_gpio_set_valueMichal Simek1-1/+1
.set_value functions have no specified return value and gpio_uclass is not working with it too. But this patch is returning 0 to be in sync with others DM gpio drivers. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Not read output values via regsMichal Simek1-4/+32
Reading registers for finding out output value is not working because input value is read instead in case of tristate. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Simplify logic in xilinx_gpio_set_valueMichal Simek1-7/+6
There is no reason to do read/write for if/else separately. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Set value before changing directionMichal Simek1-2/+2
Set a value before changing gpio direction. This will ensure that the old value is not propagated when direction has changed but new value is not written yet. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-08-07gpio: xilinx: Remove !DM driverMichal Simek1-336/+2
There is no user for !DM driver that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-08-07gpio: xilinx: Find out bank before use in xilinx_gpio_get_function()Michal Simek1-4/+4
Call xilinx_gpio_get_bank_pin() before use. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
2018-07-19gpio: xilinx: Convert driver to DMMichal Simek1-1/+264
This patch is enabling GPIO_DM support to have an option to use this driver together with zynq gpio driver. !DM part is kept there till Microblaze is cleanup which will be done hopefully soon. Just a note: There is no reason to initialize uc-priv->name because it is completely unused. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2013-07-24Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk1-17/+1
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
2013-05-09gpio: Add support for microblaze xilinx GPIOMichal Simek1-0/+364
Microblaze uses gpio which is connected to the system reset. Currently gpio subsystem wasn't used for it. Add gpio driver and change Microblaze reset logic to be done via gpio subsystem. There are various configurations which Microblaze can have that's why gpio_alloc/gpio_alloc_dual(for dual channel) function has been introduced and gpio can be allocated dynamically. Adding several gpios IP is also possible and supported. For listing gpio configuration please use "gpio status" command This patch also remove one compilation warning: microblaze-generic.c: In function 'do_reset': microblaze-generic.c:38:47: warning: operation on '*1073741824u' may be undefined [-Wsequence-point] Signed-off-by: Michal Simek <michal.simek@xilinx.com>