summaryrefslogtreecommitdiff
path: root/common/cmd_gpio.c
Commit message (Collapse)AuthorAgeLines
* dm: Enable gpio command to support driver modelSimon Glass2014-03-04-13/+116
| | | | | | | | | | Now that named GPIO banks are supported, along with a way of obtaining the status of a GPIO (input or output), we can provide an enhanced GPIO command for driver model. Where the driver provides its own operation for obtaining the GPIO state, this is used, otherwise a generic version is sufficient. Signed-off-by: Simon Glass <sjg@chromium.org>
* Convert cmd_usage() calls in common to use a return valueSimon Glass2012-03-06-1/+1
| | | | | | | | | Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
* gpio: check request resultMike Frysinger2011-04-13-1/+4
| | | | | | Make sure the pin request passed before attempting to use it later on. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* gpio: generalize for all generic gpio providersMike Frysinger2011-04-13-0/+86
The Blackfin gpio command isn't terribly Blackfin-specific. So generalize the few pieces into two new optional helpers: name_to_gpio() - turn a string name into a GPIO # gpio_status() - display current pin bindings (think /proc/gpio) Once these pieces are pulled out, we can relocate the cmd_gpio.c into the common directory. Signed-off-by: Mike Frysinger <vapier@gentoo.org>