lkml.org 
[lkml]   [2012]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 2/3] gpio: twl4030: Cache the direction and output states in private data
Date
On Wed, 19 Dec 2012 21:53:23 +0100, Michael Trimarchi <michael@amarulasolutions.com> wrote:
> Hi
>
> Grant Likely <grant.likely@secretlab.ca> wrote:
>
> >On Thu, 6 Dec 2012 11:52:06 +0100, Peter Ujfalusi
> ><peter.ujfalusi@ti.com> wrote:
> >> Use more coherent locking in the driver. Use bitfield to store the
> >GPIO
> >> direction and if the pin is configured as output store the status
> >also in a
> >> bitfiled.
> >> In this way we can just look at these bitfields when we need
> >information
> >> about the pin status and only reach out to the chip when it is
> >needed.
> >>
> >> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> >
> >Applied, thanks
> >
> >g.
> >
> >> @@ -279,64 +276,98 @@ static void twl_free(struct gpio_chip *chip,
> >unsigned offset)
> >> {
> >> struct gpio_twl4030_priv *priv = to_gpio_twl4030(chip);
> >>
> >> + mutex_lock(&priv->mutex);
> >> if (offset >= TWL4030_GPIO_MAX) {
> >> twl4030_led_set_value(offset - TWL4030_GPIO_MAX, 1);
>
> I have the mobile but where is the unlock here?

Good catch. I've dropped the patch. Peter, please resend a fixed-up version.

g.



\
 
 \ /
  Last update: 2012-12-20 00:01    [W:0.042 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site