Skip to content

Commit

Permalink
gpio: it8xxx2: open source configuration isn't supported
Browse files Browse the repository at this point in the history
This makes test of tests/drivers/gpio/gpio_api_1pin happy
on it8xxx2_evb.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
  • Loading branch information
Dino-Li authored and nashif committed Jan 5, 2022
1 parent 22d2bc9 commit a89e60d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpio/gpio_ite_it8xxx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,12 @@ static int gpio_ite_configure(const struct device *dev,
__ASSERT(gpio_config->index < GPIO_GROUP_COUNT,
"Invalid GPIO group index");

/* Don't support "open source" mode */
if (((flags & GPIO_SINGLE_ENDED) != 0) &&
((flags & GPIO_LINE_OPEN_DRAIN) == 0)) {
return -ENOTSUP;
}

/*
* Select open drain first, so that we don't glitch the signal
* when changing the line to an output.
Expand Down

0 comments on commit a89e60d

Please sign in to comment.