summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorPaul Walmsley <pwalmsley@nvidia.com>2014-02-10 19:22:15 -0800
committerLaxman Dewangan <ldewangan@nvidia.com>2014-02-11 00:54:35 -0800
commit85a3ad15a83b5dc4ffdcdebefd0a210bd8e5c08a (patch)
tree9bf56e2b591345a4a4e055f1350104049ad4b9ab /drivers/pinctrl
parent8d25ff3d887a0e81ab8076289398afc8742a9c2a (diff)
pinctrl: tegra: ignore string case in debugfs write
Ignore the case of the string in debugfs pin remux writes, for the convenience of those debugging the system. So either echo "HDMI_CEC CEC OUTPUT NORMAL TRISTATE" > /d/tegra_pinmux or echo "hdmi_cec cec output normal tristate" > /d/tegra_pinmux should work. Bug 1434110 Change-Id: I04132445e81b63a39a6ae0a1595d0bbac7c099c9 Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Cc: Laxwan Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/364882 GVS: Gerrit_Virtual_Submit Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-tegra.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c
index 12a416703a2d..ea11ab9e9a50 100644
--- a/drivers/pinctrl/pinctrl-tegra.c
+++ b/drivers/pinctrl/pinctrl-tegra.c
@@ -2005,7 +2005,7 @@ static ssize_t dbg_pinmux_write(struct file *file,
/* ping group index by name */
token = strsep(&pbuf, FIELD_DELIMITER);
for (i = 0; i < pmx->soc->ngroups; i++)
- if (!strcmp(token, pmx->soc->groups[i].name))
+ if (!strcasecmp(token, pmx->soc->groups[i].name))
break;
if (i == pmx->soc->ngroups) { /* no pingroup matched with name */
pr_err("no pingroup matched with name\n");
@@ -2016,7 +2016,7 @@ static ssize_t dbg_pinmux_write(struct file *file,
/* func index by name */
token = strsep(&pbuf, FIELD_DELIMITER);
for (i = 0; i < TEGRA_MAX_MUX; i++)
- if (!strcmp(token, tegra_pinctrl_function_name(i)))
+ if (!strcasecmp(token, tegra_pinctrl_function_name(i)))
break;
if (i == TEGRA_MAX_MUX) { /* no func matched with name */
pr_err("no func matched with name\n");
@@ -2026,8 +2026,8 @@ static ssize_t dbg_pinmux_write(struct file *file,
/* i/o by name */
token = strsep(&pbuf, FIELD_DELIMITER);
- i = !strcmp(token, "OUTPUT") ? 0 :
- !strcmp(token, "INPUT") ? 1 : -1;
+ i = !strcasecmp(token, "OUTPUT") ? 0 :
+ !strcasecmp(token, "INPUT") ? 1 : -1;
if (i == -1) { /* no IO matched with name */
pr_err("no IO matched with name\n");
return -EINVAL;
@@ -2036,9 +2036,9 @@ static ssize_t dbg_pinmux_write(struct file *file,
/* pull up/down by name */
token = strsep(&pbuf, FIELD_DELIMITER);
- i = !strcmp(token, "NORMAL") ? 0 :
- !strcmp(token, "PULL_DOWN") ? 1 :
- !strcmp(token, "PULL_UP") ? 2 : -1;
+ i = !strcasecmp(token, "NORMAL") ? 0 :
+ !strcasecmp(token, "PULL_DOWN") ? 1 :
+ !strcasecmp(token, "PULL_UP") ? 2 : -1;
if (i == -1) { /* no PUPD matched with name */
pr_err("no PUPD matched with name\n");
return -EINVAL;
@@ -2047,8 +2047,8 @@ static ssize_t dbg_pinmux_write(struct file *file,
/* tristate by name */
token = strsep(&pbuf, LINE_DELIMITER);
- i = !strcmp(token, "NORMAL") ? 0 :
- !strcmp(token, "TRISTATE") ? 1 : -1;
+ i = !strcasecmp(token, "NORMAL") ? 0 :
+ !strcasecmp(token, "TRISTATE") ? 1 : -1;
if (i == -1) { /* no tristate matched with name */
pr_err("no tristate matched with name\n");
return -EINVAL;