Lines Matching full:pctl

264 *find_pinbank_via_pin(struct eqbr_pinctrl_drv_data *pctl, unsigned int pin)  in find_pinbank_via_pin()  argument
269 for (i = 0; i < pctl->nr_banks; i++) { in find_pinbank_via_pin()
270 bank = &pctl->pin_banks[i]; in find_pinbank_via_pin()
287 static int eqbr_set_pin_mux(struct eqbr_pinctrl_drv_data *pctl, in eqbr_set_pin_mux() argument
295 bank = find_pinbank_via_pin(pctl, pin); in eqbr_set_pin_mux()
297 dev_err(pctl->dev, "Couldn't find pin bank for pin %u\n", pin); in eqbr_set_pin_mux()
304 dev_err(pctl->dev, in eqbr_set_pin_mux()
310 raw_spin_lock_irqsave(&pctl->lock, flags); in eqbr_set_pin_mux()
312 raw_spin_unlock_irqrestore(&pctl->lock, flags); in eqbr_set_pin_mux()
319 struct eqbr_pinctrl_drv_data *pctl = pinctrl_dev_get_drvdata(pctldev); in eqbr_pinmux_set_mux() local
335 eqbr_set_pin_mux(pctl, pinmux[i], grp->grp.pins[i]); in eqbr_pinmux_set_mux()
344 struct eqbr_pinctrl_drv_data *pctl = pinctrl_dev_get_drvdata(pctldev); in eqbr_pinmux_gpio_request() local
346 return eqbr_set_pin_mux(pctl, EQBR_GPIO_MODE, pin); in eqbr_pinmux_gpio_request()
367 *get_gpio_ctrls_via_bank(struct eqbr_pinctrl_drv_data *pctl, in get_gpio_ctrls_via_bank() argument
372 for (i = 0; i < pctl->nr_gpio_ctrls; i++) { in get_gpio_ctrls_via_bank()
373 if (pctl->gpio_ctrls[i].bank == bank) in get_gpio_ctrls_via_bank()
374 return &pctl->gpio_ctrls[i]; in get_gpio_ctrls_via_bank()
383 struct eqbr_pinctrl_drv_data *pctl = pinctrl_dev_get_drvdata(pctldev); in eqbr_pinconf_get() local
392 bank = find_pinbank_via_pin(pctl, pin); in eqbr_pinconf_get()
394 dev_err(pctl->dev, "Couldn't find pin bank for pin %u\n", pin); in eqbr_pinconf_get()
401 dev_err(pctl->dev, in eqbr_pinconf_get()
407 raw_spin_lock_irqsave(&pctl->lock, flags); in eqbr_pinconf_get()
425 gctrl = get_gpio_ctrls_via_bank(pctl, bank); in eqbr_pinconf_get()
427 dev_err(pctl->dev, "Failed to find gpio via bank pinbase: %u, pin: %u\n", in eqbr_pinconf_get()
429 raw_spin_unlock_irqrestore(&pctl->lock, flags); in eqbr_pinconf_get()
435 raw_spin_unlock_irqrestore(&pctl->lock, flags); in eqbr_pinconf_get()
438 raw_spin_unlock_irqrestore(&pctl->lock, flags); in eqbr_pinconf_get()
447 struct eqbr_pinctrl_drv_data *pctl = pinctrl_dev_get_drvdata(pctldev); in eqbr_pinconf_set() local
462 bank = find_pinbank_via_pin(pctl, pin); in eqbr_pinconf_set()
464 dev_err(pctl->dev, in eqbr_pinconf_set()
494 gctrl = get_gpio_ctrls_via_bank(pctl, bank); in eqbr_pinconf_set()
496 dev_err(pctl->dev, "Failed to find gpio via bank pinbase: %u, pin: %u\n", in eqbr_pinconf_set()
507 raw_spin_lock_irqsave(&pctl->lock, flags); in eqbr_pinconf_set()
511 raw_spin_unlock_irqrestore(&pctl->lock, flags); in eqbr_pinconf_set()