2012-05-14 11:01:31

by Dong Aisheng

[permalink] [raw]
Subject: [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf

From: Dong Aisheng <[email protected]>

Also checking invalid num_configs when validate the pinconf map.

Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/pinctrl/pinconf.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 7ce139e..43f474c 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -50,9 +50,9 @@ int pinconf_validate_map(struct pinctrl_map const *map, int i)
return -EINVAL;
}

- if (map->data.configs.num_configs &&
+ if (!map->data.configs.num_configs ||
!map->data.configs.configs) {
- pr_err("failed to register map %s (%d): no configs ptr given\n",
+ pr_err("failed to register map %s (%d): no configs given\n",
map->name, i);
return -EINVAL;
}
--
1.7.0.4


2012-05-14 11:01:40

by Dong Aisheng

[permalink] [raw]
Subject: [PATCH 5/5] pinctrl: pinctrl-pxa3xx: remove empty pinmux disable function

From: Dong Aisheng <[email protected]>

Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/pinctrl/pinctrl-pxa3xx.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-pxa3xx.c b/drivers/pinctrl/pinctrl-pxa3xx.c
index 7644e42..f14cd6b 100644
--- a/drivers/pinctrl/pinctrl-pxa3xx.c
+++ b/drivers/pinctrl/pinctrl-pxa3xx.c
@@ -138,11 +138,6 @@ static int pxa3xx_pmx_enable(struct pinctrl_dev *pctrldev, unsigned func,
return 0;
}

-static void pxa3xx_pmx_disable(struct pinctrl_dev *pctrldev, unsigned func,
- unsigned group)
-{
-}
-
static int pxa3xx_pmx_request_gpio(struct pinctrl_dev *pctrldev,
struct pinctrl_gpio_range *range,
unsigned pin)
@@ -170,7 +165,6 @@ static struct pinmux_ops pxa3xx_pmx_ops = {
.get_function_name = pxa3xx_pmx_get_func_name,
.get_function_groups = pxa3xx_pmx_get_groups,
.enable = pxa3xx_pmx_enable,
- .disable = pxa3xx_pmx_disable,
.gpio_request_enable = pxa3xx_pmx_request_gpio,
};

--
1.7.0.4

2012-05-14 11:01:38

by Dong Aisheng

[permalink] [raw]
Subject: [PATCH 4/5] pinctrl: pinctrl-mxs: remove empty pinmux disable function

From: Dong Aisheng <[email protected]>

Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/pinctrl/pinctrl-mxs.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-mxs.c b/drivers/pinctrl/pinctrl-mxs.c
index 93cd959..e10eff7 100644
--- a/drivers/pinctrl/pinctrl-mxs.c
+++ b/drivers/pinctrl/pinctrl-mxs.c
@@ -203,18 +203,11 @@ static int mxs_pinctrl_enable(struct pinctrl_dev *pctldev, unsigned selector,
return 0;
}

-static void mxs_pinctrl_disable(struct pinctrl_dev *pctldev,
- unsigned function, unsigned group)
-{
- /* Nothing to do here */
-}
-
static struct pinmux_ops mxs_pinmux_ops = {
.get_functions_count = mxs_pinctrl_get_funcs_count,
.get_function_name = mxs_pinctrl_get_func_name,
.get_function_groups = mxs_pinctrl_get_func_groups,
.enable = mxs_pinctrl_enable,
- .disable = mxs_pinctrl_disable,
};

static int mxs_pinconf_get(struct pinctrl_dev *pctldev,
--
1.7.0.4

2012-05-14 11:01:29

by Dong Aisheng

[permalink] [raw]
Subject: [PATCH 2/5] pinctrl: make pinmux disable function optional

From: Dong Aisheng <[email protected]>

Some SoCs may not have pinmux disable function in HW.

Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/pinctrl/pinmux.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 220fa49..3d5ac73 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -41,8 +41,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev)
!ops->get_functions_count ||
!ops->get_function_name ||
!ops->get_function_groups ||
- !ops->enable ||
- !ops->disable) {
+ !ops->enable) {
dev_err(pctldev->dev, "pinmux ops lacks necessary functions\n");
return -EINVAL;
}
@@ -497,7 +496,8 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting)
desc->mux_setting = NULL;
}

- ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group);
+ if (ops->disable)
+ ops->disable(pctldev, setting->data.mux.func, setting->data.mux.group);
}

#ifdef CONFIG_DEBUG_FS
--
1.7.0.4

2012-05-14 11:02:14

by Dong Aisheng

[permalink] [raw]
Subject: [PATCH 3/5] pinctrl: pinctrl-imx: remove empty pinmux disable function

From: Dong Aisheng <[email protected]>

Signed-off-by: Dong Aisheng <[email protected]>
---
drivers/pinctrl/pinctrl-imx.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index 8faf613..f6e7c67 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -269,12 +269,6 @@ static int imx_pmx_enable(struct pinctrl_dev *pctldev, unsigned selector,
return 0;
}

-static void imx_pmx_disable(struct pinctrl_dev *pctldev, unsigned func_selector,
- unsigned group_selector)
-{
- /* nothing to do here */
-}
-
static int imx_pmx_get_funcs_count(struct pinctrl_dev *pctldev)
{
struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev);
@@ -310,7 +304,6 @@ static struct pinmux_ops imx_pmx_ops = {
.get_function_name = imx_pmx_get_func_name,
.get_function_groups = imx_pmx_get_groups,
.enable = imx_pmx_enable,
- .disable = imx_pmx_disable,
};

static int imx_pinconf_get(struct pinctrl_dev *pctldev,
--
1.7.0.4

2012-05-14 23:31:44

by Stephen Warren

[permalink] [raw]
Subject: Re: [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf

On 05/14/2012 05:06 AM, Dong Aisheng wrote:
> From: Dong Aisheng <[email protected]>
>
> Also checking invalid num_configs when validate the pinconf map.
>
> Signed-off-by: Dong Aisheng <[email protected]>

The series,
Acked-by: Stephen Warren <[email protected]>

2012-05-15 07:44:07

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf

On Mon, May 14, 2012 at 1:06 PM, Dong Aisheng <[email protected]> wrote:

> From: Dong Aisheng <[email protected]>
>
> Also checking invalid num_configs when validate the pinconf map.
>
> Signed-off-by: Dong Aisheng <[email protected]>

Applied with Stephens ACK.

Thanks!
Linus Walleij

2012-05-15 07:45:22

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 2/5] pinctrl: make pinmux disable function optional

On Mon, May 14, 2012 at 1:06 PM, Dong Aisheng <[email protected]> wrote:

> From: Dong Aisheng <[email protected]>
>
> Some SoCs may not have pinmux disable function in HW.
>
> Signed-off-by: Dong Aisheng <[email protected]>

Good idea.

Applied with Stepgen's ACK.

Thanks,
Linus Walleij

2012-05-15 07:47:21

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 3/5] pinctrl: pinctrl-imx: remove empty pinmux disable function

On Mon, May 14, 2012 at 1:06 PM, Dong Aisheng <[email protected]> wrote:

> From: Dong Aisheng <[email protected]>
>
> Signed-off-by: Dong Aisheng <[email protected]>
> ---
> ?drivers/pinctrl/pinctrl-imx.c | ? ?7 -------
> ?1 files changed, 0 insertions(+), 7 deletions(-)

Applied with Stephen's ACK.

Thanks,
Linus Walleij

2012-05-15 07:48:47

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 4/5] pinctrl: pinctrl-mxs: remove empty pinmux disable function

On Mon, May 14, 2012 at 1:06 PM, Dong Aisheng <[email protected]> wrote:

> From: Dong Aisheng <[email protected]>
>
> Signed-off-by: Dong Aisheng <[email protected]>
> ---
> ?drivers/pinctrl/pinctrl-mxs.c | ? ?7 -------
> ?1 files changed, 0 insertions(+), 7 deletions(-)

Applied with Stephens ACK.

Thanks,
Linus Walleij

2012-05-15 08:00:50

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 5/5] pinctrl: pinctrl-pxa3xx: remove empty pinmux disable function

On Mon, May 14, 2012 at 1:06 PM, Dong Aisheng <[email protected]> wrote:

> From: Dong Aisheng <[email protected]>
>
> Signed-off-by: Dong Aisheng <[email protected]>

Applied with Stephen's ACK.

Thanks,
Linus Walleij