All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanimir Varbanov <svarbanov@mm-sol.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Stanimir Varbanov <svarbanov@mm-sol.com>
Subject: [PATCH 3/3] pinctrl: qcom: handle input-enable pinconf property
Date: Fri, 30 Jan 2015 12:27:24 +0200	[thread overview]
Message-ID: <1422613644-13060-4-git-send-email-svarbanov@mm-sol.com> (raw)
In-Reply-To: <1422613644-13060-1-git-send-email-svarbanov@mm-sol.com>

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 b66cd58..55a64ea 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 -EINVAL;
 	}
@@ -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

  parent reply	other threads:[~2015-01-30 10:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 10:27 [PATCH 0/3] pinctrl: qcom: enable generic pinconf and input-enable Stanimir Varbanov
2015-01-30 10:27 ` [PATCH 1/3] pinctrl: qcom: delete pin_config_get/set pinconf operations Stanimir Varbanov
2015-01-30 13:37   ` Linus Walleij
2015-01-30 10:27 ` [PATCH 2/3] pinctrl: qcom: enable generic pinconf Stanimir Varbanov
2015-01-30 13:39   ` Linus Walleij
2015-01-30 13:39     ` Linus Walleij
2015-01-30 10:27 ` Stanimir Varbanov [this message]
2015-01-30 16:20   ` [PATCH 3/3] pinctrl: qcom: handle input-enable pinconf property Bjorn Andersson
2015-02-04 10:03     ` Linus Walleij
2015-02-04 17:49       ` Bjorn Andersson

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=1422613644-13060-4-git-send-email-svarbanov@mm-sol.com \
    --to=svarbanov@mm-sol.com \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.