Lines Matching refs:pin
58 static int sama5d2_piobu_setup_pin(struct gpio_chip *chip, unsigned int pin) in sama5d2_piobu_setup_pin() argument
63 unsigned int mask = BIT(PIOBU_DET_OFFSET + pin); in sama5d2_piobu_setup_pin()
79 static int sama5d2_piobu_write_value(struct gpio_chip *chip, unsigned int pin, in sama5d2_piobu_write_value() argument
86 reg = PIOBU_BASE + pin * PIOBU_REG_SIZE; in sama5d2_piobu_write_value()
95 static int sama5d2_piobu_read_value(struct gpio_chip *chip, unsigned int pin, in sama5d2_piobu_read_value() argument
103 reg = PIOBU_BASE + pin * PIOBU_REG_SIZE; in sama5d2_piobu_read_value()
115 unsigned int pin) in sama5d2_piobu_get_direction() argument
117 int ret = sama5d2_piobu_read_value(chip, pin, PIOBU_DIRECTION); in sama5d2_piobu_get_direction()
130 unsigned int pin) in sama5d2_piobu_direction_input() argument
132 return sama5d2_piobu_write_value(chip, pin, PIOBU_DIRECTION, PIOBU_IN); in sama5d2_piobu_direction_input()
139 unsigned int pin, int value) in sama5d2_piobu_direction_output() argument
146 return sama5d2_piobu_write_value(chip, pin, PIOBU_DIRECTION | PIOBU_SOD, in sama5d2_piobu_direction_output()
153 static int sama5d2_piobu_get(struct gpio_chip *chip, unsigned int pin) in sama5d2_piobu_get() argument
156 int ret = sama5d2_piobu_get_direction(chip, pin); in sama5d2_piobu_get()
159 ret = sama5d2_piobu_read_value(chip, pin, PIOBU_PDS); in sama5d2_piobu_get()
161 ret = sama5d2_piobu_read_value(chip, pin, PIOBU_SOD); in sama5d2_piobu_get()
172 static void sama5d2_piobu_set(struct gpio_chip *chip, unsigned int pin, in sama5d2_piobu_set() argument
180 sama5d2_piobu_write_value(chip, pin, PIOBU_SOD, value); in sama5d2_piobu_set()