• Home
  • Raw
  • Download

Lines Matching refs:gpio

46 static int mb86s70_gpio_request(struct gpio_chip *gc, unsigned gpio)  in mb86s70_gpio_request()  argument
54 val = readl(gchip->base + PFR(gpio)); in mb86s70_gpio_request()
55 if (!(val & OFFSET(gpio))) { in mb86s70_gpio_request()
60 val &= ~OFFSET(gpio); in mb86s70_gpio_request()
61 writel(val, gchip->base + PFR(gpio)); in mb86s70_gpio_request()
68 static void mb86s70_gpio_free(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_free() argument
76 val = readl(gchip->base + PFR(gpio)); in mb86s70_gpio_free()
77 val |= OFFSET(gpio); in mb86s70_gpio_free()
78 writel(val, gchip->base + PFR(gpio)); in mb86s70_gpio_free()
83 static int mb86s70_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_direction_input() argument
91 val = readl(gchip->base + DDR(gpio)); in mb86s70_gpio_direction_input()
92 val &= ~OFFSET(gpio); in mb86s70_gpio_direction_input()
93 writel(val, gchip->base + DDR(gpio)); in mb86s70_gpio_direction_input()
101 unsigned gpio, int value) in mb86s70_gpio_direction_output() argument
109 val = readl(gchip->base + PDR(gpio)); in mb86s70_gpio_direction_output()
111 val |= OFFSET(gpio); in mb86s70_gpio_direction_output()
113 val &= ~OFFSET(gpio); in mb86s70_gpio_direction_output()
114 writel(val, gchip->base + PDR(gpio)); in mb86s70_gpio_direction_output()
116 val = readl(gchip->base + DDR(gpio)); in mb86s70_gpio_direction_output()
117 val |= OFFSET(gpio); in mb86s70_gpio_direction_output()
118 writel(val, gchip->base + DDR(gpio)); in mb86s70_gpio_direction_output()
125 static int mb86s70_gpio_get(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_get() argument
129 return !!(readl(gchip->base + PDR(gpio)) & OFFSET(gpio)); in mb86s70_gpio_get()
132 static void mb86s70_gpio_set(struct gpio_chip *gc, unsigned gpio, int value) in mb86s70_gpio_set() argument
140 val = readl(gchip->base + PDR(gpio)); in mb86s70_gpio_set()
142 val |= OFFSET(gpio); in mb86s70_gpio_set()
144 val &= ~OFFSET(gpio); in mb86s70_gpio_set()
145 writel(val, gchip->base + PDR(gpio)); in mb86s70_gpio_set()