Lines Matching refs:bit
165 int *reg, u8 *bit);
388 u8 bit; in rockchip_get_mux() local
410 bit = (pin % 4) * 4; in rockchip_get_mux()
412 bit = (pin % 8) * 2; in rockchip_get_mux()
419 return ((val >> bit) & mask); in rockchip_get_mux()
442 u8 bit; in rockchip_set_mux() local
475 bit = (pin % 4) * 4; in rockchip_set_mux()
477 bit = (pin % 8) * 2; in rockchip_set_mux()
482 data = (mask << (bit + 16)); in rockchip_set_mux()
484 data |= (mux & mask) << bit; in rockchip_set_mux()
498 int *reg, u8 *bit) in rk2928_calc_pull_reg_and_bit() argument
507 *bit = pin_num % RK2928_PULL_PINS_PER_REG; in rk2928_calc_pull_reg_and_bit()
518 int *reg, u8 *bit) in rk3188_calc_pull_reg_and_bit() argument
528 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3188_calc_pull_reg_and_bit()
529 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
545 *bit = 7 - (pin_num % RK3188_PULL_PINS_PER_REG); in rk3188_calc_pull_reg_and_bit()
546 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3188_calc_pull_reg_and_bit()
553 int *reg, u8 *bit) in rk3288_calc_pull_reg_and_bit() argument
563 *bit = pin_num % RK3188_PULL_PINS_PER_REG; in rk3288_calc_pull_reg_and_bit()
564 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
574 *bit = (pin_num % RK3188_PULL_PINS_PER_REG); in rk3288_calc_pull_reg_and_bit()
575 *bit *= RK3188_PULL_BITS_PER_PIN; in rk3288_calc_pull_reg_and_bit()
588 int *reg, u8 *bit) in rk3288_calc_drv_reg_and_bit() argument
598 *bit = pin_num % RK3288_DRV_PINS_PER_REG; in rk3288_calc_drv_reg_and_bit()
599 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
609 *bit = (pin_num % RK3288_DRV_PINS_PER_REG); in rk3288_calc_drv_reg_and_bit()
610 *bit *= RK3288_DRV_BITS_PER_PIN; in rk3288_calc_drv_reg_and_bit()
619 u8 bit; in rk3288_get_drive() local
621 rk3288_calc_drv_reg_and_bit(bank, pin_num, ®map, ®, &bit); in rk3288_get_drive()
627 data >>= bit; in rk3288_get_drive()
641 u8 bit; in rk3288_set_drive() local
643 rk3288_calc_drv_reg_and_bit(bank, pin_num, ®map, ®, &bit); in rk3288_set_drive()
662 data = ((1 << RK3288_DRV_BITS_PER_PIN) - 1) << (bit + 16); in rk3288_set_drive()
664 data |= (ret << bit); in rk3288_set_drive()
678 u8 bit; in rockchip_get_pull() local
685 ctrl->pull_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_get_pull()
693 return !(data & BIT(bit)) in rockchip_get_pull()
698 data >>= bit; in rockchip_get_pull()
728 u8 bit; in rockchip_set_pull() local
738 ctrl->pull_calc_reg(bank, pin_num, ®map, ®, &bit); in rockchip_set_pull()
744 data = BIT(bit + 16); in rockchip_set_pull()
746 data |= BIT(bit); in rockchip_set_pull()
756 data = ((1 << RK3188_PULL_BITS_PER_PIN) - 1) << (bit + 16); in rockchip_set_pull()
763 data |= (1 << bit); in rockchip_set_pull()
766 data |= (2 << bit); in rockchip_set_pull()
769 data |= (3 << bit); in rockchip_set_pull()