Skip to content

Commit

Permalink
drivers: gpio: PCF857x: Modify PCF8574 driver
Browse files Browse the repository at this point in the history
Modify existing PCF8574 driver as PCF857x to be used with both PCF8574 and PCF8575.
PCF8574 - 8 channel I/O expander
PCF8575 - 16 channel I/O expander

Signed-off-by: Amrith Venkat Kesavamoorthi <amrith@mr-beam.org>
  • Loading branch information
amrithvenkat committed Dec 29, 2023
1 parent 634416b commit 6018aa5
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 116 deletions.
2 changes: 1 addition & 1 deletion drivers/gpio/CMakeLists.txt
Expand Up @@ -55,7 +55,7 @@ zephyr_library_sources_ifdef(CONFIG_GPIO_SNPS_CREG gpio_creg_gpio.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_STMPE1600 gpio_stmpe1600.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_XEC_V2 gpio_mchp_xec_v2.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCA953X gpio_pca953x.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCF8574 gpio_pcf8574.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_PCF857X gpio_pcf857x.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_FXL6408 gpio_fxl6408.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_ANDES_ATCGPIO100 gpio_andes_atcgpio100.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_NEORV32 gpio_neorv32.c)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/Kconfig
Expand Up @@ -159,7 +159,7 @@ source "drivers/gpio/Kconfig.stmpe1600"

source "drivers/gpio/Kconfig.pca953x"

source "drivers/gpio/Kconfig.pcf8574"
source "drivers/gpio/Kconfig.pcf857x"

source "drivers/gpio/Kconfig.fxl6408"

Expand Down
19 changes: 0 additions & 19 deletions drivers/gpio/Kconfig.pcf8574

This file was deleted.

20 changes: 20 additions & 0 deletions drivers/gpio/Kconfig.pcf857x
@@ -0,0 +1,20 @@
# PCF857x GPIO configuration options

# Copyright (c) 2022 Ithinx
# Copyright (c) 2023 Mr Beam Lasers GmbH
# Copyright (c) 2023 Amrith Venkat Kesavamoorthi <amrith@mr-beam.org>

menuconfig GPIO_PCF857X
bool "PCF857X I2C GPIO chip"
default y
depends on DT_HAS_NXP_PCF857X_ENABLED
select I2C
help
Enable driver for PCF857X I2C GPIO chip.

config GPIO_PCF857X_INIT_PRIORITY
int "Init priority"
default 70
depends on GPIO_PCF857X
help
Device driver initialization priority.

0 comments on commit 6018aa5

Please sign in to comment.