Skip to content

Conversation

@dcpleung
Copy link
Member

@dcpleung dcpleung commented Oct 2, 2019

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]

@dcpleung dcpleung requested review from galak and nashif October 2, 2019 20:19
@galak galak changed the title drivers: gpio_mchp_xec: update to use new GPIO API [TOPIC-GPIO] drivers: gpio_mchp_xec: update to use new GPIO API Oct 2, 2019
Copy link
Contributor

@galak galak left a 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?

Copy link
Contributor

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

Copy link
Member Author

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.

@dcpleung
Copy link
Member Author

dcpleung commented Oct 2, 2019

@dcpleung have you run the updated tests/drivers/gpio/gpio_basic_api?

Yes, the test passed. I also tried manually with the sample samples/drivers/gpio/.

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]>
@zephyrbot zephyrbot added area: Boards area: Tests Issues related to a particular existing or missing test labels Oct 7, 2019
@dcpleung
Copy link
Member Author

dcpleung commented Oct 7, 2019

Rebased to latest topic-gpio and tested with both gpio_basic_api and gpio_api_1pin.

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]>
@mnkp mnkp added the area: GPIO label Oct 8, 2019
Copy link
Member

@mnkp mnkp left a 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.

@dcpleung
Copy link
Member Author

dcpleung commented Oct 8, 2019

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.

@MaureenHelm MaureenHelm merged commit 8d78539 into zephyrproject-rtos:topic-gpio Oct 9, 2019
@dcpleung dcpleung deleted the xec_gpio_api branch October 9, 2019 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards area: GPIO area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants