lkml.org 
[lkml]   [2012]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH 11/20] pinctrl: Downgrade pinctrl_get warning when no maps are found
Dong Aisheng wrote at Tuesday, February 21, 2012 11:57 PM:
> On Tue, Feb 21, 2012 at 02:51:55PM +0100, Linus Walleij wrote:
> > On Mon, Feb 20, 2012 at 7:45 AM, Stephen Warren <swarren@nvidia.com> wrote:
> >
> > > This may be perfectly legitimate. An IP block may get re-used
> > > across SoCs. Not all of those SoCs may need pinmux settings for the
> > > IP block, e.g. if one SoC dedicates pins to that function but
> > > another doesn't. The driver won't know this, and will always
> > > attempt to set up the pinmux. The mapping table defines whether any
> > > HW programming is actually needed.
> > >
> > > Signed-off-by: Stephen Warren <swarren@nvidia.com>
> >
> > This is equivalent to providing dummy pincontrollers as was on my
> > TODO for a while admittedly.
> >
> > For consistency with regulators it would maybe be better to have
> > optional dummy pin controllers but after thinking a bit about it
> > I think this is more helpful, so I applied it anyway.
> >
> > However I would invite more opinions...
>
> I'm afraid this is a little error-prone, that means even we specifed
> the wrong map name or state name, the pinctrl_get still does not get
> failed and it is a little different as what we want in this patch.

Yes, this does open up a small opportunity for an undetected error at
this stage in the patch series.

However, this is closed later by the final patch that enhances the mapping
table to represent pin config data, and "dummy" states.

I wrote/posted this patch to highlight that this code should be checking
for non-existent states, rather than states which match no mapping table
entries. Admittedly, there's no way to represent the difference at this
point in the patch series. Once the final patch is applied, there's an
explicit way to represent a state that exists, but has no mapping table
entries, so the opportunity for error then no longer exists.

--
nvpublic



\
 
 \ /
  Last update: 2012-02-22 18:25    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site