All of lore.kernel.org
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 12/12] document: devicetree: bind pinconf with pin single
Date: Tue, 5 Feb 2013 15:21:10 -0800	[thread overview]
Message-ID: <20130205232109.GP25185@atomide.com> (raw)
In-Reply-To: <CAN1soZytx7w8a1C=-C7924_MW6FPH5b=gsvSH=BpDU4ZhJia4w@mail.gmail.com>

* Haojian Zhuang <haojian.zhuang@gmail.com> [130205 00:09]:
> On Tue, Feb 5, 2013 at 12:07 PM, Tony Lindgren <tony@atomide.com> wrote:
> 
> > For the cases where there's a value to be set I'm still wondering how does
> > a client driver change the value if that needs to be changed dynamically?
> > Can the value be passed as value + PIN_CONFIG_END?
> >
> pinconf_to_config_packed() can help to bind param & argument into config
> variable.

OK good to hear you've looked into that.
...
 
> And I think that we need four parameters with your format.
>       <user setting on bias enable/disable, expected enable value,
> expected disable value, mask */
> Otherwise, how could we know user's setting? Especially, we need to
> configure pullup.
> In your case, expected pullup enable & expected pullup disable are set
> in bias-pullup property.
> >                 /* enable value, disable value, mask */
> >                 pinctrl-single,bias-pullup = <0 1 1>;
> 
> Actually, I'm OK to use enable value. And it needs 4 parameters since
> disable value may not be zero.

OK. Four values makes sense to me so we can configure the default
pinconf value like we already do for pinmux.
 
> By the way, bias property would be the format in below with 4 parameters.
> * Without bias enable/disable bit.
>           bias-enable = <0, 0, 0, set of both pullup and pulldown mask>;
> 
> * With bias enable/disable bit.
>           bias-enable = <user setting, expected enable, expected
> disable, mask of only enable/disable bit>;
> 
> Behavior of pinconf_clear():
>      - call bias-disable
>      - call the expected bias setting.

Hmm I was thinking pinconf_clear() would get passed the same parameters
as pinconf_set() except it just does the opposite. But maybe I'm not
following you here.
 
> DISABLE --> PULLUP, user call config BIAS_PULLUP without additional argument.
> PULLUP --> PULLDOWN, user call with config BIAS_PULLDOWN without
> additional argument.
> PULLUP --> DISABLE, user call with config BIAS_ENABLE and 0 for argument.
> 
> The switch from PULLUP to DISABLE is a little strange since we have to
> call BIAS_ENABLE.
> Is it good for you?

I'm not sure I follow your example here, but sounds like the PULLUP to
DISABLE case can be maybe handled by covering both bits in the mask?
 
> > Then regarding pinconf_set(), don't we also need pinconf_clear() in
> > addition to pinconf_set()?
> >
> > Otherwise we need both ENABLE and DISABLE enumeration, which seems
> > unnecessary to me. So rather than have both PIN_CONFIG_BIAS_ENABLE and
> > PIN_CONFIG_BIAS_DISABLE, we just need PIN_CONFIG_BIAS_ENABLE.
> I can append pinconf_clear() to handle it.
 
OK great, I guess then we should have everything in place to make it
usable from client drivers also.

Regards,

Tony

  parent reply	other threads:[~2013-02-05 23:21 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-02 17:25 [PATCH v8 00/12] support pinconf in pinctrl single Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 01/12] gpio: add gpio offset in gpio range cells property Haojian Zhuang
2013-02-05  0:23   ` Tony Lindgren
2013-02-05  1:06     ` Haojian Zhuang
2013-02-10 19:03   ` Linus Walleij
2013-02-11  4:25     ` Viresh Kumar
2013-04-29 16:00   ` [v8,01/12] " James Hogan
2013-04-29 16:49     ` Haojian Zhuang
2013-04-29 20:16       ` James Hogan
2013-02-02 17:25 ` [PATCH v8 02/12] gpio: fix wrong checking condition for gpio range Haojian Zhuang
2013-02-05 17:02   ` Linus Walleij
2013-02-02 17:25 ` [PATCH v8 03/12] gpio: find gpio base by ascend order Haojian Zhuang
2013-02-05 17:14   ` Linus Walleij
2013-02-06  1:59     ` Haojian Zhuang
2013-02-06  4:33       ` Alex Courbot
2013-02-06  5:20         ` Haojian Zhuang
2013-02-06  8:44       ` Linus Walleij
2013-02-06  9:15         ` Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 04/12] gpio: pl061: allocate irq dynamically Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 05/12] pinctrl: verify whether gpio chip overlapps range Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 06/12] gpio: pl061: bind pinctrl by gpio request Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 07/12] pinctrl: single: create new gpio function range Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 08/12] pinctrl: generic: dump pin configuration Haojian Zhuang
2013-02-05  0:35   ` Tony Lindgren
2013-02-05  0:57     ` Tony Lindgren
2013-02-05  1:09       ` Haojian Zhuang
2013-02-05  1:08     ` Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 09/12] pinctrl: single: set function mask as optional Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 10/12] pinctrl: single: support generic pinconf Haojian Zhuang
2013-02-05  0:46   ` Tony Lindgren
2013-02-05  1:07     ` Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 11/12] ARM: hs: enable hi4511 with device tree Haojian Zhuang
2013-02-02 17:25 ` [PATCH v8 12/12] document: devicetree: bind pinconf with pin single Haojian Zhuang
2013-02-05  4:07   ` Tony Lindgren
2013-02-05  8:06     ` Haojian Zhuang
2013-02-05 13:51       ` Haojian Zhuang
2013-02-05 23:30         ` Tony Lindgren
2013-02-06 15:07           ` Haojian Zhuang
2013-02-06 17:16             ` Tony Lindgren
2013-02-05 23:21       ` Tony Lindgren [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-02-11 17:10 [PATCH v8 00/12] bind pinconf with pinctrl single Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 12/12] document: devicetree: bind pinconf with pin single Haojian Zhuang
2013-02-13 23:51   ` Tony Lindgren

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=20130205232109.GP25185@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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.