Lines Matching defs:offset
286 struct pinctrl_gpio_range *range, unsigned offset)
290 if (as_pci->gpio_control[offset].io_function)
296 struct pinctrl_gpio_range *range, unsigned offset, bool input)
303 as_pci->gpio_control[offset].mode_prop, input);
306 (input) ? "Input" : "Output", offset);
310 return as3722_update_bits(as3722, AS3722_GPIOn_CONTROL_REG(offset),
427 static int as3722_gpio_get(struct gpio_chip *chip, unsigned offset)
438 ret = as3722_read(as3722, AS3722_GPIOn_CONTROL_REG(offset), &control);
441 "GPIO_CONTROL%d_REG read failed: %d\n", offset, ret);
470 val = !!(val & AS3722_GPIOn_SIGNAL(offset));
474 static void as3722_gpio_set(struct gpio_chip *chip, unsigned offset,
483 ret = as3722_read(as3722, AS3722_GPIOn_CONTROL_REG(offset), &val);
486 "GPIO_CONTROL%d_REG read failed: %d\n", offset, ret);
492 val = (en_invert) ? 0 : AS3722_GPIOn_SIGNAL(offset);
494 val = (en_invert) ? AS3722_GPIOn_SIGNAL(offset) : 0;
497 AS3722_GPIOn_SIGNAL(offset), val);
503 static int as3722_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
505 return pinctrl_gpio_direction_input(chip->base + offset);
509 unsigned offset, int value)
511 as3722_gpio_set(chip, offset, value);
512 return pinctrl_gpio_direction_output(chip->base + offset);
515 static int as3722_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
519 return as3722_irq_get_virq(as_pci->as3722, offset);