Lines Matching refs:gpios
39 struct gpio_desc *gpios[3]; member
47 if (priv.gpios[2]) { in simatic_ipc_batt_read_gpio()
48 gpiod_set_value(priv.gpios[2], 1); in simatic_ipc_batt_read_gpio()
52 if (gpiod_get_value_cansleep(priv.gpios[0])) in simatic_ipc_batt_read_gpio()
54 else if (gpiod_get_value_cansleep(priv.gpios[1])) in simatic_ipc_batt_read_gpio()
57 if (priv.gpios[2]) in simatic_ipc_batt_read_gpio()
58 gpiod_set_value(priv.gpios[2], 0); in simatic_ipc_batt_read_gpio()
181 priv.gpios[0] = devm_gpiod_get_index(dev, "CMOSBattery empty", 0, GPIOD_IN); in simatic_ipc_batt_probe()
182 if (IS_ERR(priv.gpios[0])) { in simatic_ipc_batt_probe()
183 err = PTR_ERR(priv.gpios[0]); in simatic_ipc_batt_probe()
184 priv.gpios[0] = NULL; in simatic_ipc_batt_probe()
187 priv.gpios[1] = devm_gpiod_get_index(dev, "CMOSBattery low", 1, GPIOD_IN); in simatic_ipc_batt_probe()
188 if (IS_ERR(priv.gpios[1])) { in simatic_ipc_batt_probe()
189 err = PTR_ERR(priv.gpios[1]); in simatic_ipc_batt_probe()
190 priv.gpios[1] = NULL; in simatic_ipc_batt_probe()
199 priv.gpios[2] = devm_gpiod_get_index(dev, "CMOSBattery meter", 2, flags); in simatic_ipc_batt_probe()
200 if (IS_ERR(priv.gpios[2])) { in simatic_ipc_batt_probe()
201 err = PTR_ERR(priv.gpios[2]); in simatic_ipc_batt_probe()
202 priv.gpios[2] = NULL; in simatic_ipc_batt_probe()
206 priv.gpios[2] = NULL; in simatic_ipc_batt_probe()