Update gpio drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.
We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.
Signed-off-by: Kumar Gala <galak@kernel.org>
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>
Same deal as in commit eddd98f811 ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for the remaining cases outside defconfig
files. See that commit for an explanation.
Will do the defconfigs separately in case there are any complaints
there.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
PCA95XX is a series of compatible I2C-based GPIO expanders,
with common registers on input/output, polarity and configuration.
This renames the original PCAL9535A driver to PCA95XX to indicate
that it can support this series. Additional features on variants
are guarded by kconfigs.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>