Skip to content

Commit 13dcd63

Browse files
prabhakarladgeertu
authored andcommitted
pinctrl: renesas: rzg2l: Move RZG2L_SINGLE_PIN definition to top of the file
Define `RZG2L_SINGLE_PIN` at the top of the file to clarify its use for dedicated pins for improved readability. While at it update the comment for `RZG2L_SINGLE_PIN_PACK` macro and place it just above the macro for clarity. Signed-off-by: Lad Prabhakar <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Tested-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent f0cdf87 commit 13dcd63

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/pinctrl/renesas/pinctrl-rzg2l.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@
6464
#define PIN_CFG_ELC BIT(20)
6565
#define PIN_CFG_IOLH_RZV2H BIT(21)
6666

67+
#define RZG2L_SINGLE_PIN BIT_ULL(63) /* Dedicated pin */
68+
6769
#define RZG2L_MPXED_COMMON_PIN_FUNCS(group) \
6870
(PIN_CFG_IOLH_##group | \
6971
PIN_CFG_PUPD | \
@@ -105,15 +107,13 @@
105107
*/
106108
#define RZG2L_GPIO_PORT_PACK(n, a, f) RZG2L_GPIO_PORT_SPARSE_PACK((1ULL << (n)) - 1, (a), (f))
107109

108-
/*
109-
* BIT(63) indicates dedicated pin, p is the register index while
110-
* referencing to SR/IEN/IOLH/FILxx registers, b is the register bits
111-
* (b * 8) and f is the pin configuration capabilities supported.
112-
*/
113-
#define RZG2L_SINGLE_PIN BIT_ULL(63)
114110
#define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK_ULL(62, 56)
115111
#define RZG2L_SINGLE_PIN_BITS_MASK GENMASK_ULL(55, 53)
116-
112+
/*
113+
* p is the register index while referencing to SR/IEN/IOLH/FILxx
114+
* registers, b is the register bits (b * 8) and f is the pin
115+
* configuration capabilities supported.
116+
*/
117117
#define RZG2L_SINGLE_PIN_PACK(p, b, f) (RZG2L_SINGLE_PIN | \
118118
FIELD_PREP_CONST(RZG2L_SINGLE_PIN_INDEX_MASK, (p)) | \
119119
FIELD_PREP_CONST(RZG2L_SINGLE_PIN_BITS_MASK, (b)) | \

0 commit comments

Comments
 (0)