Skip to content
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

gpio: gpio_sch: error when configure for level triggers #13076

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

dcpleung
Copy link
Member

@dcpleung dcpleung commented Feb 5, 2019

The GPIO controller only supports edge triggering according to
the descriptions of the associated registers. So errors out
when level trigger is requested. Also adds the option to do
double edges triggering as the controller supports this.

Fixes #12763

Signed-off-by: Daniel Leung daniel.leung@intel.com

The GPIO controller only supports edge triggering according to
the descriptions of the associated registers. So errors out
when level trigger is requested. Also adds the option to do
double edges triggering as the controller supports this.

Fixes zephyrproject-rtos#12763

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
@codecov-io
Copy link

Codecov Report

Merging #13076 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13076   +/-   ##
=======================================
  Coverage   48.63%   48.63%           
=======================================
  Files         313      313           
  Lines       46436    46436           
  Branches    10710    10710           
=======================================
  Hits        22585    22585           
  Misses      19395    19395           
  Partials     4456     4456

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cc355d...9875806. Read the comment docs.

@galak galak merged commit 69d4d32 into zephyrproject-rtos:master Feb 7, 2019
@@ -128,6 +131,12 @@ static int gpio_sch_config(struct device *dev,
{
const struct gpio_sch_config *info = dev->config->config_info;

/* Do some sanity check first */
if (flags & (GPIO_INT | GPIO_INT_LEVEL)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dcpleung @galak @tbursztyka I'm reasonably sure this doesn't do what you think it does, because GPIO_INT_LEVEL is zero. So I'm pretty sure you've made it so that you're exiting with -EINVAL if interrupts are enabled.

There were commits in #11880 which addressed several similar bugs (esp32 in particular is also broken).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting me know. I have submitted #13143 to fix this.

@dcpleung dcpleung deleted the gpio_sch_fix_12764 branch February 7, 2019 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants