1# Copyright (c) 2024 Analog Devices Inc.
2# Copyright (c) 2024 BayLibre SAS
3# SPDX-License-Identifier: Apache-2.0
4
5config GPIO_MAX22017
6	bool "Analog Devices MAX22017 GPIO support"
7	default y
8	depends on DT_HAS_ADI_MAX22017_GPIO_ENABLED
9	select MFD
10	help
11	  Enable GPIO support for the Analog Devices MAX22017
12
13if GPIO_MAX22017
14
15config GPIO_MAX22017_INIT_PRIORITY
16	int "Init priority"
17	default 81
18	help
19	  Analog Devices MAX22017 gpio device driver initialization priority.
20
21config GPIO_MAX22017_INT_QUIRK
22	bool "MAX22017 GPIO Interrupt quirk"
23	help
24	  The GPIO controller will not report any new GPI interrupt as long as its interrupt status
25	  register hasn't been read.
26	  Reading the interrupt status register happens on a falling edge of the INT pin.
27	  There seems to be a condition when the GPIO controller detects an interrupt but it's INT
28	  pin stays high which masks any subsequent interrupts.
29	  To avoid being stuck in that state, fire a timer to periodically check the interrupt status
30	  register.
31
32endif # GPIO_MAX22017
33