Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

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

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


b29396 at freescale

May 14, 2012, 4:06 AM

Post #1 of 2 (91 views)
Permalink
[PATCH 2/5] pinctrl: make pinmux disable function optional

From: Dong Aisheng <dong.aisheng [at] linaro>

Some SoCs may not have pinmux disable function in HW.

Signed-off-by: Dong Aisheng <dong.aisheng [at] linaro>
---
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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


linus.walleij at linaro

May 15, 2012, 12:45 AM

Post #2 of 2 (89 views)
Permalink
Re: [PATCH 2/5] pinctrl: make pinmux disable function optional [In reply to]

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

> From: Dong Aisheng <dong.aisheng [at] linaro>
>
> Some SoCs may not have pinmux disable function in HW.
>
> Signed-off-by: Dong Aisheng <dong.aisheng [at] linaro>

Good idea.

Applied with Stepgen's ACK.

Thanks,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.