Home | History | Annotate | Download | only in gpio

Lines Matching refs:pin

58 int at91_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)
62 if (at91_port && (pin < GPIO_PER_BANK))
63 at91_set_port_pullup(at91_port, pin, use_pullup);
69 * mux the pin to the "GPIO" peripheral role.
71 int at91_set_pio_periph(unsigned port, unsigned pin, int use_pullup)
76 if (at91_port && (pin < GPIO_PER_BANK)) {
77 mask = 1 << pin;
79 at91_set_pio_pullup(port, pin, use_pullup);
87 * mux the pin to the "A" internal peripheral role.
89 int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup)
94 if (at91_port && (pin < GPIO_PER_BANK)) {
95 mask = 1 << pin;
97 at91_set_pio_pullup(port, pin, use_pullup);
106 * mux the pin to the "B" internal peripheral role.
108 int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup)
113 if (at91_port && (pin < GPIO_PER_BANK)) {
114 mask = 1 << pin;
116 at91_set_pio_pullup(port, pin, use_pullup);
125 * mux the pin to the "A" internal peripheral role.
127 int at91_pio3_set_a_periph(unsigned port, unsigned pin, int use_pullup)
132 if (at91_port && (pin < GPIO_PER_BANK)) {
133 mask = 1 << pin;
135 at91_set_pio_pullup(port, pin, use_pullup);
148 * mux the pin to the "B" internal peripheral role.
150 int at91_pio3_set_b_periph(unsigned port, unsigned pin, int use_pullup)
155 if (at91_port && (pin < GPIO_PER_BANK)) {
156 mask = 1 << pin;
158 at91_set_pio_pullup(port, pin, use_pullup);
170 * mux the pin to the "C" internal peripheral role.
172 int at91_pio3_set_c_periph(unsigned port, unsigned pin, int use_pullup)
177 if (at91_port && (pin < GPIO_PER_BANK)) {
178 mask = 1 << pin;
180 at91_set_pio_pullup(port, pin, use_pullup);
192 * mux the pin to the "D" internal peripheral role.
194 int at91_pio3_set_d_periph(unsigned port, unsigned pin, int use_pullup)
199 if (at91_port && (pin < GPIO_PER_BANK)) {
200 mask = 1 << pin;
202 at91_set_pio_pullup(port, pin, use_pullup);
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)
244 if (at91_port && (pin < GPIO_PER_BANK))
245 at91_set_port_input(at91_port, pin, use_pullup);
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)
274 if (at91_port && (pin < GPIO_PER_BANK))
275 at91_set_port_output(at91_port, pin, value);
283 int at91_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
288 if (at91_port && (pin < GPIO_PER_BANK)) {
289 mask = 1 << pin;
302 int at91_pio3_set_pio_deglitch(unsigned port, unsigned pin, int is_on)
307 if (at91_port && (pin < GPIO_PER_BANK)) {
308 mask = 1 << pin;
323 int at91_pio3_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div)
328 if (at91_port && (pin < GPIO_PER_BANK)) {
329 mask = 1 << pin;
346 int at91_pio3_set_pio_pulldown(unsigned port, unsigned pin, int is_on)
351 if (at91_port && (pin < GPIO_PER_BANK)) {
352 mask = 1 << pin;
354 at91_set_pio_pullup(port, pin, 0);
363 int at91_pio3_set_pio_pullup(unsigned port, unsigned pin, int use_pullup)
368 at91_pio3_set_pio_pulldown(port, pin, 0);
370 if (at91_port && (pin < GPIO_PER_BANK))
371 at91_set_port_pullup(at91_port, pin, use_pullup);
379 int at91_pio3_set_pio_disable_schmitt_trig(unsigned port, unsigned pin)
384 if (at91_port && (pin < GPIO_PER_BANK)) {
385 mask = 1 << pin;
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)
402 if (at91_port && (pin < GPIO_PER_BANK)) {
403 mask = 1 << pin;
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)
432 if (at91_port && (pin < GPIO_PER_BANK))
433 at91_set_port_value(at91_port, pin, 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)
454 if (at91_port && (pin < GPIO_PER_BANK))
455 return at91_get_port_value(at91_port, pin);
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' */