Skip to content

Conversation

@galak
Copy link
Contributor

@galak galak commented Sep 25, 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.

We treat GPIO_INT_MODE_LEVEL as not supported as the hardware doesn't
seem to handle level interrupts as one would expect. Looking into this
further to determine if its a HW bug or some misconfiguration in the
software.

Tested on musca-a board.

Signed-off-by: Kumar Gala [email protected]

@zephyrbot
Copy link

zephyrbot commented Oct 2, 2019

All checks passed.

checkpatch (informational only, not a failure)

-:144: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#144: FILE: drivers/gpio/gpio_cmsdk_ahb.c:253:
+	 * interrupts until the cause is cleared */

- total: 0 errors, 1 warnings, 192 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: Ignored message types: AVOID_EXTERNS BRACES CONFIG_EXPERIMENTAL CONST_STRUCT DATE_TIME FILE_PATH_CHANGES MINMAX NETWORKING_BLOCK_COMMENT_STYLE PRINTK_WITHOUT_KERN_LEVEL SPLIT_STRING VOLATILE

NOTE: If any of the errors are false positives, please report
      them to the maintainers.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@galak galak requested a review from pabigot as a code owner October 18, 2019 18:56
@galak galak requested a review from mnkp October 18, 2019 18:57
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.

Looks good, however there is some old interrupt configuration code left over. In the cmsdk_ahb_gpio_config function we need to remove the whole if (flags & GPIO_INT) { statement.

@galak galak requested a review from mnkp October 21, 2019 14:13
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.

There is still some old interrupt configuration code left over in the cmsdk_ahb_gpio_config function. Lines 124 to 149.

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.

We treat GPIO_INT_MODE_LEVEL as not supported as the hardware doesn't
seem to handle level interrupts as one would expect.  Looking into this
further to determine if its a HW bug or some misconfiguration in the
software.

We don't support dynamic setting of PULL_UP/PULL_DOWN config as this is
handled by pinctrl for the current boards we support the CMSDK AHB
driver on.

Tested on musca-a board.

Signed-off-by: Kumar Gala <[email protected]>
@galak
Copy link
Contributor Author

galak commented Oct 21, 2019

There is still some old interrupt configuration code left over in the cmsdk_ahb_gpio_config function. Lines 124 to 149.

removed.

@galak galak requested a review from mnkp October 21, 2019 19:50
@galak galak merged commit 328a2ab into zephyrproject-rtos:topic-gpio Oct 22, 2019
@galak galak deleted the gpio-new-musca branch October 22, 2019 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants