zephyr/drivers/gpio/Kconfig.pca95xx
Bent Ove Stinessen 72d5dee2e3 drivers: gpio_pca95xx: Add GPIO driver enable interrupt support
Allows the use of pin interrupt and callbacks for pca95xx family
GPIO expander chips with an interrupt line.

Enable config flag and define a gpio pin for the expander interrupt-
line (INT) in devicetree and the driver will accept pin interrupt
configurations for the expander gpio pins.

Level triggering is supported through emulation.
A worker is used to avoid waiting for I2C in ISR.

Example devicetree node:
	gpioext0: tca9539@77 {
		compatible = "nxp,pca95xx";
		label = "GPIO_EXT_0";
		reg = <0x77>;
		interrupt-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
		gpio-controller;
		#gpio-cells = <2>;
		ngpios = <16>;
	};

Fixes: #27561

Signed-off-by: Bent Ove Stinessen <bent@norbit.no>
2020-10-23 13:47:41 +02:00

26 lines
627 B
Text

# PCA95XX GPIO configuration options
# Copyright (c) 2016 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
menuconfig GPIO_PCA95XX
bool "PCA95XX I2C-based GPIO chip"
depends on I2C
help
Enable driver for PCA95XX I2C-based GPIO chip.
config GPIO_PCA95XX_INIT_PRIORITY
int "Init priority"
default 70
depends on GPIO_PCA95XX
help
Device driver initialization priority.
config GPIO_PCA95XX_INTERRUPT
bool "Interrupt enable"
default n
depends on GPIO_PCA95XX
help
Enable interrupt support in PCA95XX driver.
Note that the PCA95XX cannot reliably detect
short-pulse interrupts due to its design.