All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 2/3] pinctrl: tegra-xusb: Fix allocation of pins
Date: Tue, 19 May 2015 16:09:26 +0100	[thread overview]
Message-ID: <555B5226.3090500@nvidia.com> (raw)
In-Reply-To: <20150519143041.GD26748-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>


On 19/05/15 15:30, Thierry Reding wrote:
> * PGP Signed by an unknown key
> 
> On Tue, May 19, 2015 at 03:14:22PM +0100, Jon Hunter wrote:
>> Commit e5b3b2d9ed20 ("pinctrl: allows not to define the get_group_pins
>> operation") allows pin controllers not to register the get_group_pins()
>> function. However, a side-effect of not registering this function is
>> that pins are not allocated and potentially multiple devices could
>> attempt to configure the same pins [1]. Although this problem exists in
>> the pinctrl core, because only a few devices are impacted by this, fix
>> this for tegra-xusb by adding the get_group_pins() function.
> 
> If I understand correctly this effectively makes get_group_pins()
> mandatory, doesn't it? In that case, shouldn't commit e5b3b2d9ed20 be
> reverted?

Yes may be it should. I will defer to Linus here.

>> Please note that in addition to adding the get_group_pins() functions
>> the pins/lanes for the tegra-xusb also need to be registered when
>> calling pinctrl_register(). This also allows the current pinmux state
>> to be viewed by the debugfs node "pinmux-pins" for the tegra-xusb pad
>> controller.
> 
> This sounds like a logically separate change and hence could warrant a
> separate patch. I'll defer to Linus on this, though, so:

It needs to be registered as part of this patch otherwise the pins will
not be registered and pin_request() will fail. Today pin_request() does
not even get called for these pins. So I believe that this is needed as
part of this patch.

May be I was not clear above, but the debugfs "pinmux-pins" entry shows
nothing today for these pins. A by-product of this fix is that now we
can view the pinmux state of the pins via the debugfs.

> Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Cheers
Jon

  parent reply	other threads:[~2015-05-19 15:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19 14:14 [PATCH 0/3] pinctrl: tegra-xusb: Clean-up and fixes Jon Hunter
     [not found] ` <1432044863-2035-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-19 14:14   ` [PATCH 1/3] pinctrl: tegra-xusb: Remove unused structure Jon Hunter
2015-05-19 14:20     ` Thierry Reding
2015-05-19 14:14 ` [PATCH 2/3] pinctrl: tegra-xusb: Fix allocation of pins Jon Hunter
     [not found]   ` <1432044863-2035-3-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-05-19 14:30     ` Thierry Reding
     [not found]       ` <20150519143041.GD26748-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-19 15:09         ` Jon Hunter [this message]
2015-05-19 14:33   ` Thierry Reding
     [not found]     ` <20150519143340.GE26748-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-19 15:23       ` Jon Hunter
2015-05-20 15:04         ` Thierry Reding
2015-05-19 14:14 ` [PATCH 3/3] pinctrl: tegra-xusb: Check that of_match_node returns a valid pointer Jon Hunter
2015-05-19 14:18   ` Thierry Reding
     [not found]     ` <20150519141836.GB26748-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-19 14:29       ` Jon Hunter

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=555B5226.3090500@nvidia.com \
    --to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.