Lines Matching +full:irq +full:- +full:push +full:- +full:pull
1 // SPDX-License-Identifier: GPL-2.0+
22 #include <linux/mfd/wm831x/irq.h>
32 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_direction_in()
35 if (wm831x->has_gpio_ena) in wm831x_gpio_direction_in()
46 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_get()
62 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_set()
72 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_direction_out()
76 if (wm831x->has_gpio_ena) in wm831x_gpio_direction_out()
94 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_to_irq()
96 return irq_create_mapping(wm831x->irq_domain, in wm831x_gpio_to_irq()
116 return -EBUSY; in wm831x_gpio_set_debounce()
124 return -EINVAL; in wm831x_gpio_set_debounce()
133 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_set_config()
150 return -ENOTSUPP; in wm831x_set_config()
157 struct wm831x *wm831x = wm831x_gpio->wm831x; in wm831x_gpio_dbg_show()
160 for (i = 0; i < chip->ngpio; i++) { in wm831x_gpio_dbg_show()
161 int gpio = i + chip->base; in wm831x_gpio_dbg_show()
163 const char *label, *pull, *powerdomain; in wm831x_gpio_dbg_show() local
174 seq_printf(s, " gpio-%-3d (%-20.20s) ", gpio, label); in wm831x_gpio_dbg_show()
178 dev_err(wm831x->dev, in wm831x_gpio_dbg_show()
187 pull = "nopull"; in wm831x_gpio_dbg_show()
190 pull = "pulldown"; in wm831x_gpio_dbg_show()
193 pull = "pullup"; in wm831x_gpio_dbg_show()
196 pull = "INVALID PULL"; in wm831x_gpio_dbg_show()
227 if (wm831x->has_gpio_ena) in wm831x_gpio_dbg_show()
234 pull, in wm831x_gpio_dbg_show()
237 reg & WM831X_GPN_OD ? "open-drain" : "push-pull", in wm831x_gpio_dbg_show()
261 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); in wm831x_gpio_probe()
262 struct wm831x_pdata *pdata = &wm831x->pdata; in wm831x_gpio_probe()
265 device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent)); in wm831x_gpio_probe()
267 wm831x_gpio = devm_kzalloc(&pdev->dev, sizeof(*wm831x_gpio), in wm831x_gpio_probe()
270 return -ENOMEM; in wm831x_gpio_probe()
272 wm831x_gpio->wm831x = wm831x; in wm831x_gpio_probe()
273 wm831x_gpio->gpio_chip = template_chip; in wm831x_gpio_probe()
274 wm831x_gpio->gpio_chip.ngpio = wm831x->num_gpio; in wm831x_gpio_probe()
275 wm831x_gpio->gpio_chip.parent = &pdev->dev; in wm831x_gpio_probe()
276 if (pdata && pdata->gpio_base) in wm831x_gpio_probe()
277 wm831x_gpio->gpio_chip.base = pdata->gpio_base; in wm831x_gpio_probe()
279 wm831x_gpio->gpio_chip.base = -1; in wm831x_gpio_probe()
281 return devm_gpiochip_add_data(&pdev->dev, &wm831x_gpio->gpio_chip, wm831x_gpio); in wm831x_gpio_probe()
285 .driver.name = "wm831x-gpio",
304 MODULE_ALIAS("platform:wm831x-gpio");