Lines Matching defs:gpio
28 * Since Meson G12A SoC, the ao register ranges for gpio, pull enable
41 #include <linux/gpio/driver.h>
555 static int meson_gpio_get_direction(struct gpio_chip *chip, unsigned gpio)
560 ret = meson_pinconf_get_output(pc, gpio);
567 static int meson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
569 return meson_pinconf_set_output(gpiochip_get_data(chip), gpio, false);
572 static int meson_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
576 gpio, value);
579 static void meson_gpio_set(struct gpio_chip *chip, unsigned gpio, int value)
581 meson_pinconf_set_drive(gpiochip_get_data(chip), gpio, value);
584 static int meson_gpio_get(struct gpio_chip *chip, unsigned gpio)
591 ret = meson_get_bank(pc, gpio, &bank);
595 meson_calc_reg_and_bit(bank, gpio, REG_IN, ®, &bit);
623 dev_err(pc->dev, "can't add gpio chip %s\n",
668 if (!of_find_property(np, "gpio-controller", NULL))
671 dev_err(pc->dev, "multiple gpio nodes\n");
679 dev_err(pc->dev, "no gpio node found\n");
691 pc->reg_gpio = meson_map_resource(pc, gpio_np, "gpio");
693 dev_err(pc->dev, "gpio registers not found\n");