Lines Matching +full:enable +full:- +full:output +full:- +full:invert

2  * Copyright (c) 2016 Open-RnD Sp. z o.o.
7 * SPDX-License-Identifier: Apache-2.0
16 * Microchip XEC: each GPIO pin has two 32-bit control register.
17 * The first 32-bit register contains all pin features except
41 val |= ((drvstr - 1u) << MCHP_GPIO_CTRL2_DRV_STR_POS); in config_drive_slew()
48 regs->CTRL2[idx] = (regs->CTRL2[idx] & ~msk) | (val & msk); in config_drive_slew()
53 * None, weak pull-up, weak pull-down, or repeater mode (both pulls enabled).
55 * If the no-bias boolean is set then disable internal pulls.
56 * If pull up and/or down is set enable the respective pull or both for what
81 * DT enable booleans take precedence over disable booleans.
82 * We initially clear alternate output disable allowing us to set output state
83 * in the control register. Hardware sets output state bit in both control and
84 * parallel output register bits. Alternate output disable only controls which
87 * alternate function is input or bi-directional.
88 * Note 1: hardware allows input and output to be simultaneously enabled.
99 return -EINVAL; in xec_config_pin()
107 /* Clear alternate output disable and input pad disable */ in xec_config_pin()
108 regs->CTRL[idx] &= ~(BIT(MCHP_GPIO_CTRL_AOD_POS) | BIT(MCHP_GPIO_CTRL_INPAD_DIS_POS)); in xec_config_pin()
109 pcr1 = regs->CTRL[idx]; /* current configuration including pin input state */ in xec_config_pin()
110 pcr1 = regs->CTRL[idx]; /* read multiple times to allow propagation from pad */ in xec_config_pin()
111 pcr1 = regs->CTRL[idx]; /* Is this necessary? */ in xec_config_pin()
115 /* Touch output enable. We always enable input */ in xec_config_pin()
123 /* Touch output state? Bit can be set even if the direction is input only */ in xec_config_pin()
131 /* Touch output buffer type? */ in xec_config_pin()
151 /* Always touch invert of alternate function. Need another bit to avoid touching */ in xec_config_pin()
158 /* output state set in control & parallel regs */ in xec_config_pin()
159 regs->CTRL[idx] = pcr1; in xec_config_pin()
160 /* make output state in control read-only in control and read-write in parallel reg */ in xec_config_pin()
161 regs->CTRL[idx] = pcr1 | BIT(MCHP_GPIO_CTRL_AOD_POS); in xec_config_pin()
179 return -EINVAL; in pinctrl_configure_pins()