From: "Sherman Yin" <syin@broadcom.com>
To: "Linus Walleij" <linus.walleij@linaro.org>
Cc: "Stephen Warren" <swarren@wwwdotorg.org>,
"Heiko Stübner" <heiko@sntech.de>,
"Laxman Dewangan" <ldewangan@nvidia.com>,
"Mark Rutland" <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"Christian Daudt" <bcm@fixthebug.org>,
"Russell King" <linux@arm.linux.org.uk>,
"Pawel Moll" <pawel.moll@arm.com>,
"Ian Campbell" <ijc+devicetree@hellion.org.uk>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Rob Herring" <rob.herring@calxeda.com>,
bcm-kernel-feedback-list <bcm-kernel-feedback-list@broadcom.com>,
"Rob Landley" <rob@landley.net>,
"Grant Likely" <grant.likely@linaro.org>,
"Matt Porter" <matt.porter@linaro.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver
Date: Thu, 7 Nov 2013 16:29:52 -0800 [thread overview]
Message-ID: <527C3080.5050202@broadcom.com> (raw)
In-Reply-To: <CACRpkdaxPv6CLMjab_4umyUvbBVYcazjmwx_LGRK76vxT4VUqA@mail.gmail.com>
On 13-11-06 01:40 AM, Linus Walleij wrote:
> On Wed, Nov 6, 2013 at 3:02 AM, Sherman Yin <syin@broadcom.com> wrote:
>> When Linus asked me to try using generic pinconf instead, I ran into
>> problems with this feature due to how the generic pinconf properties are
>> defined differently than my properties - perhaps this feature just doesn't
>> work for generic pinconf-based drivers with the (Unless we are ok with using
>> 1/0 for boolean properties, but it has already been pointed out that these
>> should be valueless.).
>
> Well it seems you would need a way to pass an array of the same
> boolean property and that seems a bit more complex and hard to
> read than the generic boolean bindings.
>
> You would have to patch the OF core to do something like that:
>
> bias-pull-up = <true true false>;
>
> 1/0 isn't so good I think, what should the parser do with e.g. 2?
> This is more to the point.
I would imagine that the platform-specific device tree bindings would
need to clearly explain what the valid values are, as they should. If
we're using integers, we could either have a) !0 and 0, or b) just 1 and
0, and everything else is an error. Or c) the platform could decide
that the value provides addition info like pull-up-strength, so 0 = no
pull up, >0 = pull up enabled and the number is the pull up strength in
Ohm (bindings should indicate which values are valid), and everything
else is an error.
>> While I'd love to be able define my pin config nodes this way, if I have to
>> use generic pinconf for the driver to be upstreamed, then I'm fine with it.
>
> Well you need to use generic pin config because all the custom
> stuff - i.MX comes to mind - is creating a mess. I prefer that we
> share bindings and code, as any programmer would...
Ok
> That said, if you can patch the OF core and the generic pin config
> parser to do what you want with lists like that, it's your pick.
> It may take some time though.
I don't mind patching the generic pin config, and I don't think the core
needs to change, but first there needs to be an agreement on the changes
since other drivers will need to use pinconf-generic. Am I the only one
who would like to see this feature, or do others see value in being able
to group more pins together - resulting in fewer sub-nodes? Do the pros
out-weight the cons?
>>> "input disable"
>>> This setting disconnects the input (DIN) to the internal logic from >the
>>> pin pad. However, the output (DOUT) can still drive the pad. It
>>> seems to match PIN_CONFIG_OUTPUT, but the current generic option is
>>> either "output-low" or "output-high" - are these referring to a static
>>> output of 0 and 1?
>>
>> What's the best property to use in this case?
>
> Seems like a new case.
>
> What about you patch include/linux/pinctrl/pinconf-generic.h
> to add PIN_CONFIG_INPUT_DISABLE with this semantic
> and also patch the generic pinconf parser in drivers/pinctrl/pinconf-generic.c
> to handle this?
Sure, I can add PIN_CONFIG_INPUT_DISABLE. However I suspect people
might be confused by this and PIN_CONFIG_OUTPUT.
>>> "mode"
>>> This controls several aspect of the pin (slew rate, pull up strength,
>>> etc) to meet I2C specs for Standard/Fast mode vs High Speed mode. I
>>> think the best way is to map this to slew rate, which would require
>>> some explanation because the meaning of slew rate differs depending on
>>> what pin function is selected:
>>> - When I2C (*_SCL or *_SDA) function is selected for the pin: 0:
>>> Standard (100kbps)
>>> & Fast mode (400kbps), 1: High Speed mode (3.4Mbps)
>>> - When IC_DM or IC_DP function is selected, 0: normal slew rate, 1:
>>> fast slew rate
>>> - Else: 0: fast slew rate, 1: normal slew rate
>>
>> Do we agree that the "slew rate" is the best property to use for "mode"?
>
> It seems to be indeed mostly related to slew rate.
>
> However if you want a custom brcm,mode binding that should
> be possible too, as well as augmenting the driver to use
> *both* generic pinconf *and* some custom config options
> on top. That has not been done so far though I think, so you
> might need a bit of hacking to do that.
I think I'll stick with slew rate. :)
Regards,
Sherman
next prev parent reply other threads:[~2013-11-08 0:31 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-04 0:23 [PATCH 0/4] Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-04 0:23 ` [PATCH 1/4] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2013-10-09 8:55 ` Linus Walleij
2013-10-09 22:57 ` Sherman Yin
2013-10-04 0:23 ` [PATCH 2/4] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2013-10-04 12:51 ` Matt Porter
2013-10-09 8:53 ` Linus Walleij
2013-10-10 17:57 ` Sherman Yin
2013-10-04 0:23 ` [PATCH 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-09 9:10 ` Linus Walleij
2013-10-10 23:48 ` Sherman Yin
2013-10-11 8:14 ` Linus Walleij
2013-10-11 18:25 ` Sherman Yin
2013-10-22 23:29 ` Sherman Yin
2013-10-25 22:48 ` Sherman Yin
2013-11-04 12:24 ` Linus Walleij
2013-11-04 23:26 ` Heiko Stübner
2013-11-05 0:04 ` Stephen Warren
2013-11-06 2:02 ` Sherman Yin
2013-11-06 9:40 ` Linus Walleij
2013-11-08 0:29 ` Sherman Yin [this message]
2013-11-11 10:01 ` Linus Walleij
2013-11-13 23:43 ` Sherman Yin
2013-11-19 20:39 ` Linus Walleij
2013-11-06 17:00 ` Stephen Warren
2013-11-07 22:01 ` Sherman Yin
2013-11-06 9:29 ` Linus Walleij
2013-10-17 6:03 ` Christian Daudt
2013-10-17 14:54 ` Stephen Warren
2013-10-17 15:31 ` Christian Daudt
2013-12-11 0:05 ` Sherman Yin
2013-12-12 20:43 ` Linus Walleij
2013-10-04 0:23 ` [PATCH 4/4] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2013-10-09 9:11 ` Linus Walleij
2013-10-07 19:28 ` [PATCH v2 0/4] Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-07 19:28 ` [PATCH v2 1/4] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2013-10-07 19:28 ` [PATCH v2 2/4] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2013-10-07 19:28 ` [PATCH v2 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2013-10-07 19:28 ` [PATCH v2 4/4] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2013-12-11 18:37 ` [PATCH v3 0/6] Add Broadcom Capri pinctrl driver Sherman Yin
2013-12-11 18:37 ` [PATCH v3 1/6] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2013-12-11 18:37 ` [PATCH v3 2/6] pinctrl: Adds slew-rate, input-enable/disable Sherman Yin
2013-12-12 20:41 ` Linus Walleij
2013-12-16 9:55 ` Linus Walleij
2013-12-11 18:37 ` [PATCH v3 3/6] pinctrl: Make PINCTRL selectable by defconfig/menuconfig Sherman Yin
2013-12-12 20:39 ` Linus Walleij
2013-12-12 21:35 ` Christian Daudt
2013-12-16 10:01 ` Linus Walleij
2013-12-17 0:18 ` Bjorn Andersson
2013-12-20 9:37 ` Linus Walleij
2013-12-20 20:58 ` Arnd Bergmann
2013-12-21 2:15 ` Sherman Yin
2013-12-11 18:37 ` [PATCH v3 4/6] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2013-12-12 20:37 ` Linus Walleij
2013-12-14 1:16 ` Sherman Yin
2013-12-16 13:17 ` Linus Walleij
2013-12-18 2:02 ` Sherman Yin
2013-12-11 18:37 ` [PATCH v3 5/6] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2013-12-12 20:54 ` Linus Walleij
2013-12-13 10:22 ` Mark Brown
2013-12-19 0:12 ` Sherman Yin
2013-12-18 23:56 ` Sherman Yin
2013-12-21 2:31 ` Sherman Yin
2013-12-11 18:37 ` [PATCH v3 6/6] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2013-12-21 2:13 ` [PATCH v4 0/6] Add Broadcom Capri pinctrl driver Sherman Yin
2013-12-21 2:13 ` [PATCH v4 1/4] pinctrl: Add void * to pinctrl_pin_desc Sherman Yin
2014-01-16 13:26 ` Linus Walleij
2013-12-21 2:13 ` [PATCH v4 2/4] pinctrl: Add pinctrl binding for Broadcom Capri SoCs Sherman Yin
2014-01-07 17:15 ` Linus Walleij
2014-01-07 20:45 ` Sherman Yin
2014-01-14 10:16 ` Linus Walleij
2014-01-14 19:00 ` Sherman Yin
2014-01-15 9:40 ` Linus Walleij
2014-01-15 16:39 ` Mark Rutland
2014-01-16 13:24 ` Linus Walleij
2013-12-21 2:13 ` [PATCH v4 3/4] ARM: pinctrl: Add Broadcom Capri pinctrl driver Sherman Yin
2014-01-16 13:19 ` Linus Walleij
2014-01-17 19:59 ` Sherman Yin
2014-01-18 2:56 ` Matt Porter
2014-01-20 8:16 ` Linus Walleij
2014-01-20 19:14 ` Sherman Yin
2014-01-21 12:35 ` Linus Walleij
2014-01-21 13:49 ` Matt Porter
2013-12-21 2:13 ` [PATCH v4 4/4] pinctrl: Enable pinctrl for Broadcom Capri SoCs Sherman Yin
2014-01-16 13:28 ` Linus Walleij
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=527C3080.5050202@broadcom.com \
--to=syin@broadcom.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bcm@fixthebug.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=ldewangan@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=matt.porter@linaro.org \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=swarren@wwwdotorg.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).