lkml.org 
[lkml]   [2010]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH] cs5535-gpio: change input/output enable to match gpiolib expectations
    From
    Please ignore this patch.
    It seems you have to 'commit' in git before 'format-patch'...

    On Sat, Feb 27, 2010 at 12:36 PM, Ben Gardner <gardner.ben@gmail.com> wrote:
    > The intent of the gpiolib set_direction_xxx functions is as follows:
    > output: enable both input and output
    > input: disable output, enable input
    >
    > Change the cs5535 driver to do that.
    >
    > Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
    > CC: Andres Salomon <dilinger@collabora.co.uk>
    > CC: Andrew Morton <akpm@linux-foundation.org>
    > CC: David Brownell <dbrownell@users.sourceforge.net>
    > CC: Jani Nikula <ext-jani.1.nikula@nokia.com>
    > ---
    >  drivers/gpio/cs5535-gpio.c |    2 ++
    >  1 files changed, 2 insertions(+), 0 deletions(-)
    >
    > diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c
    > index 0fdbe94..59ab30e 100644
    > --- a/drivers/gpio/cs5535-gpio.c
    > +++ b/drivers/gpio/cs5535-gpio.c
    > @@ -171,6 +171,7 @@ static int chip_direction_input(struct gpio_chip *c, unsigned offset)
    >        unsigned long flags;
    >
    >        spin_lock_irqsave(&chip->lock, flags);
    > +       __cs5535_gpio_set(chip, offset, GPIO_OUTPUT_DISABLE);
    >        __cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE);
    >        spin_unlock_irqrestore(&chip->lock, flags);
    >
    > @@ -185,6 +186,7 @@ static int chip_direction_output(struct gpio_chip *c, unsigned offset, int val)
    >        spin_lock_irqsave(&chip->lock, flags);
    >
    >        __cs5535_gpio_set(chip, offset, GPIO_OUTPUT_ENABLE);
    > +       __cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE);
    >        if (val)
    >                __cs5535_gpio_set(chip, offset, GPIO_OUTPUT_VAL);
    >        else
    > --
    > 1.7.0
    >
    >
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-02-27 19:43    [W:0.033 / U:29.892 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site