Skip to content

Commit

Permalink
drivers: gpio: max22190: Add MAX22190 octal input with diagnostics
Browse files Browse the repository at this point in the history
Add max22190 gpio driver with input functionality, since device
support only input with output.

Implemented diagnostic funcionality for all 8 channels
which include various check to over/under voltage and wire break.
Filtering configuration is done from devicetree on per channel
bases and is configured on chip start.

In case of some fault condition occure FAULT pin drive LOW which
prop to FAULT registers to be read. Data is stored in data structure
for furter analizes and ERR message is prited in console.

Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
  • Loading branch information
bogdanovs committed Apr 23, 2024
1 parent 5919bd9 commit b154371
Show file tree
Hide file tree
Showing 5 changed files with 787 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ zephyr_library_sources_ifdef(CONFIG_GPIO_RENESAS_RA gpio_renesas_ra.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_ENE_KB1200 gpio_ene_kb1200.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_RZT2M gpio_rzt2m.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_AMBIQ gpio_ambiq.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MAX22190 gpio_max22190.c)

if (CONFIG_GPIO_EMUL_SDL)
zephyr_library_sources(gpio_emul_sdl.c)
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,6 @@ source "drivers/gpio/Kconfig.rzt2m"

source "drivers/gpio/Kconfig.ambiq"

source "drivers/gpio/Kconfig.max22190"

endif # GPIO
20 changes: 20 additions & 0 deletions drivers/gpio/Kconfig.max22190
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2010-2024 Analog Devices Inc.
# Copyright (c) 2024 BayLibre SAS
# SPDX-License-Identifier: Apache-2.0

# MAX22190 GPIO configuration options

menuconfig GPIO_MAX22190
bool "MAX22190 GPIO driver"
default y
depends on DT_HAS_ADI_MAX22190_GPIO_ENABLED
help
Enabe MAX22190 Octal industrial digital
input with diagnostics

config GPIO_MAX22190_INIT_PRIORITY
int "Driver init priority"
default 99
depends on GPIO_MAX22190
help
Device driver initialization priority.
Loading

0 comments on commit b154371

Please sign in to comment.