Lines Matching defs:gpio
14 #include <drivers/gpio.h>
166 /* Restore old state of gpio clock, assuming it is running now */
178 static int get_pull(int gpio)
180 uint32_t port = GET_GPIO_PORT(gpio);
181 uint32_t bank = GET_GPIO_BANK(gpio);
182 uint32_t id = GET_GPIO_ID(gpio);
190 clock_state = gpio_get_clock(gpio);
192 gpio_put_clock(gpio, clock_state);
197 static void set_pull(int gpio, int pull)
199 uint32_t port = GET_GPIO_PORT(gpio);
200 uint32_t bank = GET_GPIO_BANK(gpio);
201 uint32_t id = GET_GPIO_ID(gpio);
213 clock_state = gpio_get_clock(gpio);
218 gpio_put_clock(gpio, clock_state);
221 static void set_direction(int gpio, int direction)
223 uint32_t port = GET_GPIO_PORT(gpio);
224 uint32_t num = GET_GPIO_NUM(gpio);
229 clock_state = gpio_get_clock(gpio);
232 * in gpio.h
235 * but rk3399 gpio direction 1: output, 0: input
242 gpio_put_clock(gpio, clock_state);
245 static int get_direction(int gpio)
247 uint32_t port = GET_GPIO_PORT(gpio);
248 uint32_t num = GET_GPIO_NUM(gpio);
253 clock_state = gpio_get_clock(gpio);
256 * in gpio.h
259 * but rk3399 gpio direction 1: output, 0: input
265 gpio_put_clock(gpio, clock_state);
270 static int get_value(int gpio)
272 uint32_t port = GET_GPIO_PORT(gpio);
273 uint32_t num = GET_GPIO_NUM(gpio);
278 clock_state = gpio_get_clock(gpio);
281 gpio_put_clock(gpio, clock_state);
286 static void set_value(int gpio, int value)
288 uint32_t port = GET_GPIO_PORT(gpio);
289 uint32_t num = GET_GPIO_NUM(gpio);
294 clock_state = gpio_get_clock(gpio);
300 gpio_put_clock(gpio, clock_state);