Lines Matching refs:offset
61 unsigned offset, void __iomem *ioaddr) in rb532_set_bit() argument
69 val &= ~(!bitval << offset); /* unset bit if bitval == 0 */ in rb532_set_bit()
70 val |= (!!bitval << offset); /* set bit if bitval == 1 */ in rb532_set_bit()
80 static inline int rb532_get_bit(unsigned offset, void __iomem *ioaddr) in rb532_get_bit() argument
82 return (readl(ioaddr) & (1 << offset)); in rb532_get_bit()
87 static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset) in rb532_gpio_get() argument
92 return rb532_get_bit(offset, gpch->regbase + GPIOD); in rb532_gpio_get()
99 unsigned offset, int value) in rb532_gpio_set() argument
104 rb532_set_bit(value, offset, gpch->regbase + GPIOD); in rb532_gpio_set()
110 static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset) in rb532_gpio_direction_input() argument
117 rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); in rb532_gpio_direction_input()
119 rb532_set_bit(0, offset, gpch->regbase + GPIOCFG); in rb532_gpio_direction_input()
127 unsigned offset, int value) in rb532_gpio_direction_output() argument
134 rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); in rb532_gpio_direction_output()
137 rb532_set_bit(value, offset, gpch->regbase + GPIOD); in rb532_gpio_direction_output()
139 rb532_set_bit(1, offset, gpch->regbase + GPIOCFG); in rb532_gpio_direction_output()