From: Bjorn Andersson <bjorn.andersson@sonymobile.com>
To: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Daniel <delta.tatham@me.com>, 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>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/6] pinctrl: Device tree bindings for Qualcomm pm8xxx gpio block
Date: Wed, 20 Aug 2014 15:10:14 -0700 [thread overview]
Message-ID: <20140820221013.GC16274@sonymobile.com> (raw)
In-Reply-To: <1408346162.2695.33.camel@iivanov-dev>
On Mon 18 Aug 00:16 PDT 2014, Ivan T. Ivanov wrote:
> 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>:
[...]
> > > +#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.
>
The bias-pull-up is read as u32 and 0 means that it's not pull-up, therefor i
shifted them all. Sorry about that.
Now that we have this in a separate property there's no point in such
"trickery" and we should make them follow the register values, i.e:
#define PM8XXX_GPIO_BIAS_PU_30 0
#define PM8XXX_GPIO_BIAS_PU_1P5 1
#define PM8XXX_GPIO_BIAS_PU_31P5 2
#define PM8XXX_GPIO_BIAS_PU_1P5_30 3
I find it cleaner and we don't need the translation.
> > However, I still cannot get any data from those 2 pins if I export them through /sys/class/gpio...
>
Reading should work, but most other gpio operations was off by one it seems. I
have corrected this (and other reported things) and will send out a new version
soon.
> - pin->bias = arg - PM8XXX_GPIO_BIAS_PU_30;
> + pin->bias = arg - PMIC_GPIO_PULL_UP_30;
If we just make it follow the register value (starting at 0) we just use arg
straight off.
Regards,
Bjorn
next prev parent reply other threads:[~2014-08-20 22:10 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
2014-08-20 22:10 ` Bjorn Andersson [this message]
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=20140820221013.GC16274@sonymobile.com \
--to=bjorn.andersson@sonymobile.com \
--cc=delta.tatham@me.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=iivanov@mm-sol.com \
--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.