nuttx/drivers/ioexpander/Kconfig
Gregory Nutt 5f9ee79298 I/O Expander: Remove hard-coded PCA9555 fields from ioexpander.h definitons. Add support for an attach() method that may be used when any subset of pin interrupts occur.
PCA9555 Driver:  Replace the signalling logic with a simple callback using the new definitons of ioexpander.h.  This repartitioning of functionality is necessary because (1) the I/O expander driver is the lower-lower part of any driver that uses GPIOs (include the GPIO driver itself) and should not be interacting directly with the much higher level application layer.  And (2) in order to be compatible with the GPIO driver (and any arbitrary upper half driver), the PCA9555 should not directly signal, but should call back into the upper half.  The upper half driver that interacts directly with the application is the appropriate place to be generating signal.
2016-07-31 11:09:47 -06:00

98 lines
2.5 KiB
Plaintext

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "IO Expander/GPIO Support"
config IOEXPANDER
bool "Enable IO Expander Support"
default n
---help---
This directory holds implementations of IO expander drivers.
See include/nuttx/ioexpander/ioexpander.h for registration information.
if IOEXPANDER
config IOEXPANDER_PCA9555
bool "PCA9555 I2C IO expander"
default n
select I2C
---help---
Enable support for the NXP PCA9555 IO Expander
if IOEXPANDER_PCA9555
config PCA9555_MULTIPLE
bool "Multiple PCA9555 Devices"
default n
depends on EXPERIMENTAL
---help---
Can be defined to support multiple PCA9555 devices on board.
config PCA9555_INT_ENABLE
bool "Enable PCA9555 Interrupt Support"
default n
select IOEXPANDER_INT_ENABLE
---help---
Enable driver interrupt functionality
config PCA9555_INT_NCALLBACKS
int "Max number of interrupt callbacks"
default 4
depends on IOEXPANDER_INT_ENABLE
---help---
This is the maximum number of interrupt callbacks supported
endif # IOEXPANDER_PCA9555
config IOEXPANDER_INT_ENABLE
bool
default y if PCA9555_INT_ENABLE
---help---
This is the global INT supported flag for io expanders
config IOEXPANDER_NPINS
int "Number of pins"
default 16
---help---
Maximum number of pins supported per driver.
config IOEXPANDER_MULTIPIN
bool "Support multi-pin access routines"
default n
---help---
This settings enable the definition of routines for
optimized simultaneous access to multiple pins.
config IOEXPANDER_SHADOW_MODE
bool "Use Shadow Mode instead of Read-Modify-Write Operations"
default n
---help---
This setting enables a mode where the output and pin
configuration registers are held in RAM.
With this for example we do not need to read back the
output-register every time we want to change one pin.
We do instead change the bit in the internal register
and then just write this register to the IO-Expander.
This reduces bus traffic and eliminates the problem of
EMC-caused toggling of output pins.
config IOEXPANDER_RETRY
bool "Retry to send commands and data at I2C communication errors"
default n
---help---
Retry to send commands and data if a I2C-communication
error occurs (eg. caused by EMC).
endif # IOEXPANDER
config DEV_GPIO
bool "GPIO driver"
default n
---help---
Enables a simple GPIO input/output driver to support application-
space testing of hardware.
endmenu # IO Expander/GPIO Support