lkml.org 
[lkml]   [2013]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Re: pinctrl:when two device use the same pin
From
On Sat, Jun 15, 2013 at 2:10 PM, xulinuxkernel <xulinuxkernel@gmail.com> wrote:

> In my company,on the chip, the spi nor flash and nand flash use the same
> four pins.In this case,it must be different devices and different drivers.
> In the "Runtime pinmuxing", I think it is one device has two different
> state.

This does not sound like runtime pin muxing.

This sounds like you have *either* a NOT flash *or* a NAND
flash connected to your chip, not both NOR and NAND at the
same time.

Just do not register the device nor add the pinctrl tables
for the one that is not used on a certain target system.
Atleast do not add the pinctrl tables for NOR when using
NAND and vice versa.

> when spi flash use the pin.then nand request the pin it will fail,I just add
> the current(nand) process in an wait queue,after the spi flash pinctl_put,
> spi will wake_up the wait queue.
>
> when nand use the pin,if spi request fail, I add the spi process on the same
> wait queue,when nand release the pin,nand will wake up the wait queue.
> Is that ok?

This sounds like a horribly complicated hack to do something
very simple. Look at the problem from a higher level.

Why do you do this? Obviously you have either NOR or NAND
connected? Don't you know from the system board file or
device tree which one it is?

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-06-15 22:01    [W:0.051 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site