Lines Matching +full:alternate +full:- +full:port +full:- +full:control
4 * SPDX-License-Identifier: Apache-2.0
13 /* pinctrl Node contains the base address of the GPIO Control Registers */
21 /* encode GPIO pin number and alternate function for an I2C port */
30 * indexed by port number: all on VTR1 except as commented
32 * TODO: MEC15xx and MEC172x handle ports with alternate pins.
60 * Read pin states of specified I2C port.
61 * We GPIO control register always active RO pad input bit.
64 int soc_i2c_port_lines_get(uint8_t port, uint32_t *lines) in soc_i2c_port_lines_get() argument
71 if (!(BIT(port) & MEC_I2C_PORT_MASK) || !lines) { in soc_i2c_port_lines_get()
72 return -EINVAL; in soc_i2c_port_lines_get()
75 idx_scl = (uint32_t)mec_i2c_ports[port].scl_pin_no; in soc_i2c_port_lines_get()
76 idx_sda = (uint32_t)mec_i2c_ports[port].sda_pin_no; in soc_i2c_port_lines_get()
79 return -EINVAL; in soc_i2c_port_lines_get()
82 if (regs->CTRL[idx_scl] & BIT(MCHP_GPIO_CTRL_INPAD_VAL_POS)) { in soc_i2c_port_lines_get()
85 if (regs->CTRL[idx_sda] & BIT(MCHP_GPIO_CTRL_INPAD_VAL_POS)) { in soc_i2c_port_lines_get()