Re: [PATCH v5 3/5] pinctrl: renesas: rzg2l: Unify the power source handling

Wolfram Sang <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <aovm7EQkF8ssHpm5@ninjato>
On Wed, Aug 19, 2026 at 05:35:51PM +0300, Claudiu Beznea wrote:
> From: Claudiu Beznea <[email protected]>
> 
> 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 <[email protected]>

Tested-by: Wolfram Sang <[email protected]>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmqL5uwACgkQFA3kzBSg
KbaP7xAAhPq7TjuIS/IBE0L9UPw/gi5BrDp5CECq3wPig/fb8wYq92ItS9b0w6VM
BbLEI8LPMuSNvu7GOXZMVVJQFsYbMU6tBhZyXm4XT7lBToQvq1RPLb4pHw74t7oO
+5jJgiKmDoI+dj5qpPKU8L9lqIo8gtfM1vi47ujSQc4uC7P0O2UaMkCwQx8leGU/
OFZ95IE50Tz9Zts5GtmopLhiimjPx6CsBueMKGiC4pFlC+KUnU7ZPJyisQVTjg/q
JcYLcnAyKujLAlFRKt4nB/FI/w+Dq6xXd8ZWJ/hnSyvG8X7imbMxGCyI+HTBRpZr
bUYq9HgJE2jqKZ3sFu+cLfT7j6erEzE85AcTV6y0WwxqlsgY9t0bxNbC6tp5jOvk
o1TeQnkrbO44XP1kJ/BgDnsh5hH5tm9b9G+Z4mDJSERxtwDHqwKruaKFoKQD38Zj
rXYk8RM5L09BhGxI6iJXeS43OtHbrXs5bIqoOHwGHrZ3pfAbxz7s3LbJNti+l/pv
68svtPwPd2ZomVWmv17CbG4F89j8xjOpc9VzncK/PBXOFOS5OpYdd2WZHEQXenb7
mAe1HfjOAk/7XDFUb0vvatMLz7ad+nWtt3gtvvr68miZa3dHsTNmidgEXk8yGaOQ
Yz82eieohizIrLM9yYgqH39CcW8GUmPvIAjIIUX0y7zU5Rb7WWY=
=aUvr
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.