pinctrl: renesas: rzg2l: Add support for pull-up/down
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 30 May 2024 17:38:53 +0000 (18:38 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 11 Jun 2024 07:50:24 +0000 (09:50 +0200)
commit19d4bce9ce876ad0ee4240ebd849b730b3dc3763
treeaa30b1aabe6e3e530518f51e0596b73152ee7944
parentb588b53b2c474bdebbac0a663e0a6a0390db2fdf
pinctrl: renesas: rzg2l: Add support for pull-up/down

Add support to configure bias-disable, bias-pull-up, and bias-pull-down
properties of the pin.

Two new function pointers, hw_to_bias_param() and bias_param_to_hw(),
are introduced in the struct rzg2l_pinctrl_data to configure bias
settings, as the values in the PUPD register differ when compared to the
RZ/G2L family and the RZ/V2H(P) SoC.

Value | RZ/G2L        | RZ/V2H
---------------------------------
00b:  | Bias Disabled | Pull up/down disabled
01b:  | Pull-up       | Pull up/down disabled
10b:  | Pull-down     | Pull-down
11b:  | Prohibited    | Pull-up

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20240530173857.164073-12-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/renesas/pinctrl-rzg2l.c