Lines Matching refs:gpio_chip
85 struct gpio_chip gpio_chip; member
103 static int stmfx_gpio_get(struct gpio_chip *gc, unsigned int offset) in stmfx_gpio_get()
116 static void stmfx_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) in stmfx_gpio_set()
126 static int stmfx_gpio_get_direction(struct gpio_chip *gc, unsigned int offset) in stmfx_gpio_get_direction()
147 static int stmfx_gpio_direction_input(struct gpio_chip *gc, unsigned int offset) in stmfx_gpio_direction_input()
156 static int stmfx_gpio_direction_output(struct gpio_chip *gc, in stmfx_gpio_direction_output()
227 dir = stmfx_gpio_get_direction(&pctl->gpio_chip, pin); in stmfx_pinconf_get()
269 ret = stmfx_gpio_get(&pctl->gpio_chip, pin); in stmfx_pinconf_get()
333 ret = stmfx_gpio_direction_output(&pctl->gpio_chip, in stmfx_pinconf_set()
357 dir = stmfx_gpio_get_direction(&pctl->gpio_chip, offset); in stmfx_pinconf_dbg_show()
366 val = stmfx_gpio_get(&pctl->gpio_chip, offset); in stmfx_pinconf_dbg_show()
422 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_mask() local
423 struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); in stmfx_pinctrl_irq_mask()
432 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_unmask() local
433 struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); in stmfx_pinctrl_irq_unmask()
442 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_set_type() local
443 struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); in stmfx_pinctrl_irq_set_type()
480 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_bus_lock() local
481 struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); in stmfx_pinctrl_irq_bus_lock()
488 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_bus_sync_unlock() local
489 struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); in stmfx_pinctrl_irq_bus_sync_unlock()
499 if (stmfx_gpio_get(gpio_chip, data->hwirq)) in stmfx_pinctrl_irq_bus_sync_unlock()
517 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_gpio_irq_request_resources() local
520 ret = stmfx_gpio_direction_input(gpio_chip, data->hwirq); in stmfx_gpio_irq_request_resources()
524 return gpiochip_reqres_irq(gpio_chip, data->hwirq); in stmfx_gpio_irq_request_resources()
529 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_gpio_irq_release_resources() local
531 return gpiochip_relres_irq(gpio_chip, data->hwirq); in stmfx_gpio_irq_release_resources()
544 val = stmfx_gpio_get(&pctl->gpio_chip, offset); in stmfx_pinctrl_irq_toggle_trigger()
565 struct gpio_chip *gc = &pctl->gpio_chip; in stmfx_pinctrl_irq_thread_fn()
667 pctl->gpio_chip.label = "stmfx-gpio"; in stmfx_pinctrl_probe()
668 pctl->gpio_chip.parent = pctl->dev; in stmfx_pinctrl_probe()
669 pctl->gpio_chip.get_direction = stmfx_gpio_get_direction; in stmfx_pinctrl_probe()
670 pctl->gpio_chip.direction_input = stmfx_gpio_direction_input; in stmfx_pinctrl_probe()
671 pctl->gpio_chip.direction_output = stmfx_gpio_direction_output; in stmfx_pinctrl_probe()
672 pctl->gpio_chip.get = stmfx_gpio_get; in stmfx_pinctrl_probe()
673 pctl->gpio_chip.set = stmfx_gpio_set; in stmfx_pinctrl_probe()
674 pctl->gpio_chip.set_config = gpiochip_generic_config; in stmfx_pinctrl_probe()
675 pctl->gpio_chip.base = -1; in stmfx_pinctrl_probe()
676 pctl->gpio_chip.ngpio = pctl->pctl_desc.npins; in stmfx_pinctrl_probe()
677 pctl->gpio_chip.can_sleep = true; in stmfx_pinctrl_probe()
678 pctl->gpio_chip.of_node = np; in stmfx_pinctrl_probe()
689 girq = &pctl->gpio_chip.irq; in stmfx_pinctrl_probe()
699 ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl); in stmfx_pinctrl_probe()