Lines Matching full:gpios
34 struct gpio_desc *gpios[NUM_GPIOS]; member
46 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST0]) ? (1 << 0) : 0; in a21_wdt_get_bootstatus()
47 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST1]) ? (1 << 1) : 0; in a21_wdt_get_bootstatus()
48 reset |= gpiod_get_value(drv->gpios[GPIO_WD_RST2]) ? (1 << 2) : 0; in a21_wdt_get_bootstatus()
57 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 1); in a21_wdt_start()
66 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0); in a21_wdt_stop()
75 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 0); in a21_wdt_ping()
77 gpiod_set_value(drv->gpios[GPIO_WD_TRIG], 1); in a21_wdt_ping()
99 gpiod_set_value(drv->gpios[GPIO_WD_FAST], 1); in a21_wdt_set_timeout()
101 gpiod_set_value(drv->gpios[GPIO_WD_FAST], 0); in a21_wdt_set_timeout()
143 dev_err(dev, "gpios DT property wrong, got %d want %d", in a21_wdt_probe()
148 /* Request the used GPIOs */ in a21_wdt_probe()
156 drv->gpios[i] = devm_gpiod_get_index(dev, NULL, i, gflags); in a21_wdt_probe()
157 if (IS_ERR(drv->gpios[i])) in a21_wdt_probe()
158 return PTR_ERR(drv->gpios[i]); in a21_wdt_probe()
160 gpiod_set_consumer_name(drv->gpios[i], "MEN A21 Watchdog"); in a21_wdt_probe()
163 * Retrieve the initial value from the GPIOs that should be in a21_wdt_probe()
169 val = gpiod_get_value(drv->gpios[i]); in a21_wdt_probe()
170 gpiod_direction_output(drv->gpios[i], val); in a21_wdt_probe()
205 gpiod_set_value(drv->gpios[GPIO_WD_ENAB], 0); in a21_wdt_shutdown()