/* Internal pulls feature: None, weak pull-up, weak pull-down, or repeater mode (both pulls enabled). We do not touch this field unless one or more of the DT booleans are set. If the no-bias boolean is set then disable internal pulls. If pull up and/or down is set enable the respective pull or both for what MCHP calls repeater(keeper) mode.  */
static uint32_t prog_pud(uint32_t pcr1, uint32_t conf)
/* Internal pulls feature: None, weak pull-up, weak pull-down, or repeater mode (both pulls enabled). We do not touch this field unless one or more of the DT booleans are set. If the no-bias boolean is set then disable internal pulls. If pull up and/or down is set enable the respective pull or both for what MCHP calls repeater(keeper) mode.  */
static uint32_t prog_pud(uint32_t pcr1, uint32_t conf)
{
	if (conf & BIT(MCHP_XEC_NO_PUD_POS)) {
		pcr1 &= ~(MCHP_GPIO_CTRL_PUD_MASK);
		pcr1 |= MCHP_GPIO_CTRL_PUD_NONE;
		return pcr1;
	}
	if (conf & (BIT(MCHP_XEC_PU_POS) | BIT(MCHP_XEC_PD_POS))) {
		pcr1 &= ~(MCHP_GPIO_CTRL_PUD_MASK);
		if (conf & BIT(MCHP_XEC_PU_POS)) {
			pcr1 |= MCHP_GPIO_CTRL_PUD_PU;
		}
		if (conf & BIT(MCHP_XEC_PD_POS)) {
			pcr1 |= MCHP_GPIO_CTRL_PUD_PD;
		}
	}
	return pcr1;
}