Lines Matching refs:pin
114 unsigned int pin; in mask_ack_giuint_low() local
116 pin = GPIO_PIN_OF_IRQ(d->irq); in mask_ack_giuint_low()
117 giu_clear(GIUINTENL, 1 << pin); in mask_ack_giuint_low()
118 giu_write(GIUINTSTATL, 1 << pin); in mask_ack_giuint_low()
172 unsigned int pin; in mask_ack_giuint_high() local
174 pin = GPIO_PIN_OF_IRQ(d->irq) - GIUINT_HIGH_OFFSET; in mask_ack_giuint_high()
175 giu_clear(GIUINTENH, 1 << pin); in mask_ack_giuint_high()
176 giu_write(GIUINTSTATH, 1 << pin); in mask_ack_giuint_high()
223 void vr41xx_set_irq_trigger(unsigned int pin, irq_trigger_t trigger, in vr41xx_set_irq_trigger() argument
228 if (pin < GIUINT_HIGH_OFFSET) { in vr41xx_set_irq_trigger()
229 mask = 1 << pin; in vr41xx_set_irq_trigger()
252 irq_set_chip_and_handler(GIU_IRQ(pin), in vr41xx_set_irq_trigger()
258 irq_set_chip_and_handler(GIU_IRQ(pin), in vr41xx_set_irq_trigger()
263 } else if (pin < GIUINT_HIGH_MAX) { in vr41xx_set_irq_trigger()
264 mask = 1 << (pin - GIUINT_HIGH_OFFSET); in vr41xx_set_irq_trigger()
287 irq_set_chip_and_handler(GIU_IRQ(pin), in vr41xx_set_irq_trigger()
293 irq_set_chip_and_handler(GIU_IRQ(pin), in vr41xx_set_irq_trigger()
302 void vr41xx_set_irq_level(unsigned int pin, irq_level_t level) in vr41xx_set_irq_level() argument
306 if (pin < GIUINT_HIGH_OFFSET) { in vr41xx_set_irq_level()
307 mask = 1 << pin; in vr41xx_set_irq_level()
313 } else if (pin < GIUINT_HIGH_MAX) { in vr41xx_set_irq_level()
314 mask = 1 << (pin - GIUINT_HIGH_OFFSET); in vr41xx_set_irq_level()
324 static int giu_set_direction(struct gpio_chip *chip, unsigned pin, int dir) in giu_set_direction() argument
329 if (pin >= chip->ngpio) in giu_set_direction()
332 if (pin < 16) { in giu_set_direction()
334 mask = 1 << pin; in giu_set_direction()
335 } else if (pin < 32) { in giu_set_direction()
337 mask = 1 << (pin - 16); in giu_set_direction()
341 mask = 1 << (pin - 32); in giu_set_direction()
343 switch (pin) { in giu_set_direction()
372 static int vr41xx_gpio_get(struct gpio_chip *chip, unsigned pin) in vr41xx_gpio_get() argument
376 if (pin >= chip->ngpio) in vr41xx_gpio_get()
379 if (pin < 16) { in vr41xx_gpio_get()
381 mask = 1 << pin; in vr41xx_gpio_get()
382 } else if (pin < 32) { in vr41xx_gpio_get()
384 mask = 1 << (pin - 16); in vr41xx_gpio_get()
385 } else if (pin < 48) { in vr41xx_gpio_get()
387 mask = 1 << (pin - 32); in vr41xx_gpio_get()
390 mask = 1 << (pin - 48); in vr41xx_gpio_get()
399 static void vr41xx_gpio_set(struct gpio_chip *chip, unsigned pin, in vr41xx_gpio_set() argument
405 if (pin >= chip->ngpio) in vr41xx_gpio_set()
408 if (pin < 16) { in vr41xx_gpio_set()
410 mask = 1 << pin; in vr41xx_gpio_set()
411 } else if (pin < 32) { in vr41xx_gpio_set()
413 mask = 1 << (pin - 16); in vr41xx_gpio_set()
414 } else if (pin < 48) { in vr41xx_gpio_set()
416 mask = 1 << (pin - 32); in vr41xx_gpio_set()
419 mask = 1 << (pin - 48); in vr41xx_gpio_set()
468 unsigned int trigger, i, pin; in giu_probe() local
504 pin = GPIO_PIN_OF_IRQ(i); in giu_probe()
505 if (pin < GIUINT_HIGH_OFFSET) in giu_probe()
510 if (trigger & (1 << pin)) in giu_probe()