static int tps6586x_gpio_output(struct gpio_chip *gc, unsigned offset, int value) { struct tps6586x *tps6586x = container_of(gc, struct tps6586x, gpio); uint8_t val, mask; tps6586x_gpio_set(gc, offset, value); val = 0x1 << (offset * 2); mask = 0x3 << (offset * 2); return tps6586x_update(tps6586x->dev, TPS6586X_GPIOSET1, val, mask); }
static int tps6586x_gpio_output(struct gpio_chip *gc, unsigned offset, int value) { struct tps6586x_gpio *tps6586x_gpio = gpiochip_get_data(gc); uint8_t val, mask; tps6586x_gpio_set(gc, offset, value); val = 0x1 << (offset * 2); mask = 0x3 << (offset * 2); return tps6586x_update(tps6586x_gpio->parent, TPS6586X_GPIOSET1, val, mask); }