Lines Matching defs:offset

126 	unsigned int reg, offset, shift;
133 offset = irqd_to_hwirq(d);
135 pr_debug("gio: sense irq = %d, mode = %d\n", offset, value);
138 reg = GIO_IDT(offset >> 3);
139 shift = (offset & 0x07) << 4;
145 tmp &= ~BIT(offset);
155 em_gio_write(p, GIO_IIR, BIT(offset));
159 tmp |= BIT(offset);
171 unsigned int offset, irqs_handled = 0;
174 offset = __ffs(pending);
175 em_gio_write(p, GIO_IIR, BIT(offset));
176 generic_handle_domain_irq(p->irq_domain, offset);
188 static int em_gio_direction_input(struct gpio_chip *chip, unsigned offset)
190 em_gio_write(gpio_to_priv(chip), GIO_E0, BIT(offset));
194 static int em_gio_get(struct gpio_chip *chip, unsigned offset)
196 return !!(em_gio_read(gpio_to_priv(chip), GIO_I) & BIT(offset));
207 static void em_gio_set(struct gpio_chip *chip, unsigned offset, int value)
210 if (offset < 16)
211 __em_gio_set(chip, GIO_OL, offset, value);
213 __em_gio_set(chip, GIO_OH, offset - 16, value);
216 static int em_gio_direction_output(struct gpio_chip *chip, unsigned offset,
220 em_gio_set(chip, offset, value);
221 em_gio_write(gpio_to_priv(chip), GIO_E1, BIT(offset));
225 static int em_gio_to_irq(struct gpio_chip *chip, unsigned offset)
227 return irq_create_mapping(gpio_to_priv(chip)->irq_domain, offset);
230 static int em_gio_request(struct gpio_chip *chip, unsigned offset)
232 return pinctrl_gpio_request(chip->base + offset);
235 static void em_gio_free(struct gpio_chip *chip, unsigned offset)
237 pinctrl_gpio_free(chip->base + offset);
242 em_gio_direction_input(chip, offset);