• Home
  • Raw
  • Download

Lines Matching refs:bank

658 static void rockchip_get_recalced_mux(struct rockchip_pin_bank *bank, int pin,  in rockchip_get_recalced_mux()  argument
661 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_get_recalced_mux()
668 if (data->num == bank->bank_num && in rockchip_get_recalced_mux()
1018 static bool rockchip_get_mux_route(struct rockchip_pin_bank *bank, int pin, in rockchip_get_mux_route() argument
1021 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_get_mux_route()
1028 if ((data->bank_num == bank->bank_num) && in rockchip_get_mux_route()
1043 static int rockchip_get_mux(struct rockchip_pin_bank *bank, int pin) in rockchip_get_mux() argument
1045 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_get_mux()
1056 if (bank->iomux[iomux_num].type & IOMUX_UNROUTED) { in rockchip_get_mux()
1061 if (bank->iomux[iomux_num].type & IOMUX_GPIO_ONLY) in rockchip_get_mux()
1064 if (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU) in rockchip_get_mux()
1066 else if (bank->iomux[iomux_num].type & IOMUX_L_SOURCE_PMU) in rockchip_get_mux()
1072 mux_type = bank->iomux[iomux_num].type; in rockchip_get_mux()
1073 reg = bank->iomux[iomux_num].offset; in rockchip_get_mux()
1089 if (bank->recalced_mask & BIT(pin)) in rockchip_get_mux()
1090 rockchip_get_recalced_mux(bank, pin, &reg, &bit, &mask); in rockchip_get_mux()
1093 if (bank->bank_num == 0) { in rockchip_get_mux()
1108 } else if (bank->bank_num > 0) { in rockchip_get_mux()
1120 static int rockchip_verify_mux(struct rockchip_pin_bank *bank, in rockchip_verify_mux() argument
1123 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_verify_mux()
1130 if (bank->iomux[iomux_num].type & IOMUX_UNROUTED) { in rockchip_verify_mux()
1135 if (bank->iomux[iomux_num].type & IOMUX_GPIO_ONLY) { in rockchip_verify_mux()
1158 static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux) in rockchip_set_mux() argument
1160 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_set_mux()
1169 ret = rockchip_verify_mux(bank, pin, mux); in rockchip_set_mux()
1173 if (bank->iomux[iomux_num].type & IOMUX_GPIO_ONLY) in rockchip_set_mux()
1176 dev_dbg(dev, "setting mux of GPIO%d-%d to %d\n", bank->bank_num, pin, mux); in rockchip_set_mux()
1178 if (bank->iomux[iomux_num].type & IOMUX_SOURCE_PMU) in rockchip_set_mux()
1180 else if (bank->iomux[iomux_num].type & IOMUX_L_SOURCE_PMU) in rockchip_set_mux()
1186 mux_type = bank->iomux[iomux_num].type; in rockchip_set_mux()
1187 reg = bank->iomux[iomux_num].offset; in rockchip_set_mux()
1203 if (bank->recalced_mask & BIT(pin)) in rockchip_set_mux()
1204 rockchip_get_recalced_mux(bank, pin, &reg, &bit, &mask); in rockchip_set_mux()
1207 if (bank->bank_num == 0) { in rockchip_set_mux()
1238 } else if (bank->bank_num > 0) { in rockchip_set_mux()
1246 if (bank->route_mask & BIT(pin)) { in rockchip_set_mux()
1247 if (rockchip_get_mux_route(bank, pin, mux, &route_location, in rockchip_set_mux()
1281 static int px30_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in px30_calc_pull_reg_and_bit() argument
1285 struct rockchip_pinctrl *info = bank->drvdata; in px30_calc_pull_reg_and_bit()
1288 if (bank->bank_num == 0) { in px30_calc_pull_reg_and_bit()
1297 *reg += bank->bank_num * PX30_PULL_BANK_STRIDE; in px30_calc_pull_reg_and_bit()
1313 static int px30_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in px30_calc_drv_reg_and_bit() argument
1317 struct rockchip_pinctrl *info = bank->drvdata; in px30_calc_drv_reg_and_bit()
1320 if (bank->bank_num == 0) { in px30_calc_drv_reg_and_bit()
1329 *reg += bank->bank_num * PX30_DRV_BANK_STRIDE; in px30_calc_drv_reg_and_bit()
1345 static int px30_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in px30_calc_schmitt_reg_and_bit() argument
1350 struct rockchip_pinctrl *info = bank->drvdata; in px30_calc_schmitt_reg_and_bit()
1353 if (bank->bank_num == 0) { in px30_calc_schmitt_reg_and_bit()
1361 *reg += (bank->bank_num - 1) * PX30_SCHMITT_BANK_STRIDE; in px30_calc_schmitt_reg_and_bit()
1376 static int rv1108_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rv1108_calc_pull_reg_and_bit() argument
1380 struct rockchip_pinctrl *info = bank->drvdata; in rv1108_calc_pull_reg_and_bit()
1383 if (bank->bank_num == 0) { in rv1108_calc_pull_reg_and_bit()
1391 *reg += bank->bank_num * RV1108_PULL_BANK_STRIDE; in rv1108_calc_pull_reg_and_bit()
1407 static int rv1108_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rv1108_calc_drv_reg_and_bit() argument
1411 struct rockchip_pinctrl *info = bank->drvdata; in rv1108_calc_drv_reg_and_bit()
1414 if (bank->bank_num == 0) { in rv1108_calc_drv_reg_and_bit()
1423 *reg += bank->bank_num * RV1108_DRV_BANK_STRIDE; in rv1108_calc_drv_reg_and_bit()
1439 static int rv1108_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in rv1108_calc_schmitt_reg_and_bit() argument
1444 struct rockchip_pinctrl *info = bank->drvdata; in rv1108_calc_schmitt_reg_and_bit()
1447 if (bank->bank_num == 0) { in rv1108_calc_schmitt_reg_and_bit()
1455 *reg += (bank->bank_num - 1) * RV1108_SCHMITT_BANK_STRIDE; in rv1108_calc_schmitt_reg_and_bit()
1470 static int rv1126_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rv1126_calc_pull_reg_and_bit() argument
1474 struct rockchip_pinctrl *info = bank->drvdata; in rv1126_calc_pull_reg_and_bit()
1477 if (bank->bank_num == 0) { in rv1126_calc_pull_reg_and_bit()
1491 *reg += (bank->bank_num - 1) * RV1126_PULL_BANK_STRIDE; in rv1126_calc_pull_reg_and_bit()
1507 static int rv1126_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rv1126_calc_drv_reg_and_bit() argument
1511 struct rockchip_pinctrl *info = bank->drvdata; in rv1126_calc_drv_reg_and_bit()
1514 if (bank->bank_num == 0) { in rv1126_calc_drv_reg_and_bit()
1529 *reg += (bank->bank_num - 1) * RV1126_DRV_BANK_STRIDE; in rv1126_calc_drv_reg_and_bit()
1545 static int rv1126_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in rv1126_calc_schmitt_reg_and_bit() argument
1550 struct rockchip_pinctrl *info = bank->drvdata; in rv1126_calc_schmitt_reg_and_bit()
1553 if (bank->bank_num == 0) { in rv1126_calc_schmitt_reg_and_bit()
1568 *reg += (bank->bank_num - 1) * RV1126_SCHMITT_BANK_STRIDE; in rv1126_calc_schmitt_reg_and_bit()
1580 static int rk3308_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in rk3308_calc_schmitt_reg_and_bit() argument
1584 struct rockchip_pinctrl *info = bank->drvdata; in rk3308_calc_schmitt_reg_and_bit()
1589 *reg += bank->bank_num * RK3308_SCHMITT_BANK_STRIDE; in rk3308_calc_schmitt_reg_and_bit()
1600 static int rk2928_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk2928_calc_pull_reg_and_bit() argument
1604 struct rockchip_pinctrl *info = bank->drvdata; in rk2928_calc_pull_reg_and_bit()
1608 *reg += bank->bank_num * RK2928_PULL_BANK_STRIDE; in rk2928_calc_pull_reg_and_bit()
1618 static int rk3128_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3128_calc_pull_reg_and_bit() argument
1622 struct rockchip_pinctrl *info = bank->drvdata; in rk3128_calc_pull_reg_and_bit()
1626 *reg += bank->bank_num * RK2928_PULL_BANK_STRIDE; in rk3128_calc_pull_reg_and_bit()
1640 static int rk3188_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3188_calc_pull_reg_and_bit() argument
1644 struct rockchip_pinctrl *info = bank->drvdata; in rk3188_calc_pull_reg_and_bit()
1647 if (bank->bank_num == 0 && pin_num < 12) { in rk3188_calc_pull_reg_and_bit()
1649 : bank->regmap_pull; in rk3188_calc_pull_reg_and_bit()
1661 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3188_calc_pull_reg_and_bit()
1677 static int rk3288_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3288_calc_pull_reg_and_bit() argument
1681 struct rockchip_pinctrl *info = bank->drvdata; in rk3288_calc_pull_reg_and_bit()
1684 if (bank->bank_num == 0) { in rk3288_calc_pull_reg_and_bit()
1697 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3288_calc_pull_reg_and_bit()
1713 static int rk3288_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3288_calc_drv_reg_and_bit() argument
1717 struct rockchip_pinctrl *info = bank->drvdata; in rk3288_calc_drv_reg_and_bit()
1720 if (bank->bank_num == 0) { in rk3288_calc_drv_reg_and_bit()
1733 *reg += bank->bank_num * RK3288_DRV_BANK_STRIDE; in rk3288_calc_drv_reg_and_bit()
1745 static int rk3228_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3228_calc_pull_reg_and_bit() argument
1749 struct rockchip_pinctrl *info = bank->drvdata; in rk3228_calc_pull_reg_and_bit()
1753 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3228_calc_pull_reg_and_bit()
1764 static int rk3228_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3228_calc_drv_reg_and_bit() argument
1768 struct rockchip_pinctrl *info = bank->drvdata; in rk3228_calc_drv_reg_and_bit()
1772 *reg += bank->bank_num * RK3288_DRV_BANK_STRIDE; in rk3228_calc_drv_reg_and_bit()
1783 static int rk3308_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3308_calc_pull_reg_and_bit() argument
1787 struct rockchip_pinctrl *info = bank->drvdata; in rk3308_calc_pull_reg_and_bit()
1791 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3308_calc_pull_reg_and_bit()
1802 static int rk3308_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3308_calc_drv_reg_and_bit() argument
1806 struct rockchip_pinctrl *info = bank->drvdata; in rk3308_calc_drv_reg_and_bit()
1810 *reg += bank->bank_num * RK3288_DRV_BANK_STRIDE; in rk3308_calc_drv_reg_and_bit()
1822 static int rk3368_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3368_calc_pull_reg_and_bit() argument
1826 struct rockchip_pinctrl *info = bank->drvdata; in rk3368_calc_pull_reg_and_bit()
1829 if (bank->bank_num == 0) { in rk3368_calc_pull_reg_and_bit()
1842 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3368_calc_pull_reg_and_bit()
1855 static int rk3368_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3368_calc_drv_reg_and_bit() argument
1859 struct rockchip_pinctrl *info = bank->drvdata; in rk3368_calc_drv_reg_and_bit()
1862 if (bank->bank_num == 0) { in rk3368_calc_drv_reg_and_bit()
1875 *reg += bank->bank_num * RK3288_DRV_BANK_STRIDE; in rk3368_calc_drv_reg_and_bit()
1889 static int rk3399_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3399_calc_pull_reg_and_bit() argument
1893 struct rockchip_pinctrl *info = bank->drvdata; in rk3399_calc_pull_reg_and_bit()
1896 if ((bank->bank_num == 0) || (bank->bank_num == 1)) { in rk3399_calc_pull_reg_and_bit()
1900 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3399_calc_pull_reg_and_bit()
1911 *reg += bank->bank_num * RK3188_PULL_BANK_STRIDE; in rk3399_calc_pull_reg_and_bit()
1921 static int rk3399_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3399_calc_drv_reg_and_bit() argument
1925 struct rockchip_pinctrl *info = bank->drvdata; in rk3399_calc_drv_reg_and_bit()
1929 if ((bank->bank_num == 0) || (bank->bank_num == 1)) in rk3399_calc_drv_reg_and_bit()
1934 *reg = bank->drv[drv_num].offset; in rk3399_calc_drv_reg_and_bit()
1935 if ((bank->drv[drv_num].drv_type == DRV_TYPE_IO_1V8_3V0_AUTO) || in rk3399_calc_drv_reg_and_bit()
1936 (bank->drv[drv_num].drv_type == DRV_TYPE_IO_3V3_ONLY)) in rk3399_calc_drv_reg_and_bit()
1950 static int rk3568_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3568_calc_pull_reg_and_bit() argument
1954 struct rockchip_pinctrl *info = bank->drvdata; in rk3568_calc_pull_reg_and_bit()
1956 if (bank->bank_num == 0) { in rk3568_calc_pull_reg_and_bit()
1959 *reg += bank->bank_num * RK3568_PULL_BANK_STRIDE; in rk3568_calc_pull_reg_and_bit()
1967 *reg += (bank->bank_num - 1) * RK3568_PULL_BANK_STRIDE; in rk3568_calc_pull_reg_and_bit()
1983 static int rk3568_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3568_calc_drv_reg_and_bit() argument
1987 struct rockchip_pinctrl *info = bank->drvdata; in rk3568_calc_drv_reg_and_bit()
1990 if (bank->bank_num == 0) { in rk3568_calc_drv_reg_and_bit()
2000 *reg += (bank->bank_num - 1) * RK3568_DRV_BANK_STRIDE; in rk3568_calc_drv_reg_and_bit()
2118 static int rk3588_calc_pull_reg_and_bit(struct rockchip_pin_bank *bank, in rk3588_calc_pull_reg_and_bit() argument
2122 struct rockchip_pinctrl *info = bank->drvdata; in rk3588_calc_pull_reg_and_bit()
2123 u8 bank_num = bank->bank_num; in rk3588_calc_pull_reg_and_bit()
2143 static int rk3588_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank, in rk3588_calc_drv_reg_and_bit() argument
2147 struct rockchip_pinctrl *info = bank->drvdata; in rk3588_calc_drv_reg_and_bit()
2148 u8 bank_num = bank->bank_num; in rk3588_calc_drv_reg_and_bit()
2168 static int rk3588_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in rk3588_calc_schmitt_reg_and_bit() argument
2173 struct rockchip_pinctrl *info = bank->drvdata; in rk3588_calc_schmitt_reg_and_bit()
2174 u8 bank_num = bank->bank_num; in rk3588_calc_schmitt_reg_and_bit()
2199 static int rockchip_get_drive_perpin(struct rockchip_pin_bank *bank, in rockchip_get_drive_perpin() argument
2202 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_get_drive_perpin()
2209 int drv_type = bank->drv[pin_num / 8].drv_type; in rockchip_get_drive_perpin()
2211 ret = ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_drive_perpin()
2278 static int rockchip_set_drive_perpin(struct rockchip_pin_bank *bank, in rockchip_set_drive_perpin() argument
2281 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_set_drive_perpin()
2288 int drv_type = bank->drv[pin_num / 8].drv_type; in rockchip_set_drive_perpin()
2291 bank->bank_num, pin_num, strength); in rockchip_set_drive_perpin()
2293 ret = ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_drive_perpin()
2404 static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num) in rockchip_get_pull() argument
2406 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_get_pull()
2418 ret = ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_pull()
2441 pull_type = bank->pull_type[pin_num / 8]; in rockchip_get_pull()
2448 if (ctrl->type == RK3568 && bank->bank_num == 0 && pin_num >= 27 && pin_num <= 30) { in rockchip_get_pull()
2460 static int rockchip_set_pull(struct rockchip_pin_bank *bank, in rockchip_set_pull() argument
2463 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_set_pull()
2471 dev_dbg(dev, "setting pull of GPIO%d-%d to %d\n", bank->bank_num, pin_num, pull); in rockchip_set_pull()
2477 ret = ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_pull()
2499 pull_type = bank->pull_type[pin_num / 8]; in rockchip_set_pull()
2512 if (ctrl->type == RK3568 && bank->bank_num == 0 && pin_num >= 27 && pin_num <= 30) { in rockchip_set_pull()
2542 static int rk3328_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in rk3328_calc_schmitt_reg_and_bit() argument
2547 struct rockchip_pinctrl *info = bank->drvdata; in rk3328_calc_schmitt_reg_and_bit()
2552 *reg += bank->bank_num * RK3328_SCHMITT_BANK_STRIDE; in rk3328_calc_schmitt_reg_and_bit()
2565 static int rk3568_calc_schmitt_reg_and_bit(struct rockchip_pin_bank *bank, in rk3568_calc_schmitt_reg_and_bit() argument
2570 struct rockchip_pinctrl *info = bank->drvdata; in rk3568_calc_schmitt_reg_and_bit()
2572 if (bank->bank_num == 0) { in rk3568_calc_schmitt_reg_and_bit()
2578 *reg += (bank->bank_num - 1) * RK3568_SCHMITT_BANK_STRIDE; in rk3568_calc_schmitt_reg_and_bit()
2588 static int rockchip_get_schmitt(struct rockchip_pin_bank *bank, int pin_num) in rockchip_get_schmitt() argument
2590 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_get_schmitt()
2597 ret = ctrl->schmitt_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_schmitt()
2616 static int rockchip_set_schmitt(struct rockchip_pin_bank *bank, in rockchip_set_schmitt() argument
2619 struct rockchip_pinctrl *info = bank->drvdata; in rockchip_set_schmitt()
2628 bank->bank_num, pin_num, enable); in rockchip_set_schmitt()
2630 ret = ctrl->schmitt_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_schmitt()
2688 struct rockchip_pin_bank *bank; in rockchip_pmx_set() local
2699 bank = pin_to_bank(info, pins[cnt]); in rockchip_pmx_set()
2700 ret = rockchip_set_mux(bank, pins[cnt] - bank->pin_base, in rockchip_pmx_set()
2709 rockchip_set_mux(bank, pins[cnt] - bank->pin_base, 0); in rockchip_pmx_set()
2723 struct rockchip_pin_bank *bank; in rockchip_pmx_gpio_set_direction() local
2725 bank = pin_to_bank(info, offset); in rockchip_pmx_gpio_set_direction()
2726 return rockchip_set_mux(bank, offset - bank->pin_base, RK_FUNC_GPIO); in rockchip_pmx_gpio_set_direction()
2767 static int rockchip_pinconf_defer_pin(struct rockchip_pin_bank *bank, in rockchip_pinconf_defer_pin() argument
2780 list_add_tail(&cfg->head, &bank->deferred_pins); in rockchip_pinconf_defer_pin()
2790 struct rockchip_pin_bank *bank = pin_to_bank(info, pin); in rockchip_pinconf_set() local
2791 struct gpio_chip *gpio = &bank->gpio_chip; in rockchip_pinconf_set()
2807 mutex_lock(&bank->deferred_lock); in rockchip_pinconf_set()
2809 rc = rockchip_pinconf_defer_pin(bank, pin - bank->pin_base, param, in rockchip_pinconf_set()
2811 mutex_unlock(&bank->deferred_lock); in rockchip_pinconf_set()
2817 mutex_unlock(&bank->deferred_lock); in rockchip_pinconf_set()
2822 rc = rockchip_set_pull(bank, pin - bank->pin_base, in rockchip_pinconf_set()
2837 rc = rockchip_set_pull(bank, pin - bank->pin_base, in rockchip_pinconf_set()
2843 rc = rockchip_set_mux(bank, pin - bank->pin_base, in rockchip_pinconf_set()
2848 rc = gpio->direction_output(gpio, pin - bank->pin_base, in rockchip_pinconf_set()
2854 rc = rockchip_set_mux(bank, pin - bank->pin_base, in rockchip_pinconf_set()
2859 rc = gpio->direction_input(gpio, pin - bank->pin_base); in rockchip_pinconf_set()
2868 rc = rockchip_set_drive_perpin(bank, in rockchip_pinconf_set()
2869 pin - bank->pin_base, arg); in rockchip_pinconf_set()
2877 rc = rockchip_set_schmitt(bank, in rockchip_pinconf_set()
2878 pin - bank->pin_base, arg); in rockchip_pinconf_set()
2896 struct rockchip_pin_bank *bank = pin_to_bank(info, pin); in rockchip_pinconf_get() local
2897 struct gpio_chip *gpio = &bank->gpio_chip; in rockchip_pinconf_get()
2904 if (rockchip_get_pull(bank, pin - bank->pin_base) != param) in rockchip_pinconf_get()
2916 if (rockchip_get_pull(bank, pin - bank->pin_base) != param) in rockchip_pinconf_get()
2922 rc = rockchip_get_mux(bank, pin - bank->pin_base); in rockchip_pinconf_get()
2931 rc = gpio->get(gpio, pin - bank->pin_base); in rockchip_pinconf_get()
2942 rc = rockchip_get_drive_perpin(bank, pin - bank->pin_base); in rockchip_pinconf_get()
2952 rc = rockchip_get_schmitt(bank, pin - bank->pin_base); in rockchip_pinconf_get()
3000 struct rockchip_pin_bank *bank; in rockchip_pinctrl_parse_groups() local
3034 bank = bank_num_to_bank(info, num); in rockchip_pinctrl_parse_groups()
3035 if (IS_ERR(bank)) in rockchip_pinctrl_parse_groups()
3036 return PTR_ERR(bank); in rockchip_pinctrl_parse_groups()
3038 grp->pins[j] = bank->pin_base + be32_to_cpu(*list++); in rockchip_pinctrl_parse_groups()
3142 int pin, bank, ret; in rockchip_pinctrl_register() local
3159 for (bank = 0, k = 0; bank < info->ctrl->nr_banks; bank++) { in rockchip_pinctrl_register()
3160 pin_bank = &info->ctrl->pin_banks[bank]; in rockchip_pinctrl_register()
3198 struct rockchip_pin_bank *bank; in rockchip_pinctrl_get_soc_data() local
3208 bank = ctrl->pin_banks; in rockchip_pinctrl_get_soc_data()
3209 for (i = 0; i < ctrl->nr_banks; ++i, ++bank) { in rockchip_pinctrl_get_soc_data()
3212 raw_spin_lock_init(&bank->slock); in rockchip_pinctrl_get_soc_data()
3213 bank->drvdata = d; in rockchip_pinctrl_get_soc_data()
3214 bank->pin_base = ctrl->nr_pins; in rockchip_pinctrl_get_soc_data()
3215 ctrl->nr_pins += bank->nr_pins; in rockchip_pinctrl_get_soc_data()
3219 struct rockchip_iomux *iom = &bank->iomux[j]; in rockchip_pinctrl_get_soc_data()
3220 struct rockchip_drv *drv = &bank->drv[j]; in rockchip_pinctrl_get_soc_data()
3223 if (bank_pins >= bank->nr_pins) in rockchip_pinctrl_get_soc_data()
3287 if (ctrl->iomux_recalced[j].num == bank->bank_num) { in rockchip_pinctrl_get_soc_data()
3289 bank->recalced_mask |= BIT(pin); in rockchip_pinctrl_get_soc_data()
3297 if (ctrl->iomux_routes[j].bank_num == bank->bank_num) { in rockchip_pinctrl_get_soc_data()
3299 bank->route_mask |= BIT(pin); in rockchip_pinctrl_get_soc_data()
3436 struct rockchip_pin_bank *bank; in rockchip_pinctrl_remove() local
3443 bank = &info->ctrl->pin_banks[i]; in rockchip_pinctrl_remove()
3445 mutex_lock(&bank->deferred_lock); in rockchip_pinctrl_remove()
3446 while (!list_empty(&bank->deferred_pins)) { in rockchip_pinctrl_remove()
3447 cfg = list_first_entry(&bank->deferred_pins, in rockchip_pinctrl_remove()
3452 mutex_unlock(&bank->deferred_lock); in rockchip_pinctrl_remove()