Lines Matching refs:gpio
22 #include <linux/gpio/driver.h>
1465 static int cp210x_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1504 return !!(mask & BIT(gpio));
1507 static void cp210x_gpio_set(struct gpio_chip *gc, unsigned int gpio, int value)
1518 state = BIT(gpio);
1522 mask = BIT(gpio);
1565 static int cp210x_gpio_direction_get(struct gpio_chip *gc, unsigned int gpio)
1570 return priv->gpio_input & BIT(gpio);
1573 static int cp210x_gpio_direction_input(struct gpio_chip *gc, unsigned int gpio)
1584 if (priv->gpio_pushpull & BIT(gpio))
1588 cp210x_gpio_set(gc, gpio, 1);
1590 priv->gpio_input |= BIT(gpio);
1595 static int cp210x_gpio_direction_output(struct gpio_chip *gc, unsigned int gpio,
1601 priv->gpio_input &= ~BIT(gpio);
1602 cp210x_gpio_set(gc, gpio, value);
1607 static int cp210x_gpio_set_config(struct gpio_chip *gc, unsigned int gpio,
1616 (priv->gpio_pushpull & BIT(gpio)))
1620 !(priv->gpio_pushpull & BIT(gpio)))