Lines Matching refs:bit
403 .bit = 0,
409 .bit = 2,
415 .bit = 4,
421 .bit = 6,
427 .bit = 8,
433 .bit = 10,
439 .bit = 12,
445 .bit = 14,
451 .bit = 0,
457 .bit = 2,
467 .bit = 0,
474 .bit = 4,
481 .bit = 8,
488 .bit = 12,
498 .bit = 0,
504 .bit = 4,
510 .bit = 8,
516 .bit = 12,
522 .bit = 12,
533 .bit = 12,
540 .bit = 0,
547 .bit = 4,
554 .bit = 8,
561 .bit = 12,
568 .bit = 0,
575 .bit = 4,
582 .bit = 8,
589 .bit = 4,
596 .bit = 6,
603 .bit = 0,
610 .bit = 4,
617 .bit = 6,
624 .bit = 8,
631 .bit = 12,
641 .bit = 8,
647 .bit = 0,
653 .bit = 14,
659 int *reg, u8 *bit, int *mask) in rockchip_get_recalced_mux() argument
678 *bit = data->bit; in rockchip_get_recalced_mux()
1051 u8 bit; in rockchip_get_mux() local
1077 bit = (pin % 4) * 4; in rockchip_get_mux()
1082 bit = (pin % 8 % 5) * 3; in rockchip_get_mux()
1085 bit = (pin % 8) * 2; in rockchip_get_mux()
1090 rockchip_get_recalced_mux(bank, pin, ®, &bit, &mask); in rockchip_get_mux()
1103 return ((val >> bit) & mask); in rockchip_get_mux()
1117 return ((val >> bit) & mask); in rockchip_get_mux()
1166 u8 bit; in rockchip_set_mux() local
1191 bit = (pin % 4) * 4; in rockchip_set_mux()
1196 bit = (pin % 8 % 5) * 3; in rockchip_set_mux()
1199 bit = (pin % 8) * 2; in rockchip_set_mux()
1204 rockchip_get_recalced_mux(bank, pin, ®, &bit, &mask); in rockchip_set_mux()
1211 data = (mask << (bit + 16)); in rockchip_set_mux()
1213 data |= (mux & mask) << bit; in rockchip_set_mux()
1219 data = (mask << (bit + 16)); in rockchip_set_mux()
1221 data |= 8 << bit; in rockchip_set_mux()
1225 data = (mask << (bit + 16)); in rockchip_set_mux()
1227 data |= mux << bit; in rockchip_set_mux()
1232 data = (mask << (bit + 16)); in rockchip_set_mux()
1234 data |= (mux & mask) << bit; in rockchip_set_mux()
1267 data = (mask << (bit + 16)); in rockchip_set_mux()
1269 data |= (mux & mask) << bit; in rockchip_set_mux()
1283 int *reg, u8 *bit) in px30_calc_pull_reg_and_bit() argument
1301 *bit = (pin_num % PX30_PULL_PINS_PER_REG); in px30_calc_pull_reg_and_bit()
1302 *bit *= PX30_PULL_BITS_PER_PIN; in px30_calc_pull_reg_and_bit()
1315 int *reg, u8 *bit) in px30_calc_drv_reg_and_bit() argument
1333 *bit = (pin_num % PX30_DRV_PINS_PER_REG); in px30_calc_drv_reg_and_bit()
1334 *bit *= PX30_DRV_BITS_PER_PIN; in px30_calc_drv_reg_and_bit()
1348 int *reg, u8 *bit) in px30_calc_schmitt_reg_and_bit() argument
1365 *bit = pin_num % pins_per_reg; in px30_calc_schmitt_reg_and_bit()
1378 int *reg, u8 *bit) in rv1108_calc_pull_reg_and_bit() argument
1395 *bit = (pin_num % RV1108_PULL_PINS_PER_REG); in rv1108_calc_pull_reg_and_bit()
1396 *bit *= RV1108_PULL_BITS_PER_PIN; in rv1108_calc_pull_reg_and_bit()
1409 int *reg, u8 *bit) in rv1108_calc_drv_reg_and_bit() argument
1427 *bit = pin_num % RV1108_DRV_PINS_PER_REG; in rv1108_calc_drv_reg_and_bit()
1428 *bit *= RV1108_DRV_BITS_PER_PIN; in rv1108_calc_drv_reg_and_bit()
1442 int *reg, u8 *bit) in rv1108_calc_schmitt_reg_and_bit() argument
1458 *bit = pin_num % pins_per_reg; in rv1108_calc_schmitt_reg_and_bit()
1472 int *reg, u8 *bit) in rv1126_calc_pull_reg_and_bit() argument
1482 *bit = pin_num % RV1126_PULL_PINS_PER_REG; in rv1126_calc_pull_reg_and_bit()
1483 *bit *= RV1126_PULL_BITS_PER_PIN; in rv1126_calc_pull_reg_and_bit()
1495 *bit = (pin_num % RV1126_PULL_PINS_PER_REG); in rv1126_calc_pull_reg_and_bit()
1496 *bit *= RV1126_PULL_BITS_PER_PIN; in rv1126_calc_pull_reg_and_bit()
1509 int *reg, u8 *bit) in rv1126_calc_drv_reg_and_bit() argument
1520 *bit = pin_num % RV1126_DRV_PINS_PER_REG; in rv1126_calc_drv_reg_and_bit()
1521 *bit *= RV1126_DRV_BITS_PER_PIN; in rv1126_calc_drv_reg_and_bit()
1533 *bit = pin_num % RV1126_DRV_PINS_PER_REG; in rv1126_calc_drv_reg_and_bit()
1534 *bit *= RV1126_DRV_BITS_PER_PIN; in rv1126_calc_drv_reg_and_bit()
1548 int *reg, u8 *bit) in rv1126_calc_schmitt_reg_and_bit() argument
1558 *bit = pin_num % RV1126_SCHMITT_PINS_PER_GRF_REG; in rv1126_calc_schmitt_reg_and_bit()
1571 *bit = pin_num % pins_per_reg; in rv1126_calc_schmitt_reg_and_bit()
1582 int *reg, u8 *bit) in rk3308_calc_schmitt_reg_and_bit() argument
1591 *bit = pin_num % RK3308_SCHMITT_PINS_PER_REG; in rk3308_calc_schmitt_reg_and_bit()
1602 int *reg, u8 *bit) in rk2928_calc_pull_reg_and_bit() argument
1611 *bit = pin_num % RK2928_PULL_PINS_PER_REG; in rk2928_calc_pull_reg_and_bit()
1620 int *reg, u8 *bit) in rk3128_calc_pull_reg_and_bit() argument
1629 *bit = pin_num % RK2928_PULL_PINS_PER_REG; in rk3128_calc_pull_reg_and_bit()
1642 int *reg, u8 *bit) in rk3188_calc_pull_reg_and_bit() argument
1652 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3188_calc_pull_reg_and_bit()
1653 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
1669 *bit = 7 - (pin_num % RK3188_PULL_PINS_PER_REG); in rk3188_calc_pull_reg_and_bit()
1670 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
1679 int *reg, u8 *bit) in rk3288_calc_pull_reg_and_bit() argument
1689 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3288_calc_pull_reg_and_bit()
1690 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
1700 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3288_calc_pull_reg_and_bit()
1701 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
1715 int *reg, u8 *bit) in rk3288_calc_drv_reg_and_bit() argument
1725 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3288_calc_drv_reg_and_bit()
1726 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
1736 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3288_calc_drv_reg_and_bit()
1737 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
1747 int *reg, u8 *bit) in rk3228_calc_pull_reg_and_bit() argument
1756 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3228_calc_pull_reg_and_bit()
1757 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3228_calc_pull_reg_and_bit()
1766 int *reg, u8 *bit) in rk3228_calc_drv_reg_and_bit() argument
1775 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3228_calc_drv_reg_and_bit()
1776 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3228_calc_drv_reg_and_bit()
1785 int *reg, u8 *bit) in rk3308_calc_pull_reg_and_bit() argument
1794 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3308_calc_pull_reg_and_bit()
1795 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3308_calc_pull_reg_and_bit()
1804 int *reg, u8 *bit) in rk3308_calc_drv_reg_and_bit() argument
1813 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3308_calc_drv_reg_and_bit()
1814 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3308_calc_drv_reg_and_bit()
1824 int *reg, u8 *bit) in rk3368_calc_pull_reg_and_bit() argument
1834 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3368_calc_pull_reg_and_bit()
1835 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3368_calc_pull_reg_and_bit()
1845 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3368_calc_pull_reg_and_bit()
1846 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3368_calc_pull_reg_and_bit()
1857 int *reg, u8 *bit) in rk3368_calc_drv_reg_and_bit() argument
1867 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3368_calc_drv_reg_and_bit()
1868 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3368_calc_drv_reg_and_bit()
1878 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3368_calc_drv_reg_and_bit()
1879 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3368_calc_drv_reg_and_bit()
1891 int *reg, u8 *bit) in rk3399_calc_pull_reg_and_bit() argument
1903 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3399_calc_pull_reg_and_bit()
1904 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3399_calc_pull_reg_and_bit()
1914 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3399_calc_pull_reg_and_bit()
1915 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3399_calc_pull_reg_and_bit()
1923 int *reg, u8 *bit) in rk3399_calc_drv_reg_and_bit() argument
1937 *bit = (pin_num % 8) * 3; in rk3399_calc_drv_reg_and_bit()
1939 *bit = (pin_num % 8) * 2; in rk3399_calc_drv_reg_and_bit()
1952 int *reg, u8 *bit) in rk3568_calc_pull_reg_and_bit() argument
1962 *bit = pin_num % RK3568_PULL_PINS_PER_REG; in rk3568_calc_pull_reg_and_bit()
1963 *bit *= RK3568_PULL_BITS_PER_PIN; in rk3568_calc_pull_reg_and_bit()
1970 *bit = (pin_num % RK3568_PULL_PINS_PER_REG); in rk3568_calc_pull_reg_and_bit()
1971 *bit *= RK3568_PULL_BITS_PER_PIN; in rk3568_calc_pull_reg_and_bit()
1985 int *reg, u8 *bit) in rk3568_calc_drv_reg_and_bit() argument
1995 *bit = pin_num % RK3568_DRV_PINS_PER_REG; in rk3568_calc_drv_reg_and_bit()
1996 *bit *= RK3568_DRV_BITS_PER_PIN; in rk3568_calc_drv_reg_and_bit()
2003 *bit = (pin_num % RK3568_DRV_PINS_PER_REG); in rk3568_calc_drv_reg_and_bit()
2004 *bit *= RK3568_DRV_BITS_PER_PIN; in rk3568_calc_drv_reg_and_bit()
2120 int *reg, u8 *bit) in rk3588_calc_pull_reg_and_bit() argument
2131 *bit = pin_num % RK3588_PULL_PINS_PER_REG; in rk3588_calc_pull_reg_and_bit()
2132 *bit *= RK3588_PULL_BITS_PER_PIN; in rk3588_calc_pull_reg_and_bit()
2145 int *reg, u8 *bit) in rk3588_calc_drv_reg_and_bit() argument
2156 *bit = pin_num % RK3588_DRV_PINS_PER_REG; in rk3588_calc_drv_reg_and_bit()
2157 *bit *= RK3588_DRV_BITS_PER_PIN; in rk3588_calc_drv_reg_and_bit()
2171 int *reg, u8 *bit) in rk3588_calc_schmitt_reg_and_bit() argument
2182 *bit = pin_num % RK3588_SMT_PINS_PER_REG; in rk3588_calc_schmitt_reg_and_bit()
2183 *bit *= RK3588_SMT_BITS_PER_PIN; in rk3588_calc_schmitt_reg_and_bit()
2208 u8 bit; in rockchip_get_drive_perpin() local
2211 ret = ctrl->drv_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_get_drive_perpin()
2219 switch (bit) { in rockchip_get_drive_perpin()
2249 bit -= 16; in rockchip_get_drive_perpin()
2253 bit, drv_type); in rockchip_get_drive_perpin()
2272 data >>= bit; in rockchip_get_drive_perpin()
2287 u8 bit; in rockchip_set_drive_perpin() local
2293 ret = ctrl->drv_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_set_drive_perpin()
2332 switch (bit) { in rockchip_set_drive_perpin()
2360 bit -= 16; in rockchip_set_drive_perpin()
2364 bit, drv_type); in rockchip_set_drive_perpin()
2380 data = ((1 << rmask_bits) - 1) << (bit + 16); in rockchip_set_drive_perpin()
2382 data |= (ret << bit); in rockchip_set_drive_perpin()
2411 u8 bit; in rockchip_get_pull() local
2418 ret = ctrl->pull_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_get_pull()
2429 return !(data & BIT(bit)) in rockchip_get_pull()
2442 data >>= bit; in rockchip_get_pull()
2468 u8 bit; in rockchip_set_pull() local
2477 ret = ctrl->pull_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_set_pull()
2484 data = BIT(bit + 16); in rockchip_set_pull()
2486 data |= BIT(bit); in rockchip_set_pull()
2523 data = ((1 << RK3188_PULL_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_pull()
2525 data |= (ret << bit); in rockchip_set_pull()
2545 int *reg, u8 *bit) in rk3328_calc_schmitt_reg_and_bit() argument
2554 *bit = pin_num % RK3328_SCHMITT_PINS_PER_REG; in rk3328_calc_schmitt_reg_and_bit()
2568 int *reg, u8 *bit) in rk3568_calc_schmitt_reg_and_bit() argument
2582 *bit = pin_num % RK3568_SCHMITT_PINS_PER_REG; in rk3568_calc_schmitt_reg_and_bit()
2583 *bit *= RK3568_SCHMITT_BITS_PER_PIN; in rk3568_calc_schmitt_reg_and_bit()
2594 u8 bit; in rockchip_get_schmitt() local
2597 ret = ctrl->schmitt_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_get_schmitt()
2605 data >>= bit; in rockchip_get_schmitt()
2624 u8 bit; in rockchip_set_schmitt() local
2630 ret = ctrl->schmitt_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_set_schmitt()
2637 data = ((1 << RK3568_SCHMITT_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_schmitt()
2639 data |= ((enable ? 0x2 : 0x1) << bit); in rockchip_set_schmitt()
2642 data = BIT(bit + 16) | (enable << bit); in rockchip_set_schmitt()
2643 rmask = BIT(bit + 16) | BIT(bit); in rockchip_set_schmitt()