[2/3] pinctrl: qcom: enable generic pinconf
diff mbox

Message ID 1422613644-13060-3-git-send-email-svarbanov@mm-sol.com
State New
Headers show

Commit Message

Stanimir Varbanov Jan. 30, 2015, 10:27 a.m. UTC
This makes the pinctrl driver to use the generic pinconf
interface. Mainly it gives us a way to use debugfs to dump
group configurations.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
---
 drivers/pinctrl/qcom/pinctrl-msm.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Comments

Linus Walleij Jan. 30, 2015, 1:39 p.m. UTC | #1
On Fri, Jan 30, 2015 at 11:27 AM, Stanimir Varbanov
<svarbanov@mm-sol.com> wrote:

> This makes the pinctrl driver to use the generic pinconf
> interface. Mainly it gives us a way to use debugfs to dump
> group configurations.
>
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>

Nice! Looking for Björn's review though.

> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> @@ -197,7 +197,6 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
>                 *mask = 1;
>                 break;
>         default:
> -               dev_err(pctrl->dev, "Invalid config param %04x\n", param);
>                 return -ENOTSUPP;
>         }
>
> @@ -262,8 +261,6 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
>                 arg = !!(val & BIT(g->in_bit));
>                 break;
>         default:
> -               dev_err(pctrl->dev, "Unsupported config parameter: %x\n",
> -                       param);
>                 return -EINVAL;

Please change this one to -ENOTSUPP as well in this patch.

Apart from that it looks good to me.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 49d3f4f..b66cd58 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -197,7 +197,6 @@  static int msm_config_reg(struct msm_pinctrl *pctrl,
 		*mask = 1;
 		break;
 	default:
-		dev_err(pctrl->dev, "Invalid config param %04x\n", param);
 		return -ENOTSUPP;
 	}
 
@@ -262,8 +261,6 @@  static int msm_config_group_get(struct pinctrl_dev *pctldev,
 		arg = !!(val & BIT(g->in_bit));
 		break;
 	default:
-		dev_err(pctrl->dev, "Unsupported config parameter: %x\n",
-			param);
 		return -EINVAL;
 	}
 
@@ -357,6 +354,7 @@  static int msm_config_group_set(struct pinctrl_dev *pctldev,
 }
 
 static const struct pinconf_ops msm_pinconf_ops = {
+	.is_generic		= true,
 	.pin_config_group_get	= msm_config_group_get,
 	.pin_config_group_set	= msm_config_group_set,
 };