Lines Matching refs:pin

70 			      uint16_t pin, bool peripheral)  in pfc_rcar_set_gpsr()  argument
74 uint8_t bank = pin / 32; in pfc_rcar_set_gpsr()
79 uint8_t bit = pin % 32; in pfc_rcar_set_gpsr()
103 static uint32_t pfc_rcar_get_drive_reg(uint16_t pin, uint8_t *offset, in pfc_rcar_get_drive_reg() argument
110 if (drive_regs->fields[i].pin == pin) { in pfc_rcar_get_drive_reg()
127 static int pfc_rcar_set_drive_strength(uintptr_t pfc_base, uint16_t pin, in pfc_rcar_set_drive_strength() argument
133 reg = pfc_rcar_get_drive_reg(pin, &offset, &size); in pfc_rcar_set_drive_strength()
157 static const struct pfc_bias_reg *pfc_rcar_get_bias_reg(uint16_t pin, in pfc_rcar_get_bias_reg() argument
165 if (bias_regs->pins[i] == pin) { in pfc_rcar_get_bias_reg()
176 int pfc_rcar_set_bias(uintptr_t pfc_base, uint16_t pin, uint16_t flags) in pfc_rcar_set_bias() argument
180 const struct pfc_bias_reg *bias_reg = pfc_rcar_get_bias_reg(pin, &bit); in pfc_rcar_set_bias()
252 static const struct pfc_pocctrl_reg *pfc_rcar_get_pocctrl_reg(uint16_t pin, uint8_t *bit) in pfc_rcar_get_pocctrl_reg() argument
263 if (voltage_regs->pins[i] == pin) { in pfc_rcar_get_pocctrl_reg()
274 static void pfc_rcar_set_voltage(uintptr_t pfc_base, uint16_t pin, uint16_t voltage) in pfc_rcar_set_voltage() argument
280 voltage_reg = pfc_rcar_get_pocctrl_reg(pin, &bit); in pfc_rcar_set_voltage()
308 int pinctrl_configure_pin(const pinctrl_soc_pin_t *pin) in pinctrl_configure_pin() argument
314 ret = pfc_rcar_get_reg_index(pin->pin, &reg_index); in pinctrl_configure_pin()
326 if (RCAR_IS_GP_PIN(pin->pin)) { in pinctrl_configure_pin()
327 pfc_rcar_set_gpsr(pfc_base, pin->pin, false); in pinctrl_configure_pin()
328 } else if ((pin->flags & RCAR_PIN_FLAGS_FUNC_SET) == 0U) { in pinctrl_configure_pin()
334 if (pin->voltage != PIN_VOLTAGE_NONE) { in pinctrl_configure_pin()
335 pfc_rcar_set_voltage(pfc_base, pin->pin, pin->voltage); in pinctrl_configure_pin()
340 if ((pin->flags & RCAR_PIN_FLAGS_FUNC_SET) != 0U) { in pinctrl_configure_pin()
342 if ((pin->flags & RCAR_PIN_FLAGS_FUNC_DUMMY) == 0U) { in pinctrl_configure_pin()
343 pfc_rcar_set_ipsr(pfc_base, &pin->func); in pinctrl_configure_pin()
346 if (RCAR_IS_GP_PIN(pin->pin)) { in pinctrl_configure_pin()
347 pfc_rcar_set_gpsr(pfc_base, pin->pin, true); in pinctrl_configure_pin()
350 if ((pin->flags & RCAR_PIN_FLAGS_PULL_SET) != 0U) { in pinctrl_configure_pin()
351 ret = pfc_rcar_set_bias(pfc_base, pin->pin, pin->flags); in pinctrl_configure_pin()
358 if (pin->drive_strength != 0U) { in pinctrl_configure_pin()
359 ret = pfc_rcar_set_drive_strength(pfc_base, pin->pin, in pinctrl_configure_pin()
360 pin->drive_strength); in pinctrl_configure_pin()