[RFC PATCH v2 4/4] mmc: sdhci-esdhc-imx: using pinmux subsystem
shawn.guo at freescale.com
Thu Dec 15 06:21:45 EST 2011
On Thu, Dec 15, 2011 at 10:33:19AM +0100, Sascha Hauer wrote:
> On Thu, Dec 15, 2011 at 08:59:28AM +0000, Dong Aisheng-B29396 wrote:
> > > -----Original Message-----
> > > From: Linus Walleij [mailto:linus.walleij at linaro.org]
> > > Sent: Thursday, December 15, 2011 4:27 PM
> > > To: Guo Shawn-R65073
> > > Cc: Sascha Hauer; Dong Aisheng-B29396; linus.walleij at stericsson.com;
> > > linux-kernel at vger.kernel.org; rob.herring at calxeda.com;
> > > grant.likely at secretlab.ca; linux-arm-kernel at lists.infradead.org;
> > > kernel at pengutronix.de
> > > Subject: Re: [RFC PATCH v2 4/4] mmc: sdhci-esdhc-imx: using pinmux
> > > subsystem
> > > Importance: High
> > >
> > > On Thu, Dec 15, 2011 at 8:05 AM, Shawn Guo <shawn.guo at freescale.com>
> > > wrote:
> > > >[Me]
> > > >> So if you want to do this for i.MX you need something like selectable
> > > >> dummy pinmuxes, i.e. pinmux_get() to return something that just say
> > > >> "OK" to everything like the dummy regulators.
> > > >>
> > > >> Shall I try to create something like that?
> > > >>
> > > > Isn't the empty functions defined in include/linux/pinctrl/pinmux.h
> > > > for this purpose?
> > >
> > > No, these are for compiling it *out*, dummy pinmuxes would be if you
> > > compile it *in*, but don't find an apropriate pinmux, you still get
> > > something that does nothing and still works.
> > >
> > > Dummy regulators work exactly this way.
> > >
> > I did not read the dummy regulator code too much.
> > But does it mean that the dummy regulator or dummy pinmux will also hide the
> > Real errors since it will always get a available one?
What do you mean 'real error'? When driver calls pimnux api on a
platform with real pinmux support, the error is error. When driver
calls pinmux api on a platform support with dummy pinmux, it's totally
error free, as the pinmux core will ensure all the pinmux_* calls
always return success.
> > How do we distinguish between the two case(real error and fake error)?
What do we need to distinguish between two cases? The real success for
real pinmux from the fake success for the dummy pinmux? It does not
> We don't :(
> That's the problem with the dummy regulator.
What is the problem exactly? I do not quite understand.
More information about the linux-arm-kernel