Lines Matching +full:gpio +full:- +full:poweroff
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Toggles a GPIO pin to power down a device
15 #include <linux/gpio/consumer.h>
33 /* drive it active, also inactive->active edge */ in gpio_poweroff_do_poweroff()
37 /* drive inactive, also active->inactive edge */ in gpio_poweroff_do_poweroff()
41 /* drive it active, also inactive->active edge */ in gpio_poweroff_do_poweroff()
57 dev_err(&pdev->dev, in gpio_poweroff_probe()
60 return -EBUSY; in gpio_poweroff_probe()
63 input = device_property_read_bool(&pdev->dev, "input"); in gpio_poweroff_probe()
69 device_property_read_u32(&pdev->dev, "active-delay-ms", &active_delay); in gpio_poweroff_probe()
70 device_property_read_u32(&pdev->dev, "inactive-delay-ms", in gpio_poweroff_probe()
72 device_property_read_u32(&pdev->dev, "timeout-ms", &timeout); in gpio_poweroff_probe()
74 reset_gpio = devm_gpiod_get(&pdev->dev, NULL, flags); in gpio_poweroff_probe()
91 { .compatible = "gpio-poweroff", },
100 .name = "poweroff-gpio",
108 MODULE_DESCRIPTION("GPIO poweroff driver");
109 MODULE_ALIAS("platform:poweroff-gpio");