On Thursday 22 June 2017 02:58 PM, Axel Lin wrote: > The value argument of lp87565_gpio_direction_output() means output level > rather than gpio direction. > > Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx> > --- > Hi Keerthy, > I don't have this h/w, so please help to review and test it. Axel, Apologies for replying a bit late. > Thanks, > Axel > drivers/gpio/gpio-lp87565.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-lp87565.c b/drivers/gpio/gpio-lp87565.c > index 6313c50..69b69d4 100644 > --- a/drivers/gpio/gpio-lp87565.c > +++ b/drivers/gpio/gpio-lp87565.c > @@ -54,9 +54,12 @@ static int lp87565_gpio_direction_output(struct gpio_chip *chip, > { > struct lp87565_gpio *gpio = gpiochip_get_data(chip); > > + regmap_update_bits(gpio->map, LP87565_REG_GPIO_OUT, > + BIT(offset), value ? BIT(offset) : 0); > + Or just call: lp87565_gpio_set(chip, offset, value); Apart from the above comment. Reviewed-by: Keerthy <j-keerthy@xxxxxx> Tested-by: Keerthy <j-keerthy@xxxxxx> Thanks, Keerthy > return regmap_update_bits(gpio->map, > LP87565_REG_GPIO_CONFIG, > - BIT(offset), !value ? BIT(offset) : 0); > + BIT(offset), BIT(offset)); > } > > static int lp87565_gpio_get(struct gpio_chip *chip, unsigned int offset) > -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html