Skip to content

Commit a27a09c

Browse files
anangltejlmand
authored andcommitted
[nrf fromlist] drivers: gpio: Add support for PCAL6408A I/O expander
Upstream PR: zephyrproject-rtos/zephyr#31624 Add GPIO driver and devicetree binding for the PCAL6408A 8-bit I2C-bus I/O expander. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent d5c04f9 commit a27a09c

File tree

5 files changed

+723
-0
lines changed

5 files changed

+723
-0
lines changed

drivers/gpio/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ zephyr_library_sources_ifdef(CONFIG_GPIO_LPC11U6X gpio_lpc11u6x.c)
3434
zephyr_library_sources_ifdef(CONFIG_GPIO_XLNX_AXI gpio_xlnx_axi.c)
3535
zephyr_library_sources_ifdef(CONFIG_GPIO_NPCX gpio_npcx.c)
3636
zephyr_library_sources_ifdef(CONFIG_GPIO_EMUL gpio_emul.c)
37+
zephyr_library_sources_ifdef(CONFIG_GPIO_PCAL6408A gpio_pcal6408a.c)
3738

3839
zephyr_library_sources_ifdef(CONFIG_GPIO_SHELL gpio_shell.c)
3940

drivers/gpio/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,6 @@ source "drivers/gpio/Kconfig.npcx"
8383

8484
source "drivers/gpio/Kconfig.emul"
8585

86+
source "drivers/gpio/Kconfig.pcal6408a"
87+
8688
endif # GPIO

drivers/gpio/Kconfig.pcal6408a

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# PCAL6408a GPIO configuration options
2+
3+
# Copyright (c) 2021 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Workaround for not being able to have commas in macro arguments
7+
DT_COMPAT_NXP_PCAL6408A := nxp,pcal6408a
8+
9+
menuconfig GPIO_PCAL6408A
10+
bool "PCAL6408A I2C GPIO chip"
11+
default $(dt_compat_enabled,$(DT_COMPAT_NXP_PCAL6408A))
12+
depends on I2C
13+
help
14+
Enable driver for PCAL6408A I2C GPIO chip.
15+
16+
config GPIO_PCAL6408A_INIT_PRIORITY
17+
int "Init priority"
18+
default 70
19+
depends on GPIO_PCAL6408A
20+
help
21+
Device driver initialization priority.

0 commit comments

Comments
 (0)