All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Ulf Hansson <ulf.hansson@linaro.org>, linux-mmc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH] pwrseq: bind pinctrl pins before using the gpios
Date: Mon, 17 Aug 2015 12:58:07 +0100	[thread overview]
Message-ID: <1439812687-18259-1-git-send-email-srinivas.kandagatla@linaro.org> (raw)

Some of the pin-controllers like the Qualcomms "qcom,pm8921", which
require a pinconf to be setup to use pins as gpios. Using the pins
directly without pinconf setup would result in incorrect output voltage
or load settings. On the other hand pwrseq code does not configure the
pinctrl by default as it does not go thru the driver core.

This patch adds a call to pinctrl_bind_pins() to bind pins which
are going to be used as gpios.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/mmc/core/pwrseq.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/core/pwrseq.c b/drivers/mmc/core/pwrseq.c
index 4c1d175..6e5d8b3 100644
--- a/drivers/mmc/core/pwrseq.c
+++ b/drivers/mmc/core/pwrseq.c
@@ -12,6 +12,7 @@
 #include <linux/err.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/pinctrl/devinfo.h>
 
 #include <linux/mmc/host.h>
 
@@ -65,6 +66,10 @@ int mmc_pwrseq_alloc(struct mmc_host *host)
 		goto err;
 	}
 
+	ret = pinctrl_bind_pins(&pdev->dev);
+	if (ret)
+		goto err;
+
 	match = mmc_pwrseq_find(np);
 	if (IS_ERR(match)) {
 		ret = PTR_ERR(match);
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: srinivas.kandagatla@linaro.org (Srinivas Kandagatla)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pwrseq: bind pinctrl pins before using the gpios
Date: Mon, 17 Aug 2015 12:58:07 +0100	[thread overview]
Message-ID: <1439812687-18259-1-git-send-email-srinivas.kandagatla@linaro.org> (raw)

Some of the pin-controllers like the Qualcomms "qcom,pm8921", which
require a pinconf to be setup to use pins as gpios. Using the pins
directly without pinconf setup would result in incorrect output voltage
or load settings. On the other hand pwrseq code does not configure the
pinctrl by default as it does not go thru the driver core.

This patch adds a call to pinctrl_bind_pins() to bind pins which
are going to be used as gpios.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/mmc/core/pwrseq.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/mmc/core/pwrseq.c b/drivers/mmc/core/pwrseq.c
index 4c1d175..6e5d8b3 100644
--- a/drivers/mmc/core/pwrseq.c
+++ b/drivers/mmc/core/pwrseq.c
@@ -12,6 +12,7 @@
 #include <linux/err.h>
 #include <linux/of.h>
 #include <linux/of_platform.h>
+#include <linux/pinctrl/devinfo.h>
 
 #include <linux/mmc/host.h>
 
@@ -65,6 +66,10 @@ int mmc_pwrseq_alloc(struct mmc_host *host)
 		goto err;
 	}
 
+	ret = pinctrl_bind_pins(&pdev->dev);
+	if (ret)
+		goto err;
+
 	match = mmc_pwrseq_find(np);
 	if (IS_ERR(match)) {
 		ret = PTR_ERR(match);
-- 
1.9.1

             reply	other threads:[~2015-08-17 11:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-17 11:58 Srinivas Kandagatla [this message]
2015-08-17 11:58 ` [PATCH] pwrseq: bind pinctrl pins before using the gpios Srinivas Kandagatla
2015-08-25 12:06 ` Ulf Hansson
2015-08-25 12:06   ` Ulf Hansson
2015-08-25 12:06   ` Ulf Hansson
2015-08-27  8:48   ` Ulf Hansson
2015-08-27  8:48     ` Ulf Hansson
2015-08-27  8:48     ` Ulf Hansson

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=1439812687-18259-1-git-send-email-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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.