Lines Matching +full:irq +full:- +full:push +full:- +full:pull
1 // SPDX-License-Identifier: GPL-2.0+
23 #include <linux/mfd/wm831x/irq.h>
33 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_direction_in()
36 if (wm831x->has_gpio_ena) in wm831x_gpio_direction_in()
47 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_get()
63 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_set()
73 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_direction_out()
77 if (wm831x->has_gpio_ena) in wm831x_gpio_direction_out()
95 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_to_irq()
97 return irq_create_mapping(wm831x->irq_domain, in wm831x_gpio_to_irq()
117 return -EBUSY; in wm831x_gpio_set_debounce()
125 return -EINVAL; in wm831x_gpio_set_debounce()
134 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_set_config()
151 return -ENOTSUPP; in wm831x_set_config()
158 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_dbg_show()
161 for (i = 0; i < chip->ngpio; i++) { in wm831x_gpio_dbg_show()
162 int gpio = i + chip->base; in wm831x_gpio_dbg_show()
164 const char *pull, *powerdomain; in wm831x_gpio_dbg_show() local
173 dev_err(wm831x->dev, "Failed to duplicate label\n"); in wm831x_gpio_dbg_show()
177 seq_printf(s, " gpio-%-3d (%-20.20s) ", in wm831x_gpio_dbg_show()
182 dev_err(wm831x->dev, in wm831x_gpio_dbg_show()
191 pull = "nopull"; in wm831x_gpio_dbg_show()
194 pull = "pulldown"; in wm831x_gpio_dbg_show()
197 pull = "pullup"; in wm831x_gpio_dbg_show()
200 pull = "INVALID PULL"; in wm831x_gpio_dbg_show()
231 if (wm831x->has_gpio_ena) in wm831x_gpio_dbg_show()
238 pull, in wm831x_gpio_dbg_show()
241 reg & WM831X_GPN_OD ? "open-drain" : "push-pull", in wm831x_gpio_dbg_show()
265 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_gpio_probe()
266 struct wm831x_pdata *pdata = &wm831x->pdata; in wm831x_gpio_probe()
269 device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent)); in wm831x_gpio_probe()
271 wm831x_gpio = devm_kzalloc(&pdev->dev, sizeof(*wm831x_gpio), in wm831x_gpio_probe()
274 return -ENOMEM; in wm831x_gpio_probe()
276 wm831x_gpio->wm831x = wm831x; in wm831x_gpio_probe()
277 wm831x_gpio->gpio_chip = template_chip; in wm831x_gpio_probe()
278 wm831x_gpio->gpio_chip.ngpio = wm831x->num_gpio; in wm831x_gpio_probe()
279 wm831x_gpio->gpio_chip.parent = &pdev->dev; in wm831x_gpio_probe()
280 if (pdata && pdata->gpio_base) in wm831x_gpio_probe()
281 wm831x_gpio->gpio_chip.base = pdata->gpio_base; in wm831x_gpio_probe()
283 wm831x_gpio->gpio_chip.base = -1; in wm831x_gpio_probe()
285 return devm_gpiochip_add_data(&pdev->dev, &wm831x_gpio->gpio_chip, wm831x_gpio); in wm831x_gpio_probe()
289 .driver.name = "wm831x-gpio",
308 MODULE_ALIAS("platform:wm831x-gpio");