# Copyright (c) 2024-2026 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

menuconfig MFD_SC18IS604
	bool "SC18IS604 SPI to I2C & GPIO bridge"
	default y
	depends on DT_HAS_NXP_SC18IS604_ENABLED
	depends on SPI
	help
	  Enable driver for SC18IS604 bridge.

config MFD_SC18IS604_INIT_PRIORITY
	int "Init priority"
	default 55 if I2C_SC18IS604
	default MFD_INIT_PRIORITY
	depends on MFD_SC18IS604
	help
	  Device driver initialization priority.

config MFD_SC18IS604_ASYNC
	bool "Enable asynchronous transfer functions over SC18IS604 bus"
	default y if I2C_SC18IS604
	default n
	depends on POLL

if MFD_SC18IS604_ASYNC

	config MFD_SC18IS604_WORKQUEUE_STACK_SIZE
		int
		default 512

	config HEAP_MEM_POOL_ADD_SIZE_MFD_SC18IS604
		int
		default 256

endif # MFD_SC18IS604_ASYNC

config MFD_SC18IS604_TRANSFER_NODELAY
	bool "Disable delays during SPI transfers"
	default n
	depends on MFD_SC18IS604
	help
	  Disable artificial delays between bytes during SPI transfers. This makes the driver
	  compatible with emulators that expect atomic SPI transactions.

config EMUL_MFD_SC18IS604
	bool "Emulate an SC18IS604 MFD"
	default y
	depends on EMUL
	depends on MFD_SC18IS604
	select MFD_SC18IS604_TRANSFER_NODELAY
	help
	  Enables an emulator for SC18IS604 devices that can be used to test the related GPIO and
	  I2C drivers without real hardware.
