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 without 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 Oct 8, 2024
1 parent 0e2daaa commit 7791270
Show file tree
Hide file tree
Showing 6 changed files with 816 additions and 4 deletions.
1 change: 1 addition & 0 deletions drivers/gpio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ zephyr_library_sources_ifdef(CONFIG_GPIO_LMP90XXX gpio_lmp90xxx.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_LPC11U6X gpio_lpc11u6x.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MAX14906 gpio_max14906.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MAX14916 gpio_max14916.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MAX22190 gpio_max22190.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MAX32 gpio_max32.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCHP_MSS gpio_mchp_mss.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCP230XX gpio_mcp230xx.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ source "drivers/gpio/Kconfig.lmp90xxx"
source "drivers/gpio/Kconfig.lpc11u6x"
source "drivers/gpio/Kconfig.max14906"
source "drivers/gpio/Kconfig.max14916"
source "drivers/gpio/Kconfig.max22190"
source "drivers/gpio/Kconfig.max32"
source "drivers/gpio/Kconfig.mchp_mss"
source "drivers/gpio/Kconfig.mcp23xxx"
Expand Down
21 changes: 21 additions & 0 deletions drivers/gpio/Kconfig.max22190
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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 SPI
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 7791270

Please sign in to comment.