Lines Matching refs:pin

253 	int		pin;  member
305 #define ST_IRQ_RISING_EDGE_CONF(pin) \ argument
306 (ST_IRQ_EDGE_RISING << (pin * ST_IRQ_EDGE_CONF_BITS_PER_PIN))
308 #define ST_IRQ_FALLING_EDGE_CONF(pin) \ argument
309 (ST_IRQ_EDGE_FALLING << (pin * ST_IRQ_EDGE_CONF_BITS_PER_PIN))
311 #define ST_IRQ_BOTH_EDGE_CONF(pin) \ argument
312 (ST_IRQ_EDGE_BOTH << (pin * ST_IRQ_EDGE_CONF_BITS_PER_PIN))
314 #define ST_IRQ_EDGE_CONF(conf, pin) \ argument
315 (conf >> (pin * ST_IRQ_EDGE_CONF_BITS_PER_PIN) & ST_IRQ_EDGE_MASK)
404 struct pinctrl_dev *pctldev, int pin) in st_get_pio_control() argument
407 pinctrl_find_gpio_range_from_pin(pctldev, pin); in st_get_pio_control()
425 int pin, unsigned long config) in st_pinconf_set_config() argument
431 unsigned long mask = BIT(pin); in st_pinconf_set_config()
463 int pin = st_gpio_pin(pin_id); in st_pctl_set_function() local
464 int offset = pin * 4; in st_pctl_set_function()
475 static unsigned int st_pctl_get_pin_function(struct st_pio_control *pc, int pin) in st_pctl_get_pin_function() argument
479 int offset = pin * 4; in st_pctl_get_pin_function()
545 int enable, int pin) in st_regmap_field_bit_set_clear_pin() argument
551 val |= BIT(pin); in st_regmap_field_bit_set_clear_pin()
553 val &= ~BIT(pin); in st_regmap_field_bit_set_clear_pin()
558 struct st_pio_control *pc, unsigned long config, int pin) in st_pinconf_set_retime_packed() argument
565 ST_PINCONF_UNPACK_RT_CLK(config), pin); in st_pinconf_set_retime_packed()
568 ST_PINCONF_UNPACK_RT_CLKNOTDATA(config), pin); in st_pinconf_set_retime_packed()
571 ST_PINCONF_UNPACK_RT_DOUBLE_EDGE(config), pin); in st_pinconf_set_retime_packed()
574 ST_PINCONF_UNPACK_RT_INVERTCLK(config), pin); in st_pinconf_set_retime_packed()
577 ST_PINCONF_UNPACK_RT(config), pin); in st_pinconf_set_retime_packed()
582 st_regmap_field_bit_set_clear_pin(rt_p->delay_0, delay & 0x1, pin); in st_pinconf_set_retime_packed()
584 st_regmap_field_bit_set_clear_pin(rt_p->delay_1, delay & 0x2, pin); in st_pinconf_set_retime_packed()
589 struct st_pio_control *pc, unsigned long config, int pin) in st_pinconf_set_retime_dedicated() argument
612 regmap_field_write(rt_d->rt[pin], retime_config); in st_pinconf_set_retime_dedicated()
616 int pin, unsigned long *config) in st_pinconf_get_direction() argument
622 if (oe_value & BIT(pin)) in st_pinconf_get_direction()
628 if (pu_value & BIT(pin)) in st_pinconf_get_direction()
634 if (od_value & BIT(pin)) in st_pinconf_get_direction()
640 struct st_pio_control *pc, int pin, unsigned long *config) in st_pinconf_get_retime_packed() argument
647 if (!regmap_field_read(rt_p->retime, &val) && (val & BIT(pin))) in st_pinconf_get_retime_packed()
650 if (!regmap_field_read(rt_p->clk1notclk0, &val) && (val & BIT(pin))) in st_pinconf_get_retime_packed()
653 if (!regmap_field_read(rt_p->clknotdata, &val) && (val & BIT(pin))) in st_pinconf_get_retime_packed()
656 if (!regmap_field_read(rt_p->double_edge, &val) && (val & BIT(pin))) in st_pinconf_get_retime_packed()
659 if (!regmap_field_read(rt_p->invertclk, &val) && (val & BIT(pin))) in st_pinconf_get_retime_packed()
664 delay_bits = (((delay1 & BIT(pin)) ? 1 : 0) << 1) | in st_pinconf_get_retime_packed()
665 (((delay0 & BIT(pin)) ? 1 : 0)); in st_pinconf_get_retime_packed()
673 struct st_pio_control *pc, int pin, unsigned long *config) in st_pinconf_get_retime_dedicated() argument
680 regmap_field_read(rt_d->rt[pin], &value); in st_pinconf_get_retime_dedicated()
961 pc = st_get_pio_control(pctldev, conf[i].pin); in st_pmx_set_mux()
962 st_pctl_set_function(pc, conf[i].pin, conf[i].altfunc); in st_pmx_set_mux()
995 struct st_pio_control *pc, int pin, unsigned long *config) in st_pinconf_get_retime() argument
998 st_pinconf_get_retime_packed(info, pc, pin, config); in st_pinconf_get_retime()
1000 if ((BIT(pin) & pc->rt_pin_mask)) in st_pinconf_get_retime()
1002 pin, config); in st_pinconf_get_retime()
1006 struct st_pio_control *pc, int pin, unsigned long config) in st_pinconf_set_retime() argument
1009 st_pinconf_set_retime_packed(info, pc, config, pin); in st_pinconf_set_retime()
1011 if ((BIT(pin) & pc->rt_pin_mask)) in st_pinconf_set_retime()
1013 config, pin); in st_pinconf_set_retime()
1019 int pin = st_gpio_pin(pin_id); in st_pinconf_set() local
1025 st_pinconf_set_config(pc, pin, configs[i]); in st_pinconf_set()
1026 st_pinconf_set_retime(info, pc, pin, configs[i]); in st_pinconf_set()
1035 int pin = st_gpio_pin(pin_id); in st_pinconf_get() local
1040 st_pinconf_get_direction(pc, pin, config); in st_pinconf_get()
1041 st_pinconf_get_retime(info, pc, pin, config); in st_pinconf_get()
1265 conf->pin = of_get_named_gpio(pins, pp->name, 0); in st_pctl_dt_parse_groups()
1267 grp->pins[i] = conf->pin; in st_pctl_dt_parse_groups()
1346 int comp, pin = d->hwirq; in st_gpio_irq_set_type() local
1356 pin_edge_conf = ST_IRQ_FALLING_EDGE_CONF(pin); in st_gpio_irq_set_type()
1363 pin_edge_conf = ST_IRQ_RISING_EDGE_CONF(pin); in st_gpio_irq_set_type()
1366 comp = st_gpio_get(&bank->gpio_chip, pin); in st_gpio_irq_set_type()
1367 pin_edge_conf = ST_IRQ_BOTH_EDGE_CONF(pin); in st_gpio_irq_set_type()
1375 pin * ST_IRQ_EDGE_CONF_BITS_PER_PIN)); in st_gpio_irq_set_type()
1380 val &= ~BIT(pin); in st_gpio_irq_set_type()
1381 val |= (comp << pin); in st_gpio_irq_set_type()