From: Dong Aisheng <b29396@freescale.com>
To: <linux-kernel@vger.kernel.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linus.walleij@stericsson.com>, <swarren@wwwdotorg.org>,
<haojian.zhuang@marvell.com>, <shawn.guo@freescale.com>
Subject: [PATCH 2/5] pinctrl: make pinmux disable function optional
Date: Mon, 14 May 2012 19:06:37 +0800 [thread overview]
Message-ID: <1336993600-30065-2-git-send-email-b29396@freescale.com> (raw)
In-Reply-To: <1336993600-30065-1-git-send-email-b29396@freescale.com>
From: Dong Aisheng <dong.aisheng@linaro.org>
Some SoCs may not have pinmux disable function in HW.
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
---
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
next prev parent reply other threads:[~2012-05-14 11:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-14 11:06 [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf Dong Aisheng
2012-05-14 11:06 ` Dong Aisheng [this message]
2012-05-15 7:45 ` [PATCH 2/5] pinctrl: make pinmux disable function optional Linus Walleij
2012-05-14 11:06 ` [PATCH 3/5] pinctrl: pinctrl-imx: remove empty pinmux disable function Dong Aisheng
2012-05-15 7:47 ` Linus Walleij
2012-05-14 11:06 ` [PATCH 4/5] pinctrl: pinctrl-mxs: " Dong Aisheng
2012-05-15 7:48 ` Linus Walleij
2012-05-14 11:06 ` [PATCH 5/5] pinctrl: pinctrl-pxa3xx: " Dong Aisheng
2012-05-15 8:00 ` Linus Walleij
2012-05-14 23:31 ` [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf Stephen Warren
2012-05-15 7:44 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336993600-30065-2-git-send-email-b29396@freescale.com \
--to=b29396@freescale.com \
--cc=haojian.zhuang@marvell.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@freescale.com \
--cc=swarren@wwwdotorg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®