Lines Matching refs:bit

423 		.bit = 0,
429 .bit = 2,
435 .bit = 4,
441 .bit = 6,
447 .bit = 8,
453 .bit = 10,
459 .bit = 12,
465 .bit = 14,
471 .bit = 0,
477 .bit = 2,
487 .bit = 0,
494 .bit = 4,
501 .bit = 8,
508 .bit = 12,
518 .bit = 0,
524 .bit = 4,
530 .bit = 8,
536 .bit = 12,
542 .bit = 12,
553 .bit = 12,
560 .bit = 0,
567 .bit = 4,
574 .bit = 8,
581 .bit = 12,
588 .bit = 0,
595 .bit = 4,
602 .bit = 8,
609 .bit = 4,
616 .bit = 6,
623 .bit = 0,
630 .bit = 4,
637 .bit = 6,
644 .bit = 8,
651 .bit = 12,
662 .bit = 0,
669 .bit = 14,
676 .bit = 2,
683 .bit = 4,
690 .bit = 6,
697 .bit = 8,
704 .bit = 10,
711 .bit = 12,
718 .bit = 14,
724 int *reg, u8 *bit, int *mask) in rockchip_get_recalced_mux() argument
743 *bit = data->bit; in rockchip_get_recalced_mux()
1103 u8 bit; in rockchip_get_mux() local
1129 bit = (pin % 4) * 4; in rockchip_get_mux()
1134 bit = (pin % 8 % 5) * 3; in rockchip_get_mux()
1137 bit = (pin % 8) * 2; in rockchip_get_mux()
1142 rockchip_get_recalced_mux(bank, pin, &reg, &bit, &mask); in rockchip_get_mux()
1160 return ((val >> bit) & mask); in rockchip_get_mux()
1174 return ((val >> bit) & mask); in rockchip_get_mux()
1223 u8 bit; in rockchip_set_mux() local
1248 bit = (pin % 4) * 4; in rockchip_set_mux()
1253 bit = (pin % 8 % 5) * 3; in rockchip_set_mux()
1256 bit = (pin % 8) * 2; in rockchip_set_mux()
1261 rockchip_get_recalced_mux(bank, pin, &reg, &bit, &mask); in rockchip_set_mux()
1273 data = (mask << (bit + 16)); in rockchip_set_mux()
1275 data |= (mux & mask) << bit; in rockchip_set_mux()
1281 data = (mask << (bit + 16)); in rockchip_set_mux()
1283 data |= 8 << bit; in rockchip_set_mux()
1287 data = (mask << (bit + 16)); in rockchip_set_mux()
1289 data |= mux << bit; in rockchip_set_mux()
1294 data = (mask << (bit + 16)); in rockchip_set_mux()
1296 data |= (mux & mask) << bit; in rockchip_set_mux()
1329 data = (mask << (bit + 16)); in rockchip_set_mux()
1331 data |= (mux & mask) << bit; in rockchip_set_mux()
1345 int *reg, u8 *bit) in px30_calc_pull_reg_and_bit() argument
1363 *bit = (pin_num % PX30_PULL_PINS_PER_REG); in px30_calc_pull_reg_and_bit()
1364 *bit *= PX30_PULL_BITS_PER_PIN; in px30_calc_pull_reg_and_bit()
1377 int *reg, u8 *bit) in px30_calc_drv_reg_and_bit() argument
1395 *bit = (pin_num % PX30_DRV_PINS_PER_REG); in px30_calc_drv_reg_and_bit()
1396 *bit *= PX30_DRV_BITS_PER_PIN; in px30_calc_drv_reg_and_bit()
1410 int *reg, u8 *bit) in px30_calc_schmitt_reg_and_bit() argument
1427 *bit = pin_num % pins_per_reg; in px30_calc_schmitt_reg_and_bit()
1440 int *reg, u8 *bit) in rv1108_calc_pull_reg_and_bit() argument
1457 *bit = (pin_num % RV1108_PULL_PINS_PER_REG); in rv1108_calc_pull_reg_and_bit()
1458 *bit *= RV1108_PULL_BITS_PER_PIN; in rv1108_calc_pull_reg_and_bit()
1471 int *reg, u8 *bit) in rv1108_calc_drv_reg_and_bit() argument
1489 *bit = pin_num % RV1108_DRV_PINS_PER_REG; in rv1108_calc_drv_reg_and_bit()
1490 *bit *= RV1108_DRV_BITS_PER_PIN; in rv1108_calc_drv_reg_and_bit()
1504 int *reg, u8 *bit) in rv1108_calc_schmitt_reg_and_bit() argument
1520 *bit = pin_num % pins_per_reg; in rv1108_calc_schmitt_reg_and_bit()
1534 int *reg, u8 *bit) in rv1126_calc_pull_reg_and_bit() argument
1544 *bit = pin_num % RV1126_PULL_PINS_PER_REG; in rv1126_calc_pull_reg_and_bit()
1545 *bit *= RV1126_PULL_BITS_PER_PIN; in rv1126_calc_pull_reg_and_bit()
1557 *bit = (pin_num % RV1126_PULL_PINS_PER_REG); in rv1126_calc_pull_reg_and_bit()
1558 *bit *= RV1126_PULL_BITS_PER_PIN; in rv1126_calc_pull_reg_and_bit()
1571 int *reg, u8 *bit) in rv1126_calc_drv_reg_and_bit() argument
1582 *bit = pin_num % RV1126_DRV_PINS_PER_REG; in rv1126_calc_drv_reg_and_bit()
1583 *bit *= RV1126_DRV_BITS_PER_PIN; in rv1126_calc_drv_reg_and_bit()
1595 *bit = pin_num % RV1126_DRV_PINS_PER_REG; in rv1126_calc_drv_reg_and_bit()
1596 *bit *= RV1126_DRV_BITS_PER_PIN; in rv1126_calc_drv_reg_and_bit()
1610 int *reg, u8 *bit) in rv1126_calc_schmitt_reg_and_bit() argument
1620 *bit = pin_num % RV1126_SCHMITT_PINS_PER_GRF_REG; in rv1126_calc_schmitt_reg_and_bit()
1633 *bit = pin_num % pins_per_reg; in rv1126_calc_schmitt_reg_and_bit()
1644 int *reg, u8 *bit) in rk3308_calc_schmitt_reg_and_bit() argument
1653 *bit = pin_num % RK3308_SCHMITT_PINS_PER_REG; in rk3308_calc_schmitt_reg_and_bit()
1664 int *reg, u8 *bit) in rk2928_calc_pull_reg_and_bit() argument
1673 *bit = pin_num % RK2928_PULL_PINS_PER_REG; in rk2928_calc_pull_reg_and_bit()
1682 int *reg, u8 *bit) in rk3128_calc_pull_reg_and_bit() argument
1691 *bit = pin_num % RK2928_PULL_PINS_PER_REG; in rk3128_calc_pull_reg_and_bit()
1704 int *reg, u8 *bit) in rk3188_calc_pull_reg_and_bit() argument
1714 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3188_calc_pull_reg_and_bit()
1715 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
1731 *bit = 7 - (pin_num % RK3188_PULL_PINS_PER_REG); in rk3188_calc_pull_reg_and_bit()
1732 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
1741 int *reg, u8 *bit) in rk3288_calc_pull_reg_and_bit() argument
1751 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3288_calc_pull_reg_and_bit()
1752 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
1762 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3288_calc_pull_reg_and_bit()
1763 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
1777 int *reg, u8 *bit) in rk3288_calc_drv_reg_and_bit() argument
1787 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3288_calc_drv_reg_and_bit()
1788 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
1798 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3288_calc_drv_reg_and_bit()
1799 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
1809 int *reg, u8 *bit) in rk3228_calc_pull_reg_and_bit() argument
1818 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3228_calc_pull_reg_and_bit()
1819 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3228_calc_pull_reg_and_bit()
1828 int *reg, u8 *bit) in rk3228_calc_drv_reg_and_bit() argument
1837 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3228_calc_drv_reg_and_bit()
1838 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3228_calc_drv_reg_and_bit()
1847 int *reg, u8 *bit) in rk3308_calc_pull_reg_and_bit() argument
1856 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3308_calc_pull_reg_and_bit()
1857 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3308_calc_pull_reg_and_bit()
1866 int *reg, u8 *bit) in rk3308_calc_drv_reg_and_bit() argument
1875 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3308_calc_drv_reg_and_bit()
1876 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3308_calc_drv_reg_and_bit()
1886 int *reg, u8 *bit) in rk3368_calc_pull_reg_and_bit() argument
1896 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3368_calc_pull_reg_and_bit()
1897 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3368_calc_pull_reg_and_bit()
1907 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3368_calc_pull_reg_and_bit()
1908 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3368_calc_pull_reg_and_bit()
1919 int *reg, u8 *bit) in rk3368_calc_drv_reg_and_bit() argument
1929 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3368_calc_drv_reg_and_bit()
1930 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3368_calc_drv_reg_and_bit()
1940 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3368_calc_drv_reg_and_bit()
1941 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3368_calc_drv_reg_and_bit()
1953 int *reg, u8 *bit) in rk3399_calc_pull_reg_and_bit() argument
1965 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3399_calc_pull_reg_and_bit()
1966 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3399_calc_pull_reg_and_bit()
1976 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3399_calc_pull_reg_and_bit()
1977 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3399_calc_pull_reg_and_bit()
1985 int *reg, u8 *bit) in rk3399_calc_drv_reg_and_bit() argument
1999 *bit = (pin_num % 8) * 3; in rk3399_calc_drv_reg_and_bit()
2001 *bit = (pin_num % 8) * 2; in rk3399_calc_drv_reg_and_bit()
2016 int *reg, u8 *bit) in rk3528_calc_drv_reg_and_bit() argument
2036 *bit = pin_num % RK3528_DRV_PINS_PER_REG; in rk3528_calc_drv_reg_and_bit()
2037 *bit *= RK3528_DRV_BITS_PER_PIN; in rk3528_calc_drv_reg_and_bit()
2052 int *reg, u8 *bit) in rk3528_calc_pull_reg_and_bit() argument
2072 *bit = pin_num % RK3528_PULL_PINS_PER_REG; in rk3528_calc_pull_reg_and_bit()
2073 *bit *= RK3528_PULL_BITS_PER_PIN; in rk3528_calc_pull_reg_and_bit()
2089 int *reg, u8 *bit) in rk3528_calc_schmitt_reg_and_bit() argument
2109 *bit = pin_num % RK3528_SMT_PINS_PER_REG; in rk3528_calc_schmitt_reg_and_bit()
2110 *bit *= RK3528_SMT_BITS_PER_PIN; in rk3528_calc_schmitt_reg_and_bit()
2125 int *reg, u8 *bit) in rk3562_calc_drv_reg_and_bit() argument
2157 *bit = pin_num % RK3562_DRV_PINS_PER_REG; in rk3562_calc_drv_reg_and_bit()
2158 *bit *= RK3562_DRV_BITS_PER_PIN; in rk3562_calc_drv_reg_and_bit()
2173 int *reg, u8 *bit) in rk3562_calc_pull_reg_and_bit() argument
2205 *bit = pin_num % RK3562_PULL_PINS_PER_REG; in rk3562_calc_pull_reg_and_bit()
2206 *bit *= RK3562_PULL_BITS_PER_PIN; in rk3562_calc_pull_reg_and_bit()
2222 int *reg, u8 *bit) in rk3562_calc_schmitt_reg_and_bit() argument
2254 *bit = pin_num % RK3562_SMT_PINS_PER_REG; in rk3562_calc_schmitt_reg_and_bit()
2255 *bit *= RK3562_SMT_BITS_PER_PIN; in rk3562_calc_schmitt_reg_and_bit()
2268 int *reg, u8 *bit) in rk3568_calc_pull_reg_and_bit() argument
2278 *bit = pin_num % RK3568_PULL_PINS_PER_REG; in rk3568_calc_pull_reg_and_bit()
2279 *bit *= RK3568_PULL_BITS_PER_PIN; in rk3568_calc_pull_reg_and_bit()
2286 *bit = (pin_num % RK3568_PULL_PINS_PER_REG); in rk3568_calc_pull_reg_and_bit()
2287 *bit *= RK3568_PULL_BITS_PER_PIN; in rk3568_calc_pull_reg_and_bit()
2301 int *reg, u8 *bit) in rk3568_calc_drv_reg_and_bit() argument
2311 *bit = pin_num % RK3568_DRV_PINS_PER_REG; in rk3568_calc_drv_reg_and_bit()
2312 *bit *= RK3568_DRV_BITS_PER_PIN; in rk3568_calc_drv_reg_and_bit()
2319 *bit = (pin_num % RK3568_DRV_PINS_PER_REG); in rk3568_calc_drv_reg_and_bit()
2320 *bit *= RK3568_DRV_BITS_PER_PIN; in rk3568_calc_drv_reg_and_bit()
2339 int *reg, u8 *bit) in rk3576_calc_drv_reg_and_bit() argument
2365 *bit = pin_num % RK3576_DRV_PINS_PER_REG; in rk3576_calc_drv_reg_and_bit()
2366 *bit *= RK3576_DRV_BITS_PER_PIN; in rk3576_calc_drv_reg_and_bit()
2384 int *reg, u8 *bit) in rk3576_calc_pull_reg_and_bit() argument
2410 *bit = pin_num % RK3576_PULL_PINS_PER_REG; in rk3576_calc_pull_reg_and_bit()
2411 *bit *= RK3576_PULL_BITS_PER_PIN; in rk3576_calc_pull_reg_and_bit()
2430 int *reg, u8 *bit) in rk3576_calc_schmitt_reg_and_bit() argument
2456 *bit = pin_num % RK3576_SMT_PINS_PER_REG; in rk3576_calc_schmitt_reg_and_bit()
2457 *bit *= RK3576_SMT_BITS_PER_PIN; in rk3576_calc_schmitt_reg_and_bit()
2572 int *reg, u8 *bit) in rk3588_calc_pull_reg_and_bit() argument
2583 *bit = pin_num % RK3588_PULL_PINS_PER_REG; in rk3588_calc_pull_reg_and_bit()
2584 *bit *= RK3588_PULL_BITS_PER_PIN; in rk3588_calc_pull_reg_and_bit()
2597 int *reg, u8 *bit) in rk3588_calc_drv_reg_and_bit() argument
2608 *bit = pin_num % RK3588_DRV_PINS_PER_REG; in rk3588_calc_drv_reg_and_bit()
2609 *bit *= RK3588_DRV_BITS_PER_PIN; in rk3588_calc_drv_reg_and_bit()
2623 int *reg, u8 *bit) in rk3588_calc_schmitt_reg_and_bit() argument
2634 *bit = pin_num % RK3588_SMT_PINS_PER_REG; in rk3588_calc_schmitt_reg_and_bit()
2635 *bit *= RK3588_SMT_BITS_PER_PIN; in rk3588_calc_schmitt_reg_and_bit()
2660 u8 bit; in rockchip_get_drive_perpin() local
2663 ret = ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_drive_perpin()
2671 switch (bit) { in rockchip_get_drive_perpin()
2701 bit -= 16; in rockchip_get_drive_perpin()
2705 bit, drv_type); in rockchip_get_drive_perpin()
2724 data >>= bit; in rockchip_get_drive_perpin()
2739 u8 bit; in rockchip_set_drive_perpin() local
2745 ret = ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_drive_perpin()
2790 switch (bit) { in rockchip_set_drive_perpin()
2818 bit -= 16; in rockchip_set_drive_perpin()
2822 bit, drv_type); in rockchip_set_drive_perpin()
2838 data = ((1 << rmask_bits) - 1) << (bit + 16); in rockchip_set_drive_perpin()
2840 data |= (ret << bit); in rockchip_set_drive_perpin()
2869 u8 bit; in rockchip_get_pull() local
2876 ret = ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_pull()
2887 return !(data & BIT(bit)) in rockchip_get_pull()
2904 data >>= bit; in rockchip_get_pull()
2930 u8 bit; in rockchip_set_pull() local
2939 ret = ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_pull()
2946 data = BIT(bit + 16); in rockchip_set_pull()
2948 data |= BIT(bit); in rockchip_set_pull()
2989 data = ((1 << RK3188_PULL_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_pull()
2991 data |= (ret << bit); in rockchip_set_pull()
3011 int *reg, u8 *bit) in rk3328_calc_schmitt_reg_and_bit() argument
3020 *bit = pin_num % RK3328_SCHMITT_PINS_PER_REG; in rk3328_calc_schmitt_reg_and_bit()
3034 int *reg, u8 *bit) in rk3568_calc_schmitt_reg_and_bit() argument
3048 *bit = pin_num % RK3568_SCHMITT_PINS_PER_REG; in rk3568_calc_schmitt_reg_and_bit()
3049 *bit *= RK3568_SCHMITT_BITS_PER_PIN; in rk3568_calc_schmitt_reg_and_bit()
3060 u8 bit; in rockchip_get_schmitt() local
3063 ret = ctrl->schmitt_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_schmitt()
3071 data >>= bit; in rockchip_get_schmitt()
3091 u8 bit; in rockchip_set_schmitt() local
3097 ret = ctrl->schmitt_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_schmitt()
3105 data = ((1 << RK3568_SCHMITT_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_schmitt()
3107 data |= ((enable ? 0x2 : 0x1) << bit); in rockchip_set_schmitt()
3110 data = BIT(bit + 16) | (enable << bit); in rockchip_set_schmitt()
3111 rmask = BIT(bit + 16) | BIT(bit); in rockchip_set_schmitt()