Lines Matching refs:offset
56 * offset: bit index in the 4 byte address range
60 unsigned offset, void __iomem *ioaddr)
68 val &= ~(!bitval << offset); /* unset bit if bitval == 0 */
69 val |= (!!bitval << offset); /* set bit if bitval == 1 */
79 static inline int rb532_get_bit(unsigned offset, void __iomem *ioaddr)
81 return (readl(ioaddr) & (1 << offset));
86 static int rb532_gpio_get(struct gpio_chip *chip, unsigned offset)
91 return rb532_get_bit(offset, gpch->regbase + GPIOD);
98 unsigned offset, int value)
103 rb532_set_bit(value, offset, gpch->regbase + GPIOD);
109 static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
116 rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC);
118 rb532_set_bit(0, offset, gpch->regbase + GPIOCFG);
126 unsigned offset, int value)
133 rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC);
136 rb532_set_bit(value, offset, gpch->regbase + GPIOD);
138 rb532_set_bit(1, offset, gpch->regbase + GPIOCFG);