Lines Matching defs:gpio
23 #include <linux/gpio/driver.h>
1605 static int cp210x_gpio_get(struct gpio_chip *gc, unsigned int gpio)
1626 return !!(buf & BIT(gpio));
1629 static void cp210x_gpio_set(struct gpio_chip *gc, unsigned int gpio, int value)
1637 buf.state = BIT(gpio);
1641 buf.mask = BIT(gpio);
1672 static int cp210x_gpio_direction_get(struct gpio_chip *gc, unsigned int gpio)
1677 return priv->gpio_input & BIT(gpio);
1680 static int cp210x_gpio_direction_input(struct gpio_chip *gc, unsigned int gpio)
1691 if (priv->gpio_pushpull & BIT(gpio))
1695 cp210x_gpio_set(gc, gpio, 1);
1697 priv->gpio_input |= BIT(gpio);
1702 static int cp210x_gpio_direction_output(struct gpio_chip *gc, unsigned int gpio,
1708 priv->gpio_input &= ~BIT(gpio);
1709 cp210x_gpio_set(gc, gpio, value);
1714 static int cp210x_gpio_set_config(struct gpio_chip *gc, unsigned int gpio,
1723 (priv->gpio_pushpull & BIT(gpio)))
1727 !(priv->gpio_pushpull & BIT(gpio)))