/* PCR peripheral sleep enable allows the clocks to a specific peripheral to be gated off if the peripheral is not requesting a clock. slp_idx = zero based index into 32-bit PCR sleep enable registers. slp_pos = bit position in the register slp_en if non-zero set the bit else clear the bit  */
int z_mchp_xec_pcr_periph_sleep(uint8_t slp_idx, uint8_t slp_pos, uint8_t slp_en)
/* PCR peripheral sleep enable allows the clocks to a specific peripheral to be gated off if the peripheral is not requesting a clock. slp_idx = zero based index into 32-bit PCR sleep enable registers. slp_pos = bit position in the register slp_en if non-zero set the bit else clear the bit  */
int z_mchp_xec_pcr_periph_sleep(uint8_t slp_idx, uint8_t slp_pos, uint8_t slp_en)
{
	struct pcr_hw_regs *const pcr = (struct pcr_hw_regs *)DT_INST_REG_ADDR_BY_IDX(0, 0);
	if ((slp_idx >= MCHP_MAX_PCR_SCR_REGS) || (slp_pos >= 32)) {
		return -EINVAL;
	}
	if (slp_en) {
		pcr->SLP_EN[slp_idx] |= BIT(slp_pos);
	} else {
		pcr->SLP_EN[slp_idx] &= ~BIT(slp_pos);
	}
	return 0;
}