Skip to content

drivers: gpio: add NXP pcal9722 gpio driver #91728

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions drivers/gpio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ zephyr_library_sources_ifdef(CONFIG_GPIO_PCA6416 gpio_pca6416.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCA953X gpio_pca953x.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCA95XX gpio_pca95xx.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCAL64XXA gpio_pcal64xxa.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCAL9722 gpio_pcal9722.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCA_SERIES gpio_pca_series.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCF857X gpio_pcf857x.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PSOC6 gpio_psoc6.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ source "drivers/gpio/Kconfig.pca953x"
source "drivers/gpio/Kconfig.pca95xx"
source "drivers/gpio/Kconfig.pca_series"
source "drivers/gpio/Kconfig.pcal64xxa"
source "drivers/gpio/Kconfig.pcal9722"
source "drivers/gpio/Kconfig.pcf857x"
source "drivers/gpio/Kconfig.psoc6"
source "drivers/gpio/Kconfig.rcar"
Expand Down
22 changes: 22 additions & 0 deletions drivers/gpio/Kconfig.pcal9722
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PCAL9722 GPIO configuration options

# Copyright 2025 Michael Estes
# SPDX-License-Identifier: Apache-2.0

menuconfig GPIO_PCAL9722
bool "PCAL9722 SPI GPIO chip"
default y
depends on DT_HAS_NXP_PCAL9722_ENABLED
depends on SPI
Copy link
Member

Choose a reason for hiding this comment

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

maybe select SPI instead, although I don't think best practice has been agreed upon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would have liked to have done this, but select SPI causes a dependency loop right now seemingly due to some boards where SPI depends on GPIO or vice versa.

help
Enable driver for PCAL9722 SPI GPIO chip.

if GPIO_PCAL9722

config GPIO_PCAL9722_INIT_PRIORITY
int "Init priority"
default 70
help
PCAL9722 Device driver initialization priority.

endif # GPIO_PCAL9722
Loading