summaryrefslogtreecommitdiff
path: root/include/asm-generic/gpio.h
Commit message (Collapse)AuthorAgeLines
* dm: Add GPIO support and testsSimon Glass2014-03-04-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | Add driver model support for GPIOs. Since existing GPIO drivers do not use driver model, this feature must be enabled by CONFIG_DM_GPIO. After all GPO drivers are converted over we can perhaps remove this config. Tests are provided for the sandbox implementation, and are a sufficient sanity check for basic operation. The GPIO uclass understands the concept of named banks of GPIOs, with each GPIO device providing a single bank. Within each bank the GPIOs are numbered using an offset from 0 to n-1. For example a bank named 'b' with 20 offsets will provide GPIOs named b0 to b19. Anonymous GPIO banks are also supported, and are just numbered without any prefix. Each time a GPIO driver is added to the uclass, the GPIOs are renumbered accordinging, so there is always a global GPIO numbering order. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com> Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* gpio: remove duplicate function signatureNikita Kiryanov2012-12-11-13/+4
| | | | | | | gpio_request() appears twice in asm-generic/gpio.h Remove one of the definitions. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
* Add gpio_request() to asm-generic headerSimon Glass2012-09-21-0/+9
| | | | | | This function should also be part of the GPIO API, so add it. Signed-off-by: Simon Glass <sjg@chromium.org>
* gpio: Modify common gpio.h to more closely match LinuxJoe Hershberger2012-01-09-9/+32
| | | | | | | | | Change "int gp" to "unsigned gpio" Add request and free entry-points Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* Add generic gpio.h in asm-genericSimon Glass2011-10-17-0/+74
Since we want want to have a standard GPIO interface, this adds a definition for this into include/asm-generic/gpio.h. Signed-off-by: Simon Glass <sjg@chromium.org>