Lines Matching refs:offset
71 unsigned offset, void __iomem *ioaddr) in rb532_set_bit() argument
79 val &= ~(!bitval << offset); /* unset bit if bitval == 0 */ in rb532_set_bit()
80 val |= (!!bitval << offset); /* set bit if bitval == 1 */ in rb532_set_bit()
90 static inline int rb532_get_bit(unsigned offset, void __iomem *ioaddr) in rb532_get_bit() argument
92 return readl(ioaddr) & (1 << offset); in rb532_get_bit()
97 static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset) in rb532_gpio_get() argument
102 return !!rb532_get_bit(offset, gpch->regbase + GPIOD); in rb532_gpio_get()
108 static int rb532_gpio_set(struct gpio_chip *chip, unsigned int offset, in rb532_gpio_set() argument
114 rb532_set_bit(value, offset, gpch->regbase + GPIOD); in rb532_gpio_set()
122 static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset) in rb532_gpio_direction_input() argument
129 rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); in rb532_gpio_direction_input()
131 rb532_set_bit(0, offset, gpch->regbase + GPIOCFG); in rb532_gpio_direction_input()
139 unsigned offset, int value) in rb532_gpio_direction_output() argument
146 rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); in rb532_gpio_direction_output()
149 rb532_set_bit(value, offset, gpch->regbase + GPIOD); in rb532_gpio_direction_output()
151 rb532_set_bit(1, offset, gpch->regbase + GPIOCFG); in rb532_gpio_direction_output()