Lines Matching refs:io_port
65 const unsigned int io_port = offset / 8; in gpiomm_gpio_direction_input() local
66 const unsigned int control_port = io_port / 3; in gpiomm_gpio_direction_input()
74 if (io_port == 2 || io_port == 5) { in gpiomm_gpio_direction_input()
77 gpiommgpio->io_state[io_port] |= 0xF0; in gpiomm_gpio_direction_input()
80 gpiommgpio->io_state[io_port] |= 0x0F; in gpiomm_gpio_direction_input()
84 gpiommgpio->io_state[io_port] |= 0xFF; in gpiomm_gpio_direction_input()
85 if (io_port == 0 || io_port == 3) in gpiomm_gpio_direction_input()
103 const unsigned int io_port = offset / 8; in gpiomm_gpio_direction_output() local
104 const unsigned int control_port = io_port / 3; in gpiomm_gpio_direction_output()
107 const unsigned int out_port = (io_port > 2) ? io_port + 1 : io_port; in gpiomm_gpio_direction_output()
114 if (io_port == 2 || io_port == 5) { in gpiomm_gpio_direction_output()
117 gpiommgpio->io_state[io_port] &= 0x0F; in gpiomm_gpio_direction_output()
120 gpiommgpio->io_state[io_port] &= 0xF0; in gpiomm_gpio_direction_output()
124 gpiommgpio->io_state[io_port] &= 0x00; in gpiomm_gpio_direction_output()
125 if (io_port == 0 || io_port == 3) in gpiomm_gpio_direction_output()
132 gpiommgpio->out_state[io_port] |= mask; in gpiomm_gpio_direction_output()
134 gpiommgpio->out_state[io_port] &= ~mask; in gpiomm_gpio_direction_output()
139 outb(gpiommgpio->out_state[io_port], gpiommgpio->base + out_port); in gpiomm_gpio_direction_output()