diff options
author | Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> | 2025-08-06 20:55:51 +0100 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2025-08-11 11:44:40 +0200 |
commit | a3455a0c24834eaa20f032b214d53b1607d60073 (patch) | |
tree | 834519e7123fac652ae5b18a158dbbc585f4bf71 /rust/helpers/atomic.c | |
parent | 27c76cc93c6c2ee6c0d7fec6dedc1214a977e66f (diff) |
pinctrl: renesas: rzg2l: Unify OEN access by making pin-to-bit mapping configurable
Refactor the RZG2L pinctrl driver to support reuse of the common
rzg2l_read_oen() and rzg2l_write_oen() helpers across SoCs with
different output-enable (OEN) bit mappings.
Introduce a new `pin_to_oen_bit` callback in `struct rzg2l_pinctrl_data`
to allow SoCs to provide custom logic for mapping a pin to its OEN bit.
Update the generic OEN read/write paths to use this callback when present.
With this change, SoCs like RZ/G3S can reuse the common OEN handling
code by simply supplying their own `pin_to_oen_bit` implementation.
The previously duplicated `rzg3s_oen_read()` and `rzg3s_oen_write()`
functions are now removed.
This improves maintainability and prepares the driver for supporting
future SoCs with minimal duplication.
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/20250806195555.1372317-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'rust/helpers/atomic.c')
0 files changed, 0 insertions, 0 deletions