lkml.org 
[lkml]   [2012]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH 1/3] pinctrl: Introduce PINCTRL_STATE_DEFAULT define, and use it
Stephen Warren wrote at Friday, February 24, 2012 10:10 AM:
> Linus Walleij wrote at Thursday, February 23, 2012 11:09 PM:
> > On Fri, Feb 24, 2012 at 1:04 AM, Stephen Warren <swarren@nvidia.com> wrote:
> >
> > > This provides a single centralized name for the default state.
> > >
> > > Update PIN_MAP_* macros to use this state name, instead of requiring the
> > > user to pass a state name in.
> > >
> > > Update documentation and mapping tables to use this.
...
> > I like the direction this is taking for sure. This is however not
> > working because it break U300, no hogs nor device requests work
> > after this patch so I cannot apply it.
...
> I think the fix for this is to replace the body of pinctrl_hog_maps()
> with:
>
> static int pinctrl_hog_maps(struct pinctrl_dev *pctldev)
> {
> int ret;
>
> INIT_LIST_HEAD(&pctldev->pinctrl_hogs);
>
> mutex_lock(&pinctrl_maps_mutex);
> ret = pinctrl_hog_map(pctldev, PINCTRL_STATE_DEFAULT);
> mutex_unlock(&pinctrl_maps_mutex);
>
> return ret;
> }

Oh, that won't work; the second parameter to pinctrl_hog_map() is a
map entry, not a state name.

Fixing this requires removing pctldev->pinctrl_hogs, and removing the hog
debugfs files (since that all relies on storing a list of mapping entries
that were hogged) and just doing a single pinctrl_get()/pinctrl_enable(),
and storing the one resulting struct pinctrl. I already did that as part
of my later patch for the API rework. I can extract that part into this
patch, and couple it with introducing define PINCTRL_STATE_DEFAULT, and
repost.

--
nvpublic



\
 
 \ /
  Last update: 2012-02-24 20:23    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site