soc: arm: microchip: mec172x: Add macro to get pin mux value

Add macro to read pin mux control value

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
This commit is contained in:
Jose Alberto Meza 2023-08-21 14:09:40 -07:00 committed by Johan Hedberg
parent 080d31dede
commit 83c031556b
1 changed files with 3 additions and 0 deletions

View File

@ -92,6 +92,9 @@
#define MCHP_GPIO_CTRL_MUX_F7 SHLU32(7, MCHP_GPIO_CTRL_MUX_POS)
#define MCHP_GPIO_CTRL_MUX(n) SHLU32(((n) & 0x7u), MCHP_GPIO_CTRL_MUX_POS)
#define MCHP_GPIO_CTRL_MUX_GET(x) (((uint32_t)(x) >> MCHP_GPIO_CTRL_MUX_POS)\
& MCHP_GPIO_CTRL_MUX_MASK0)
/*
* bit[15] Disables input pad leaving output pad enabled
* Useful for reducing power consumption of output only pins.