Lines Matching defs:offset
48 * @offset: index of bit within the register
52 int base_reg, unsigned int offset,
55 int reg = base_reg + (offset / 8);
56 u8 mask = (1 << (offset & 0x7));
73 * @offset: index of bit within the register
79 int base_reg, unsigned int offset,
82 int reg = base_reg + (offset / 8);
83 u8 mask = (1 << (offset & 0x7));
131 int offset = (pin / 8);
134 reg = MV88E6352_G2_SCRATCH_GPIO_DATA0 + offset;
137 chip->gpio_data[offset] |= mask;
139 chip->gpio_data[offset] &= ~mask;
141 return mv88e6xxx_g2_scratch_write(chip, reg, chip->gpio_data[offset]);
195 int offset = (pin & 0x1) ? 4 : 0;
196 u8 mask = (0x7 << offset);
204 *func = (val & mask) >> offset;
219 int offset = (pin & 0x1) ? 4 : 0;
220 u8 mask = (0x7 << offset);
228 val = (val & ~mask) | ((func & mask) << offset);