On Wed, Aug 19, 2026 at 05:35:51PM +0300, Claudiu Beznea wrote: > From: Claudiu Beznea > > The previous code handled power sources using a mixture of power > source specific definitions and lookups in the available_ps[] array. > Unify the power source handling by introducing > struct rzg2l_pinctrl_ps_desc, whose purpose is to describe a power > source through its power source value, associated register value, > associated capabilities (e.g. Ethernet), and associated IOLH index. > > Introduce two new functions, rzg2l_ps_to_desc() and > rzg2l_pwr_reg_val_to_desc(), using the > RZG2L_PINCTRL_PS_DESC_MEMBER_TO_DESC_FUNC() macro, as their > implementations are similar. > > These functions retrieve a power source descriptor based on either a > power source value or a power source register value. Other functions > that need to perform power source specific operations can call them to > retrieve the corresponding power source descriptor. > > Signed-off-by: Claudiu Beznea Tested-by: Wolfram Sang