[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140930111210.GC24736@localhost>
Date: Tue, 30 Sep 2014 13:12:10 +0200
From: Johan Hovold <johan@...nel.org>
To: Muthu Mani <muth@...ress.com>
Cc: Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
Wolfram Sang <wsa@...-dreams.de>, linux-i2c@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
linux-gpio@...r.kernel.org, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Rajaram Regupathy <rera@...ress.com>,
Johan Hovold <johan@...nel.org>
Subject: Re: [PATCH v2 3/3] gpio: add support for Cypress CYUSBS234 USB-GPIO
adapter
On Tue, Sep 30, 2014 at 01:08:29PM +0200, Johan Hovold wrote:
> On Thu, Sep 25, 2014 at 11:21:58AM +0530, Muthu Mani wrote:
> > +static int cy_gpio_direction_input(struct gpio_chip *chip,
> > + unsigned offset)
> > +{
> > + return 0;
> > +}
> > +
> > +static int cy_gpio_direction_output(struct gpio_chip *chip,
> > + unsigned offset, int value)
> > +{
> > + return 0;
> > +}
>
> This is not a correct implementation of these. You're are supposed to
> return what direction the gpio is configured for. You should also add a
> call back to set the direction.
That was backwards; these are supposed to set the direction, and then
you should also implement the get_direction callback.
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists