linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: bug of gpio transition in pinmux driver
       [not found] <CAN1soZyX-jJAw4UcQUkgaYC9YosB1znbcFwiijjkyvidPXgp4w@mail.gmail.com>
@ 2011-11-23 17:13 ` Stephen Warren
  2011-11-23 17:25   ` Haojian Zhuang
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2011-11-23 17:13 UTC (permalink / raw)
  To: Haojian Zhuang, Linus Walleij, linux-arm-kernel, linux-kernel

Haojian Zhuang wrote at Wednesday, November 23, 2011 6:13 AM:
> Hi Linus & Stephen,
> 
> There's a bug in pinmux driver. We can request gpio via
> pinmux_request_gpio(@gpio). @gpio is the gpio number.
> 
> In pinmux_request_gpio():
>     pin = @gpio - range->base;
>     pin_request(pin);
> 
> This pin is the index of pinctrl_pin_desc[]. What's the definition of
> pinctrl_pin_desc's index? It's the index of PAD, not GPIO. Since the
> goal of pinmux_request_gpio() is to avoid define too much gpio groups.
> We need to add the transition between gpio and pad. It's clear that
> the transition of "pin = @gpio - range->base" can't fit every silicon.

> Especially, one gpio can be routed to two pads in PXA silicon.

That particular case isn't really covered yet; we've been discussing how
to solve that case; see:

https://lkml.org/lkml/2011/11/21/370

-- 
nvpublic


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: bug of gpio transition in pinmux driver
  2011-11-23 17:13 ` bug of gpio transition in pinmux driver Stephen Warren
@ 2011-11-23 17:25   ` Haojian Zhuang
  0 siblings, 0 replies; 2+ messages in thread
From: Haojian Zhuang @ 2011-11-23 17:25 UTC (permalink / raw)
  To: Stephen Warren; +Cc: Linus Walleij, linux-arm-kernel, linux-kernel

On Thu, Nov 24, 2011 at 1:13 AM, Stephen Warren <swarren@nvidia.com> wrote:
> Haojian Zhuang wrote at Wednesday, November 23, 2011 6:13 AM:
>> Hi Linus & Stephen,
>>
>> There's a bug in pinmux driver. We can request gpio via
>> pinmux_request_gpio(@gpio). @gpio is the gpio number.
>>
>> In pinmux_request_gpio():
>>     pin = @gpio - range->base;
>>     pin_request(pin);
>>
>> This pin is the index of pinctrl_pin_desc[]. What's the definition of
>> pinctrl_pin_desc's index? It's the index of PAD, not GPIO. Since the
>> goal of pinmux_request_gpio() is to avoid define too much gpio groups.
>> We need to add the transition between gpio and pad. It's clear that
>> the transition of "pin = @gpio - range->base" can't fit every silicon.
>
>> Especially, one gpio can be routed to two pads in PXA silicon.
>
> That particular case isn't really covered yet; we've been discussing how
> to solve that case; see:
>
> https://lkml.org/lkml/2011/11/21/370
>
> --
> nvpublic
>
>

Thanks a lot for your quick reply. If you could cc linux-arm-kernel
mailist for the later discussion of pinmux, it would be better.

Best Regards
Haojian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-23 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAN1soZyX-jJAw4UcQUkgaYC9YosB1znbcFwiijjkyvidPXgp4w@mail.gmail.com>
2011-11-23 17:13 ` bug of gpio transition in pinmux driver Stephen Warren
2011-11-23 17:25   ` Haojian Zhuang

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).