Lines Matching full:pctl

175 static void sppctl_func_set(struct sppctl_pdata *pctl, u8 func, u8 val)  in sppctl_func_set()  argument
204 writel(reg, pctl->moon2_base + offset); in sppctl_func_set()
227 static void sppctl_gmx_set(struct sppctl_pdata *pctl, u8 reg_off, u8 bit_off, u8 bit_sz, in sppctl_gmx_set() argument
240 writel(reg, pctl->moon1_base + reg_off * 4); in sppctl_gmx_set()
523 static int sppctl_gpio_new(struct platform_device *pdev, struct sppctl_pdata *pctl) in sppctl_gpio_new() argument
532 pctl->spp_gchip = spp_gchip; in sppctl_gpio_new()
534 spp_gchip->gpioxt_base = pctl->gpioxt_base; in sppctl_gpio_new()
535 spp_gchip->first_base = pctl->first_base; in sppctl_gpio_new()
556 pctl->pctl_grange.npins = gchip->ngpio; in sppctl_gpio_new()
557 pctl->pctl_grange.name = gchip->label; in sppctl_gpio_new()
558 pctl->pctl_grange.gc = gchip; in sppctl_gpio_new()
570 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_pin_config_get() local
576 if (!sppctl_gpio_output_od_get(&pctl->spp_gchip->chip, pin)) in sppctl_pin_config_get()
582 if (!sppctl_first_get(&pctl->spp_gchip->chip, pin)) in sppctl_pin_config_get()
584 if (!sppctl_master_get(&pctl->spp_gchip->chip, pin)) in sppctl_pin_config_get()
586 if (sppctl_gpio_get_direction(&pctl->spp_gchip->chip, pin)) in sppctl_pin_config_get()
588 arg = sppctl_gpio_get(&pctl->spp_gchip->chip, pin); in sppctl_pin_config_get()
602 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_pin_config_set() local
607 sppctl_first_master_set(&pctl->spp_gchip->chip, pin, mux_f_gpio, mux_m_iop); in sppctl_pin_config_set()
613 sppctl_gpio_direction_output(&pctl->spp_gchip->chip, pin, 0); in sppctl_pin_config_set()
615 sppctl_gpio_direction_output(&pctl->spp_gchip->chip, pin, 1); in sppctl_pin_config_set()
617 sppctl_gpio_input_inv_set(&pctl->spp_gchip->chip, pin); in sppctl_pin_config_set()
619 sppctl_gpio_output_inv_set(&pctl->spp_gchip->chip, pin); in sppctl_pin_config_set()
621 sppctl_gpio_output_od_set(&pctl->spp_gchip->chip, pin, 1); in sppctl_pin_config_set()
647 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_get_function_groups() local
663 for (i = 0; i < pctl->unq_grps_sz; i++) in sppctl_get_function_groups()
664 if (pctl->g2fp_maps[i].f_idx == selector) in sppctl_get_function_groups()
666 *groups = &pctl->unq_grps[i]; in sppctl_get_function_groups()
702 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_set_mux() local
703 struct grp2fp_map g2fpm = pctl->g2fp_maps[group_selector]; in sppctl_set_mux()
708 sppctl_first_master_set(&pctl->spp_gchip->chip, group_selector, in sppctl_set_mux()
710 sppctl_func_set(pctl, func_selector, sppctl_fully_pinmux_conv(group_selector)); in sppctl_set_mux()
715 sppctl_first_master_set(&pctl->spp_gchip->chip, in sppctl_set_mux()
718 sppctl_gmx_set(pctl, f->roff, f->boff, f->blen, f->grps[g2fpm.g_idx].gval); in sppctl_set_mux()
733 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_gpio_request_enable() local
736 g_f = sppctl_first_get(&pctl->spp_gchip->chip, offset); in sppctl_gpio_request_enable()
737 g_m = sppctl_master_get(&pctl->spp_gchip->chip, offset); in sppctl_gpio_request_enable()
741 sppctl_first_master_set(&pctl->spp_gchip->chip, offset, mux_f_gpio, mux_m_gpio); in sppctl_gpio_request_enable()
756 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_get_groups_count() local
758 return pctl->unq_grps_sz; in sppctl_get_groups_count()
763 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_get_group_name() local
765 return pctl->unq_grps[selector]; in sppctl_get_group_name()
771 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_get_group_pins() local
772 struct grp2fp_map g2fpm = pctl->g2fp_maps[selector]; in sppctl_get_group_pins()
802 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_pin_dbg_show() local
806 first = sppctl_first_get(&pctl->spp_gchip->chip, offset); in sppctl_pin_dbg_show()
807 master = sppctl_master_get(&pctl->spp_gchip->chip, offset); in sppctl_pin_dbg_show()
822 struct sppctl_pdata *pctl = pinctrl_dev_get_drvdata(pctldev); in sppctl_dt_node_to_map() local
950 sppctl_func_set(pctl, dt_fun, 0); in sppctl_dt_node_to_map()
955 sppctl_gmx_set(pctl, f->roff, f->boff, f->blen, 0); in sppctl_dt_node_to_map()
1111 { .compatible = "sunplus,sp7021-pctl" },