Lines Matching full:pin

58 int at91_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)  in at91_set_pio_pullup()  argument
62 if (at91_port && (pin < GPIO_PER_BANK)) in at91_set_pio_pullup()
63 at91_set_port_pullup(at91_port, pin, use_pullup); in at91_set_pio_pullup()
69 * mux the pin to the "GPIO" peripheral role.
71 int at91_set_pio_periph(unsigned port, unsigned pin, int use_pullup) in at91_set_pio_periph() argument
76 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_set_pio_periph()
77 mask = 1 << pin; in at91_set_pio_periph()
79 at91_set_pio_pullup(port, pin, use_pullup); in at91_set_pio_periph()
87 * mux the pin to the "A" internal peripheral role.
89 int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup) in at91_set_a_periph() argument
94 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_set_a_periph()
95 mask = 1 << pin; in at91_set_a_periph()
97 at91_set_pio_pullup(port, pin, use_pullup); in at91_set_a_periph()
106 * mux the pin to the "B" internal peripheral role.
108 int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup) in at91_set_b_periph() argument
113 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_set_b_periph()
114 mask = 1 << pin; in at91_set_b_periph()
116 at91_set_pio_pullup(port, pin, use_pullup); in at91_set_b_periph()
125 * mux the pin to the "A" internal peripheral role.
127 int at91_pio3_set_a_periph(unsigned port, unsigned pin, int use_pullup) in at91_pio3_set_a_periph() argument
132 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_a_periph()
133 mask = 1 << pin; in at91_pio3_set_a_periph()
135 at91_set_pio_pullup(port, pin, use_pullup); in at91_pio3_set_a_periph()
148 * mux the pin to the "B" internal peripheral role.
150 int at91_pio3_set_b_periph(unsigned port, unsigned pin, int use_pullup) in at91_pio3_set_b_periph() argument
155 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_b_periph()
156 mask = 1 << pin; in at91_pio3_set_b_periph()
158 at91_set_pio_pullup(port, pin, use_pullup); in at91_pio3_set_b_periph()
170 * mux the pin to the "C" internal peripheral role.
172 int at91_pio3_set_c_periph(unsigned port, unsigned pin, int use_pullup) in at91_pio3_set_c_periph() argument
177 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_c_periph()
178 mask = 1 << pin; in at91_pio3_set_c_periph()
180 at91_set_pio_pullup(port, pin, use_pullup); in at91_pio3_set_c_periph()
192 * mux the pin to the "D" internal peripheral role.
194 int at91_pio3_set_d_periph(unsigned port, unsigned pin, int use_pullup) in at91_pio3_set_d_periph() argument
199 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_d_periph()
200 mask = 1 << pin; in at91_pio3_set_d_periph()
202 at91_set_pio_pullup(port, pin, use_pullup); in at91_pio3_set_d_periph()
237 * mux the pin to the gpio controller (instead of "A" or "B" peripheral), and
240 int at91_set_pio_input(unsigned port, u32 pin, int use_pullup) in at91_set_pio_input() argument
244 if (at91_port && (pin < GPIO_PER_BANK)) in at91_set_pio_input()
245 at91_set_port_input(at91_port, pin, use_pullup); in at91_set_pio_input()
267 * mux the pin to the gpio controller (instead of "A" or "B" peripheral),
270 int at91_set_pio_output(unsigned port, u32 pin, int value) in at91_set_pio_output() argument
274 if (at91_port && (pin < GPIO_PER_BANK)) in at91_set_pio_output()
275 at91_set_port_output(at91_port, pin, value); in at91_set_pio_output()
283 int at91_set_pio_deglitch(unsigned port, unsigned pin, int is_on) in at91_set_pio_deglitch() argument
288 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_set_pio_deglitch()
289 mask = 1 << pin; in at91_set_pio_deglitch()
302 int at91_pio3_set_pio_deglitch(unsigned port, unsigned pin, int is_on) in at91_pio3_set_pio_deglitch() argument
307 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_pio_deglitch()
308 mask = 1 << pin; in at91_pio3_set_pio_deglitch()
323 int at91_pio3_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div) in at91_pio3_set_pio_debounce() argument
328 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_pio_debounce()
329 mask = 1 << pin; in at91_pio3_set_pio_debounce()
346 int at91_pio3_set_pio_pulldown(unsigned port, unsigned pin, int is_on) in at91_pio3_set_pio_pulldown() argument
351 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_pio_pulldown()
352 mask = 1 << pin; in at91_pio3_set_pio_pulldown()
354 at91_set_pio_pullup(port, pin, 0); in at91_pio3_set_pio_pulldown()
363 int at91_pio3_set_pio_pullup(unsigned port, unsigned pin, int use_pullup) in at91_pio3_set_pio_pullup() argument
368 at91_pio3_set_pio_pulldown(port, pin, 0); in at91_pio3_set_pio_pullup()
370 if (at91_port && (pin < GPIO_PER_BANK)) in at91_pio3_set_pio_pullup()
371 at91_set_port_pullup(at91_port, pin, use_pullup); in at91_pio3_set_pio_pullup()
379 int at91_pio3_set_pio_disable_schmitt_trig(unsigned port, unsigned pin) in at91_pio3_set_pio_disable_schmitt_trig() argument
384 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_pio3_set_pio_disable_schmitt_trig()
385 mask = 1 << pin; in at91_pio3_set_pio_disable_schmitt_trig()
395 * allows the output pin to run as an open collector output.
397 int at91_set_pio_multi_drive(unsigned port, unsigned pin, int is_on) in at91_set_pio_multi_drive() argument
402 if (at91_port && (pin < GPIO_PER_BANK)) { in at91_set_pio_multi_drive()
403 mask = 1 << pin; in at91_set_pio_multi_drive()
426 * assuming the pin is muxed as a gpio output, set its value.
428 int at91_set_pio_value(unsigned port, unsigned pin, int value) in at91_set_pio_value() argument
432 if (at91_port && (pin < GPIO_PER_BANK)) in at91_set_pio_value()
433 at91_set_port_value(at91_port, pin, value); in at91_set_pio_value()
448 * read the pin's value (works even if it's not muxed as a gpio).
450 int at91_get_pio_value(unsigned port, unsigned pin) in at91_get_pio_value() argument
454 if (at91_port && (pin < GPIO_PER_BANK)) in at91_get_pio_value()
455 return at91_get_port_value(at91_port, pin); in at91_get_pio_value()
508 /* set GPIO pin 'gpio' as an input */
518 /* set GPIO pin 'gpio' as an output, with polarity 'value' */
529 /* read GPIO IN value of pin 'gpio' */
537 /* write GPIO OUT value to pin 'gpio' */