LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 0/2] pinctrl: qcom: enable generic pinconf and input-enable
@ 2015-03-04 10:41 Stanimir Varbanov
2015-03-04 10:41 ` [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
2015-03-04 10:41 ` [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property Stanimir Varbanov
0 siblings, 2 replies; 9+ messages in thread
From: Stanimir Varbanov @ 2015-03-04 10:41 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson, Stephen Boyd
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
v1 -> v2
- addressed a review comment from Linus about returned error in 1/2
- added Reviewed-by tag in 1/2
- 2/2 has no changes
First version of the patchset can be found at
https://lkml.org/lkml/2015/1/30/202
----------------------------------------------------------------------------
v1:
Here is splitted version of the previous patch at [1].
The major change is in 3/3 where now we check oe_bit in control register
instead of in_bit in io register.
regards
Stan
[1] https://lkml.org/lkml/2015/1/26/514
Stanimir Varbanov (2):
pinctrl: qcom: enable generic pinconf
pinctrl: qcom: handle input-enable pinconf property
drivers/pinctrl/qcom/pinctrl-msm.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf
2015-03-04 10:41 [PATCH v2 0/2] pinctrl: qcom: enable generic pinconf and input-enable Stanimir Varbanov
@ 2015-03-04 10:41 ` Stanimir Varbanov
2015-03-04 14:36 ` Bjorn Andersson
` (2 more replies)
2015-03-04 10:41 ` [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property Stanimir Varbanov
1 sibling, 3 replies; 9+ messages in thread
From: Stanimir Varbanov @ 2015-03-04 10:41 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson, Stephen Boyd
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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/qcom/pinctrl-msm.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index a535f9c..d36e511 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,9 +261,7 @@ 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;
+ return -ENOTSUPP;
}
*config = pinconf_to_config_packed(param, arg);
@@ -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,
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property
2015-03-04 10:41 [PATCH v2 0/2] pinctrl: qcom: enable generic pinconf and input-enable Stanimir Varbanov
2015-03-04 10:41 ` [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
@ 2015-03-04 10:41 ` Stanimir Varbanov
2015-03-04 14:38 ` Bjorn Andersson
` (2 more replies)
1 sibling, 3 replies; 9+ messages in thread
From: Stanimir Varbanov @ 2015-03-04 10:41 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson, Stephen Boyd
This enables support of 'input-enable' pinconf generic property in
the pinctrl driver.
Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
---
drivers/pinctrl/qcom/pinctrl-msm.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index d36e511..f3d800f 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -193,6 +193,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
*mask = 7;
break;
case PIN_CONFIG_OUTPUT:
+ case PIN_CONFIG_INPUT_ENABLE:
*bit = g->oe_bit;
*mask = 1;
break;
@@ -260,6 +261,12 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
val = readl(pctrl->regs + g->io_reg);
arg = !!(val & BIT(g->in_bit));
break;
+ case PIN_CONFIG_INPUT_ENABLE:
+ /* Pin is output */
+ if (arg)
+ return -EINVAL;
+ arg = 1;
+ break;
default:
return -ENOTSUPP;
}
@@ -330,6 +337,10 @@ static int msm_config_group_set(struct pinctrl_dev *pctldev,
/* enable output */
arg = 1;
break;
+ case PIN_CONFIG_INPUT_ENABLE:
+ /* disable output */
+ arg = 0;
+ break;
default:
dev_err(pctrl->dev, "Unsupported config parameter: %x\n",
param);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf
2015-03-04 10:41 ` [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
@ 2015-03-04 14:36 ` Bjorn Andersson
2015-03-04 18:27 ` Stephen Boyd
2015-03-09 16:08 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Bjorn Andersson @ 2015-03-04 14:36 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: Linus Walleij, linux-arm-msm, linux-kernel, linux-gpio, Stephen Boyd
On Wed 04 Mar 02:41 PST 2015, Stanimir Varbanov 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>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property
2015-03-04 10:41 ` [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property Stanimir Varbanov
@ 2015-03-04 14:38 ` Bjorn Andersson
2015-03-04 18:28 ` Stephen Boyd
2015-03-09 16:09 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Bjorn Andersson @ 2015-03-04 14:38 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: Linus Walleij, linux-arm-msm, linux-kernel, linux-gpio, Stephen Boyd
On Wed 04 Mar 02:41 PST 2015, Stanimir Varbanov wrote:
> This enables support of 'input-enable' pinconf generic property in
> the pinctrl driver.
>
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> ---
> drivers/pinctrl/qcom/pinctrl-msm.c | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
> index d36e511..f3d800f 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
> @@ -193,6 +193,7 @@ static int msm_config_reg(struct msm_pinctrl *pctrl,
> *mask = 7;
> break;
> case PIN_CONFIG_OUTPUT:
> + case PIN_CONFIG_INPUT_ENABLE:
> *bit = g->oe_bit;
> *mask = 1;
> break;
> @@ -260,6 +261,12 @@ static int msm_config_group_get(struct pinctrl_dev *pctldev,
> val = readl(pctrl->regs + g->io_reg);
> arg = !!(val & BIT(g->in_bit));
> break;
> + case PIN_CONFIG_INPUT_ENABLE:
> + /* Pin is output */
> + if (arg)
> + return -EINVAL;
> + arg = 1;
> + break;
I still don't like this part of the api, but the patch is
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
> default:
> return -ENOTSUPP;
> }
Regards,
Bjorn
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf
2015-03-04 10:41 ` [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
2015-03-04 14:36 ` Bjorn Andersson
@ 2015-03-04 18:27 ` Stephen Boyd
2015-03-09 16:08 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2015-03-04 18:27 UTC (permalink / raw)
To: Stanimir Varbanov, Linus Walleij
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson
On 03/04/15 02:41, Stanimir Varbanov 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>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property
2015-03-04 10:41 ` [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property Stanimir Varbanov
2015-03-04 14:38 ` Bjorn Andersson
@ 2015-03-04 18:28 ` Stephen Boyd
2015-03-09 16:09 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Stephen Boyd @ 2015-03-04 18:28 UTC (permalink / raw)
To: Stanimir Varbanov, Linus Walleij
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson
On 03/04/15 02:41, Stanimir Varbanov wrote:
> This enables support of 'input-enable' pinconf generic property in
> the pinctrl driver.
>
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf
2015-03-04 10:41 ` [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
2015-03-04 14:36 ` Bjorn Andersson
2015-03-04 18:27 ` Stephen Boyd
@ 2015-03-09 16:08 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2015-03-09 16:08 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson, Stephen Boyd
On Wed, Mar 4, 2015 at 11:41 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>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Patch applied with ACKs.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property
2015-03-04 10:41 ` [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property Stanimir Varbanov
2015-03-04 14:38 ` Bjorn Andersson
2015-03-04 18:28 ` Stephen Boyd
@ 2015-03-09 16:09 ` Linus Walleij
2 siblings, 0 replies; 9+ messages in thread
From: Linus Walleij @ 2015-03-09 16:09 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: linux-arm-msm, linux-kernel, linux-gpio, Bjorn Andersson, Stephen Boyd
On Wed, Mar 4, 2015 at 11:41 AM, Stanimir Varbanov <svarbanov@mm-sol.com> wrote:
> This enables support of 'input-enable' pinconf generic property in
> the pinctrl driver.
>
> Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Patch applied with the ACKs.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-09 16:09 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 10:41 [PATCH v2 0/2] pinctrl: qcom: enable generic pinconf and input-enable Stanimir Varbanov
2015-03-04 10:41 ` [PATCH v2 1/2] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
2015-03-04 14:36 ` Bjorn Andersson
2015-03-04 18:27 ` Stephen Boyd
2015-03-09 16:08 ` Linus Walleij
2015-03-04 10:41 ` [PATCH v2 2/2] pinctrl: qcom: handle input-enable pinconf property Stanimir Varbanov
2015-03-04 14:38 ` Bjorn Andersson
2015-03-04 18:28 ` Stephen Boyd
2015-03-09 16:09 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).