From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Daniel <delta.tatham@me.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Bjorn Andersson <bjorn.andersson@sonymobile.com>,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/6] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block
Date: Mon, 18 Aug 2014 10:16:02 +0300 [thread overview]
Message-ID: <1408346162.2695.33.camel@iivanov-dev> (raw)
In-Reply-To: <ED4952FE-A292-4724-9283-B5226AB20E3E@me.com>
On Sat, 2014-08-16 at 16:24 +0100, Daniel wrote:
> @Ivan: sorry about the double post.
>
> Am 11.08.2014 um 16:40 schrieb Ivan T. Ivanov <iivanov@mm-sol.com>:
> > diff --git a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h
> > new file mode 100644
> > index 0000000..994e748
> > --- /dev/null
> > +++ b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h
> > @@ -0,0 +1,107 @@
> > +/*
> > + * This header provides constants for the Qualcomm PMIC gpio binding.
> > + */
> > +
> > +#ifndef _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
> > +#define _DT_BINDINGS_PINCTRL_QCOM_PMIC_GPIO_H
> > +
> > +#define PMIC_GPIO_PULL_UP_30 1
> > +#define PMIC_GPIO_PULL_UP_1P5 2
> > +#define PMIC_GPIO_PULL_UP_31P5 3
> > +#define PMIC_GPIO_PULL_UP_1P5_30 4
>
> Looking at drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c, shouldn't these defines start at 0?
> e.g. #define PMIC_GPIO_PULL_UP_30 0
>
Initially "bias-pull-up" was used to set this parameter.
Zero value for "bias-pull-up" has special meaning "...the
pin is connected to VDD...". So values in DTS have to have
offset by one. Micro Amps are non-standard for pull-ups,
thats why I have changed this to "qcom,pull-up-strength", but I
have made mistake in config_set function. Following patch should
fix the issue. I will send updated version soon.
> However, I still cannot get any data from those 2 pins if I export them through /sys/class/gpio...
Ensure that you are exporting the right gpio number.
# cat /sys/kernel/debug/gpio
Will tell you correct gpio range for registered gpio chips.
>
> Device: Nexus 7 2013 WiFi
> Board: APQ8064
Thanks for testing this.
Regards,
Ivan
---
drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c
b/drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c
index 9a1b443..dd424f4 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-pmic.c
@@ -446,7 +446,7 @@ static int pm8xxx_gpio_config_set(struct pinctrl_dev
*pctldev,
dev_err(pctrl->dev, "invalid pull-up level\n");
return -EINVAL;
}
- pin->bias = arg - PM8XXX_GPIO_BIAS_PU_30;
+ pin->bias = arg - PMIC_GPIO_PULL_UP_30;
banks |= BIT(2);
pin->disable = 0;
banks |= BIT(3);
next prev parent reply other threads:[~2014-08-18 7:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 15:40 [PATCH v3 0/6] Qualcomm PMIC pin controller drivers Ivan T. Ivanov
2014-08-11 15:40 ` [PATCH v3 1/6] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block Ivan T. Ivanov
2014-08-16 15:24 ` Daniel
2014-08-18 7:16 ` Ivan T. Ivanov [this message]
2014-08-20 22:10 ` Bjorn Andersson
2014-08-20 22:27 ` Bjorn Andersson
2014-08-25 13:14 ` Ivan T. Ivanov
2014-08-11 15:40 ` [PATCH v3 2/6] pinctrl: Introduce pinctrl driver for Qualcomm SSBI PMIC's Ivan T. Ivanov
[not found] ` <1407771634-14946-3-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-08-20 8:06 ` Srinivas Kandagatla
2014-08-20 8:06 ` Srinivas Kandagatla
2014-08-20 21:28 ` Bjorn Andersson
2014-08-20 22:13 ` Bjorn Andersson
2014-11-03 8:48 ` Srinivas Kandagatla
2014-11-04 2:25 ` Bjorn Andersson
2014-08-11 15:40 ` [PATCH v3 3/6] pinctrl: Add documentation for SPMI PMIC pinctrl driver bindings Ivan T. Ivanov
2014-08-13 14:32 ` Stephen Boyd
2014-08-25 14:07 ` Ivan T. Ivanov
2014-08-11 15:40 ` [PATCH v3 4/6] pinctrl: Qualcomm SPMI PMIC pin controller driver Ivan T. Ivanov
2014-08-21 6:16 ` Bjorn Andersson
[not found] ` <20140821061607.GF16274-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2014-08-25 14:00 ` Ivan T. Ivanov
2014-08-25 14:00 ` Ivan T. Ivanov
2014-08-11 15:40 ` [PATCH v3 5/6] ARM: dts: qcom: Add PM8941 and PM8841 pinctrl nodes Ivan T. Ivanov
2014-08-14 7:33 ` Pramod Gurav
2014-08-25 14:06 ` Ivan T. Ivanov
2014-08-11 15:40 ` [PATCH v3 6/6] ARM: dts: qcom: Add APQ8074 Dragonboard PMIC GPIO bindings Ivan T. Ivanov
2014-08-20 23:06 ` Bjorn Andersson
2014-08-25 14:04 ` Ivan T. Ivanov
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=1408346162.2695.33.camel@iivanov-dev \
--to=iivanov@mm-sol.com \
--cc=bjorn.andersson@sonymobile.com \
--cc=delta.tatham@me.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.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.