static int vx855gpio_direction_output(struct gpio_chip *gpio, unsigned int nr, int val) { /* True GPI cannot be switched to output mode */ if (nr < NR_VX855_GPI) return -EINVAL; /* True GPO don't need to be switched to output mode, * and GPIO are open-drain, i.e. also need no switching, * so all we do is set the level */ vx855gpio_set(gpio, nr, val); return 0; }
static int vx855gpio_direction_output(struct gpio_chip *gpio, unsigned int nr, int val) { /* */ if (nr < NR_VX855_GPI) return -EINVAL; /* */ vx855gpio_set(gpio, nr, val); return 0; }