-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[TOPIC-GPIO] drivers: gpio_mchp_xec: update to use new GPIO API #19555
[TOPIC-GPIO] drivers: gpio_mchp_xec: update to use new GPIO API #19555
Conversation
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.
@dcpleung have you run the updated tests/drivers/gpio/gpio_basic_api
?
drivers/gpio/gpio_mchp_xec.c
Outdated
u32_t gpio_interrupt = 0; | ||
u32_t pcr1 = 0U; | ||
u32_t mask = 0U; | ||
__IO u32_t *gpio_base = (__IO u32_t *)(GPIO_PAROUT_BASE |
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.
HAL has MCHP_GPIO_PAROUT_ADDR(n) where n is the port number 0 <= port num < NUM_MCHP_GPIO_PORTS
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.
MCHP_GPIO_BASE_ADDR
is not defined so those macros cannot be used.
Yes, the test passed. I also tried manually with the sample |
This adds an overlay file for board mec15xxevb_assy6853 for the gpio_basic_api test. Signed-off-by: Daniel Leung <[email protected]>
This adds LEDs into the DTS file so various GPIO tests can utilize this definitions. Signed-off-by: Daniel Leung <[email protected]>
Rebased to latest |
Update driver code and board files to use new GPIO configuration flags such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver API as well as gpio_pin_interrupt_configure function. Signed-off-by: Daniel Leung <[email protected]>
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.
The code looks good. Since the driver supports simultaneous input/output configuration could you also run the tests/drivers/gpio/gpio_api_1pin
test? All the test_gpio_port_*
test cases are unfortunately going to fail on your board (I'm working on the fix), please ignore. The remaining should pass.
I ran it too and it passed. |
Update driver code and board files to use new GPIO configuration flags
such as GPIO_ACTIVE_LOW. Also add implementation of new port_* driver
API as well as gpio_pin_interrupt_configure function.
Signed-off-by: Daniel Leung [email protected]