From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
To: Bjorn Andersson <bjorn.andersson@sonymobile.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>,
"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: Mon, 25 Aug 2014 16:14:00 +0300 [thread overview]
Message-ID: <1408972440.5256.8.camel@iivanov-dev> (raw)
In-Reply-To: <20140820222741.GD16274@sonymobile.com>
On Wed, 2014-08-20 at 15:27 -0700, Bjorn Andersson wrote:
> On Mon 11 Aug 08:40 PDT 2014, Ivan T. Ivanov wrote:
> [...]
> > diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
> [...]
> > +SUBNODES:
> [...]
> > +- function:
> > + Usage: required
> > + Value type: <string>
> > + Definition: Specify the alternative function to be configured for the
> > + specified pins. Valid values are:
> > + "normal",
> > + "paired",
> > + "func1",
> > + "func2",
> > + "dtest1",
> > + "dtest2",
> > + "dtest3",
> > + "dtest4"
> > +
>
> I still think it looks better with "real" functions, but I rather go with this
> than discussing it forever.
>
> > +- qcom,pull-up-strength:
> > + Usage: optional
> > + Value type: <u32>
> > + Definition: Specifies the strength to use for pull up, if selected.
> > + Valid values are; as defined in
> > + <dt-bindings/pinctrl/qcom,pmic-gpio.h>:
> > + 1: 30uA (PMIC_GPIO_PULL_UP_30)
> > + 2: 1.5uA (PMIC_GPIO_PULL_UP_1P5)
> > + 3: 31.5uA (PMIC_GPIO_PULL_UP_31P5)
> > + 4: 1.5uA + 30uA boost (PMIC_GPIO_PULL_UP_1P5_30)
> > + If this property is ommited 30uA strength will be used if
> > + pull up is selected
>
> I would prefer if we decrement this one step, as it will follow the register
> values of both the "ssbi" and "spmi" based pmics.
Ok.
>
> [...]
> > +
> > +- power-source:
> > + Usage: optional
> > + Value type: <u32>
> > + Definition: Selects the power source for the specified pins. Valid
> > + power sources are defined per chip in
> > + <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> > + xxxx_GPIO_L6, xxxx_GPIO_L5...
>
> After implementing this my only concern is that debugfs output is not as useful
> anymore; saying VIN2 instead of S4. But I can live with this.
>
> > diff --git a/include/dt-bindings/pinctrl/qcom,pmic-gpio.h b/include/dt-bindings/pinctrl/qcom,pmic-gpio.h
> [...]
> > +
> > +#define PM8038_GPIO1_2_LPG_DRV PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO3_5V_BOOST_EN PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO4_SSBI_ALT_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO5_6_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO10_11_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO6_7_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO9_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
> > +#define PM8038_GPIO6_12_KYPD_DRV PMIC_GPIO_FUNC_FUNC2
> > +
> > +#define PM8058_GPIO7_8_MP3_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO7_8_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC2
> > +#define PM8058_GPIO9_26_KYPD_DRV PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2
> > +#define PM8058_GPIO24_26_LPG_DRV PMIC_GPIO_FUNC_FUNC2
> > +#define PM8058_GPIO33_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO34_35_MP3_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO36_BCLK_19P2MHZ PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO37_UPL_OUT PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO37_UART_M_RX PMIC_GPIO_FUNC_FUNC2
> > +#define PM8058_GPIO38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO38_39_CLK_32KHZ PMIC_GPIO_FUNC_FUNC2
> > +#define PM8058_GPIO39_MP3_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8058_GPIO40_EXT_BB_EN PMIC_GPIO_FUNC_FUNC1
> > +
> > +#define PM8917_GPIO9_18_KEYP_DRV PMIC_GPIO_FUNC_FUNC1
> > +#define PM8917_GPIO20_BAT_ALRM_OUT PMIC_GPIO_FUNC_FUNC1
> > +#define PM8917_GPIO21_23_UART_TX PMIC_GPIO_FUNC_FUNC2
> > +#define PM8917_GPIO25_26_EXT_REG_EN PMIC_GPIO_FUNC_FUNC1
> > +#define PM8917_GPIO37_38_XO_SLEEP_CLK PMIC_GPIO_FUNC_FUNC1
> > +#define PM8917_GPIO37_38_MP3_CLK PMIC_GPIO_FUNC_FUNC2
>
> Stephens argument was that we don't want to have huge tables for the functions
> and I can see his point, it will be some work to build all the tables.
> Adding all this defines is unfortunately doing just that.
It is still little bit simpler :-)
>
> I had a version of my driver that exposed real functions by name from the
> driver, following the pattern we have for other pinctrl drivers and making the
> dts very easy to read. But if you don't think we should go that route then I
> suggest that we just call it func1/func2 and skip these defines.
>
> Regards,
> Bjorn
Regards,
Ivan
next prev parent reply other threads:[~2014-08-25 13:14 UTC|newest]
Thread overview: 25+ 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
2014-08-20 22:27 ` Bjorn Andersson
2014-08-25 13:14 ` Ivan T. Ivanov [this message]
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 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-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=1408972440.5256.8.camel@iivanov-dev \
--to=iivanov@mm-sol.com \
--cc=bjorn.andersson@sonymobile.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).