summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-02-20 12:28:40 -0500
committerTom Rini <trini@konsulko.com>2019-02-20 12:28:40 -0500
commit0c41e59a37fbd5b10d4837ae30c288a084997465 (patch)
treed67fad6104715409d83073752a67cea273727249 /cmd
parent176b32cd4fec52307dd8234ec1c86d2f340e7a36 (diff)
parente2c901c99e2622005f98a9623c4b5339257bfad3 (diff)
Merge git://git.denx.de/u-boot-x86
- Add support for sound. Albeit the big changeset, changes are pretty limited to x86 only and a few new sound drivers used by x86 so I think it would be good to have this in the next release.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/gpio.c b/cmd/gpio.c
index 4ac1f1e418..53366f36e7 100644
--- a/cmd/gpio.c
+++ b/cmd/gpio.c
@@ -34,7 +34,7 @@ enum {
};
static void gpio_get_description(struct udevice *dev, const char *bank_name,
- int offset, int *flagsp)
+ int offset, int *flagsp, bool show_all)
{
char buf[80];
int ret;
@@ -42,7 +42,7 @@ static void gpio_get_description(struct udevice *dev, const char *bank_name,
ret = gpio_get_function(dev, offset, NULL);
if (ret < 0)
goto err;
- if (!(*flagsp & FLAG_SHOW_ALL) && ret == GPIOF_UNUSED)
+ if (!show_all && !(*flagsp & FLAG_SHOW_ALL) && ret == GPIOF_UNUSED)
return;
if ((*flagsp & FLAG_SHOW_BANK) && bank_name) {
if (*flagsp & FLAG_SHOW_NEWLINE) {
@@ -90,7 +90,7 @@ static int do_gpio_status(bool all, const char *gpio_name)
banklen = bank_name ? strlen(bank_name) : 0;
if (!gpio_name || !bank_name ||
- !strncmp(gpio_name, bank_name, banklen)) {
+ !strncasecmp(gpio_name, bank_name, banklen)) {
const char *p = NULL;
int offset;
@@ -98,11 +98,11 @@ static int do_gpio_status(bool all, const char *gpio_name)
if (gpio_name && *p) {
offset = simple_strtoul(p, NULL, 10);
gpio_get_description(dev, bank_name, offset,
- &flags);
+ &flags, true);
} else {
for (offset = 0; offset < num_bits; offset++) {
gpio_get_description(dev, bank_name,
- offset, &flags);
+ offset, &flags, false);
}
}
}