Lines Matching refs:bit_off

114 	u32 bit_off;  in sppctl_get_reg_and_bit_offset()  local
118 bit_off = offset % 32; in sppctl_get_reg_and_bit_offset()
120 return bit_off; in sppctl_get_reg_and_bit_offset()
125 u32 bit_off; in sppctl_get_moon_reg_and_bit_offset() local
134 bit_off = offset % 16; in sppctl_get_moon_reg_and_bit_offset()
136 return bit_off; in sppctl_get_moon_reg_and_bit_offset()
141 u32 bit_off; in sppctl_prep_moon_reg_and_offset() local
143 bit_off = sppctl_get_moon_reg_and_bit_offset(offset, reg_off); in sppctl_prep_moon_reg_and_offset()
145 return SPPCTL_SET_MOON_REG_BIT(bit_off); in sppctl_prep_moon_reg_and_offset()
147 return SPPCTL_CLR_MOON_REG_BIT(bit_off); in sppctl_prep_moon_reg_and_offset()
227 static void sppctl_gmx_set(struct sppctl_pdata *pctl, u8 reg_off, u8 bit_off, u8 bit_sz, in sppctl_gmx_set() argument
238 reg = (mask | val) << bit_off; in sppctl_gmx_set()
264 u32 reg_off, bit_off, reg; in sppctl_first_get() local
266 bit_off = sppctl_get_reg_and_bit_offset(offset, &reg_off); in sppctl_first_get()
269 return (reg & BIT(bit_off)) ? 1 : 0; in sppctl_first_get()
299 u32 reg_off, bit_off, reg; in sppctl_master_get() local
301 bit_off = sppctl_get_moon_reg_and_bit_offset(offset, &reg_off); in sppctl_master_get()
303 return (reg & BIT(bit_off)) ? 1 : 0; in sppctl_master_get()
310 u32 reg_off, bit_off, reg; in sppctl_first_master_set() local
315 bit_off = sppctl_get_reg_and_bit_offset(offset, &reg_off); in sppctl_first_master_set()
317 val = (reg & BIT(bit_off)) ? mux_f_gpio : mux_f_mux; in sppctl_first_master_set()
322 reg |= BIT(bit_off); in sppctl_first_master_set()
327 reg &= ~BIT(bit_off); in sppctl_first_master_set()
364 u32 reg_off, bit_off, reg; in sppctl_gpio_output_od_get() local
366 bit_off = sppctl_get_moon_reg_and_bit_offset(offset, &reg_off); in sppctl_gpio_output_od_get()
369 return (reg & BIT(bit_off)) ? 1 : 0; in sppctl_gpio_output_od_get()
385 u32 reg_off, bit_off, reg; in sppctl_gpio_get_direction() local
387 bit_off = sppctl_get_moon_reg_and_bit_offset(offset, &reg_off); in sppctl_gpio_get_direction()
390 return (reg & BIT(bit_off)) ? 0 : 1; in sppctl_gpio_get_direction()
396 u32 reg_off, bit_off, reg; in sppctl_gpio_inv_get() local
399 bit_off = sppctl_get_moon_reg_and_bit_offset(offset, &reg_off); in sppctl_gpio_inv_get()
410 return (reg & BIT(bit_off)) ? 1 : 0; in sppctl_gpio_inv_get()
456 u32 reg_off, bit_off, reg; in sppctl_gpio_get() local
458 bit_off = sppctl_get_reg_and_bit_offset(offset, &reg_off); in sppctl_gpio_get()
461 return (reg & BIT(bit_off)) ? 1 : 0; in sppctl_gpio_get()