icjx: use iC-JX interrupt config instead of the general one

There might be multiple expanders, one with interrupt used and other
without. This commit fixes initial incorrect interrupt design by
introducing ICJX_INT_ENABLE config option.

Also fixes naming of ICJX_MULTIPLE option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
This commit is contained in:
Michal Lenc 2024-05-06 10:45:56 +02:00 committed by Xiang Xiao
parent 8eadde89f1
commit a1f5fd4e72
2 changed files with 11 additions and 3 deletions

View file

@ -66,12 +66,19 @@ config IOEXPANDER_ICJX
if IOEXPANDER_ICJX
config iC-JX_MULTIPLE
config ICJX_MULTIPLE
bool "Multiple iC-JX Devices"
default n
---help---
Can be defined to support multiple iC-JX devices on board.
config ICJX_INT_ENABLE
bool "Enable iC-JX Interrupt Support"
default n
select IOEXPANDER_INT_ENABLE
---help---
Enable driver interrupt functionality
endif # IOEXPANDER_ICJX
config IOEXPANDER_ISO1H812G

View file

@ -939,10 +939,10 @@ static int icjx_detach(FAR struct ioexpander_dev_s *dev, FAR void *handle)
*
****************************************************************************/
#ifdef CONFIG_ICJX_INT_ENABLE
static void icjx_interrupt_worker(void *arg)
{
FAR struct icjx_dev_s *priv = (FAR struct icjx_dev_s *)arg;
uint8_t regaddr;
uint16_t change_of_input;
uint16_t isr;
ioe_pinset_t irq_match;
@ -1001,7 +1001,8 @@ static int icjx_interrupt(int irq, FAR void *context, FAR void *arg)
return OK;
}
#endif
#endif /* CONFIG_ICJX_INT_ENABLE */
#endif /* CONFIG_IOEXPANDER_INT_ENABLE */
/****************************************************************************
* Public Functions