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

support i3c auto hot-join and fix wrong gpio setting #135

Merged
merged 5 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions drivers/gpio/gpio_npcm4xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,14 @@ static int gpio_npcm4xx_config(const struct device *dev,
else
inst->PTYPE &= ~mask;

/* Select opend drain with pull up need enable GPIO_PULL_EN */
if (((flags & GPIO_OPEN_DRAIN) != 0) &&
((flags & GPIO_PULL_UP) != 0)) {
inst_scfg->DEVALTCX |= BIT(NPCM4XX_DEVALTCX_GPIO_PULL_EN);
/* Open drain output mode want to enable internal pull up/down */
if ((flags & GPIO_OPEN_DRAIN) && (flags & GPIO_OUTPUT)) {
if ((flags & GPIO_PULL_UP)) {
inst_scfg->DEVALTCX |= BIT(NPCM4XX_DEVALTCX_GPIO_PULL_EN);
}
}

/* Select pull-up/down of GPIO 0:pull-up 1:pull-down */
/* Enable and select pull-up/down of GPIO 0:pull-up 1:pull-down */
if ((flags & GPIO_PULL_UP) != 0) {
inst->PPUD &= ~mask;
inst->PPULL |= mask;
Expand Down
Loading
Loading