Lines Matching refs:bit

166 				    int *reg, u8 *bit);
169 int *reg, u8 *bit);
392 u8 bit; in rockchip_get_mux() local
414 bit = (pin % 4) * 4; in rockchip_get_mux()
416 bit = (pin % 8) * 2; in rockchip_get_mux()
423 return ((val >> bit) & mask); in rockchip_get_mux()
446 u8 bit; in rockchip_set_mux() local
479 bit = (pin % 4) * 4; in rockchip_set_mux()
481 bit = (pin % 8) * 2; in rockchip_set_mux()
486 data = (mask << (bit + 16)); in rockchip_set_mux()
488 data |= (mux & mask) << bit; in rockchip_set_mux()
502 int *reg, u8 *bit) in rk2928_calc_pull_reg_and_bit() argument
511 *bit = pin_num % RK2928_PULL_PINS_PER_REG; in rk2928_calc_pull_reg_and_bit()
522 int *reg, u8 *bit) in rk3188_calc_pull_reg_and_bit() argument
532 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3188_calc_pull_reg_and_bit()
533 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
549 *bit = 7 - (pin_num % RK3188_PULL_PINS_PER_REG); in rk3188_calc_pull_reg_and_bit()
550 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
557 int *reg, u8 *bit) in rk3288_calc_pull_reg_and_bit() argument
567 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3288_calc_pull_reg_and_bit()
568 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
578 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3288_calc_pull_reg_and_bit()
579 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
591 int *reg, u8 *bit) in rk3288_calc_drv_reg_and_bit() argument
601 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3288_calc_drv_reg_and_bit()
602 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
612 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3288_calc_drv_reg_and_bit()
613 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
622 int *reg, u8 *bit) in rk3368_calc_pull_reg_and_bit() argument
632 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3368_calc_pull_reg_and_bit()
633 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3368_calc_pull_reg_and_bit()
643 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3368_calc_pull_reg_and_bit()
644 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3368_calc_pull_reg_and_bit()
653 int *reg, u8 *bit) in rk3368_calc_drv_reg_and_bit() argument
663 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3368_calc_drv_reg_and_bit()
664 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3368_calc_drv_reg_and_bit()
674 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3368_calc_drv_reg_and_bit()
675 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3368_calc_drv_reg_and_bit()
689 u8 bit; in rockchip_get_drive_perpin() local
691 ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_drive_perpin()
697 data >>= bit; in rockchip_get_drive_perpin()
712 u8 bit; in rockchip_set_drive_perpin() local
714 ctrl->drv_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_drive_perpin()
733 data = ((1 << RK3288_DRV_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_drive_perpin()
735 data |= (ret << bit); in rockchip_set_drive_perpin()
749 u8 bit; in rockchip_get_pull() local
756 ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_get_pull()
764 return !(data & BIT(bit)) in rockchip_get_pull()
770 data >>= bit; in rockchip_get_pull()
800 u8 bit; in rockchip_set_pull() local
810 ctrl->pull_calc_reg(bank, pin_num, &regmap, &reg, &bit); in rockchip_set_pull()
816 data = BIT(bit + 16); in rockchip_set_pull()
818 data |= BIT(bit); in rockchip_set_pull()
829 data = ((1 << RK3188_PULL_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_pull()
836 data |= (1 << bit); in rockchip_set_pull()
839 data |= (2 << bit); in rockchip_set_pull()
842 data |= (3 << bit); in rockchip_set_pull()