Lines Matching +full:gpio +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/gpio/consumer.h>
8 #include <linux/reset-controller.h>
12 struct gpio_desc *reset; member
25 gpiod_set_value_cansleep(priv->reset, 1); in reset_gpio_assert()
35 gpiod_set_value_cansleep(priv->reset, 0); in reset_gpio_deassert()
44 return gpiod_get_value_cansleep(priv->reset); in reset_gpio_status()
56 return reset_spec->args[0]; in reset_gpio_of_xlate()
66 struct device *dev = &pdev->dev; in reset_gpio_probe()
72 return -EINVAL; in reset_gpio_probe()
76 return -ENOMEM; in reset_gpio_probe()
78 platform_set_drvdata(pdev, &priv->rc); in reset_gpio_probe()
80 priv->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); in reset_gpio_probe()
81 if (IS_ERR(priv->reset)) in reset_gpio_probe()
82 return dev_err_probe(dev, PTR_ERR(priv->reset), in reset_gpio_probe()
83 "Could not get reset gpios\n"); in reset_gpio_probe()
85 priv->rc.ops = &reset_gpio_ops; in reset_gpio_probe()
86 priv->rc.owner = THIS_MODULE; in reset_gpio_probe()
87 priv->rc.dev = dev; in reset_gpio_probe()
88 priv->rc.of_args = platdata; in reset_gpio_probe()
90 priv->rc.of_node); in reset_gpio_probe()
94 /* Cells to match GPIO specifier, but it's not really used */ in reset_gpio_probe()
95 priv->rc.of_reset_n_cells = 2; in reset_gpio_probe()
96 priv->rc.of_xlate = reset_gpio_of_xlate; in reset_gpio_probe()
97 priv->rc.nr_resets = 1; in reset_gpio_probe()
99 return devm_reset_controller_register(dev, &priv->rc); in reset_gpio_probe()
103 { .name = "reset-gpio", },
112 .name = "reset-gpio",
118 MODULE_DESCRIPTION("Generic GPIO reset driver");