Lines Matching refs:shift
77 u8 shift = offset % 32; in gpio_reg_and_bit() local
79 *bit = shift; in gpio_reg_and_bit()
86 u8 shift; in tng_gpio_get() local
88 gplr = gpio_reg_and_bit(chip, offset, GPLR, &shift); in tng_gpio_get()
90 return !!(readl(gplr) & BIT(shift)); in tng_gpio_get()
97 u8 shift; in tng_gpio_set() local
99 reg = gpio_reg_and_bit(chip, offset, value ? GPSR : GPCR, &shift); in tng_gpio_set()
103 writel(BIT(shift), reg); in tng_gpio_set()
111 u8 shift; in tng_gpio_direction_input() local
113 gpdr = gpio_reg_and_bit(chip, offset, GPDR, &shift); in tng_gpio_direction_input()
118 value &= ~BIT(shift); in tng_gpio_direction_input()
129 u8 shift; in tng_gpio_direction_output() local
131 gpdr = gpio_reg_and_bit(chip, offset, GPDR, &shift); in tng_gpio_direction_output()
137 value |= BIT(shift); in tng_gpio_direction_output()
146 u8 shift; in tng_gpio_get_direction() local
148 gpdr = gpio_reg_and_bit(chip, offset, GPDR, &shift); in tng_gpio_get_direction()
150 if (readl(gpdr) & BIT(shift)) in tng_gpio_get_direction()
162 u8 shift; in tng_gpio_set_debounce() local
164 gfbr = gpio_reg_and_bit(chip, offset, GFBR, &shift); in tng_gpio_set_debounce()
170 value &= ~BIT(shift); in tng_gpio_set_debounce()
172 value |= BIT(shift); in tng_gpio_set_debounce()
202 u8 shift; in tng_irq_ack() local
204 gisr = gpio_reg_and_bit(&priv->chip, gpio, GISR, &shift); in tng_irq_ack()
208 writel(BIT(shift), gisr); in tng_irq_ack()
215 u8 shift; in tng_irq_unmask_mask() local
217 gimr = gpio_reg_and_bit(&priv->chip, gpio, GIMR, &shift); in tng_irq_unmask_mask()
223 value |= BIT(shift); in tng_irq_unmask_mask()
225 value &= ~BIT(shift); in tng_irq_unmask_mask()
258 u8 shift = gpio % 32; in tng_irq_set_type() local
265 value |= BIT(shift); in tng_irq_set_type()
267 value &= ~BIT(shift); in tng_irq_set_type()
272 value |= BIT(shift); in tng_irq_set_type()
274 value &= ~BIT(shift); in tng_irq_set_type()
283 value |= BIT(shift); in tng_irq_set_type()
285 value &= ~BIT(shift); in tng_irq_set_type()
290 value |= BIT(shift); in tng_irq_set_type()
296 value &= ~BIT(shift); in tng_irq_set_type()
312 u8 shift = gpio % 32; in tng_irq_set_wake() local
320 writel(BIT(shift), gwsr); in tng_irq_set_wake()
324 value |= BIT(shift); in tng_irq_set_wake()
326 value &= ~BIT(shift); in tng_irq_set_wake()