-
Notifications
You must be signed in to change notification settings - Fork 7.9k
drivers: gpio: rts5912 remap gpio number #95165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -39,4 +39,112 @@ | |||
/** Interrupt Mask since rts5912 does not support GPIO_INT_LEVELS_LOGICAL*/ | |||
#define RTS5912_GPIO_INTR_MASK (1U << 21 | 1U << 22 | 1U << 24 | 1U << 25 | 1U << 26) | |||
|
|||
/** GPIO number map between spec and zephyr */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking suggestion "Map GPIO signal name to devicetree binding."
Please also add a comment describing how to use this macro. See dt-bindings/gpio/microchip-xec-gpio.h for an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the advice, I added it.
@@ -39,4 +39,112 @@ | |||
/** Interrupt Mask since rts5912 does not support GPIO_INT_LEVELS_LOGICAL*/ | |||
#define RTS5912_GPIO_INTR_MASK (1U << 21 | 1U << 22 | 1U << 24 | 1U << 25 | 1U << 26) | |||
|
|||
/** GPIO number map between spec and zephyr */ | |||
#define RTS5912_GPIO_NUM_000 &gpioa 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering the symbol name is just GPIO000
, I suggest dropping the _NUM_
designator.
#define RTS5912_GPIO_NUM_000 &gpioa 0 | |
#define RTS5912_GPIO000 &gpioa 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the advice, the _NUM_
is removed.
16035e8
to
7bde92c
Compare
Provide a map from RTS5912_GPIO_NUM_000 to RTS5912_GPIO_NUM_131 for appication call be easier read. For example: Used: <&gpiog 6 (GPIO_OUTPUT)> Now: <RTS5912_GPIO_NUM_102 (GPIO_OUTPUT)> Signed-off-by: Elmo Lan <elmo_lan@realtek.com>
|
Provide a map from RTS5912_GPIO_NUM_000 to RTS5912_GPIO_NUM_131
for appication call be easier read.
For example:
Used: <&gpiog 6 (GPIO_OUTPUT)>
Now: <RTS5912_GPIO_NUM_102 (GPIO_OUTPUT)>