# Copyright (c) 2025 Analog Devices Inc.
# SPDX-License-Identifier: Apache-2.0
#
# This file contains the binding for MAX30210 sensor

menuconfig MAX30210
	bool "MAX30210 Temperature Sensor"
	default y
	depends on DT_HAS_ADI_MAX30210_ENABLED
	select I2C
	help
	  Enable driver for the MAX30210 temperature sensor.

if MAX30210

config MAX30210_TRIGGER
	bool

choice MAX30210_TRIGGER_MODE
	prompt "Sets trigger mode"
	default MAX30210_TRIGGER_NONE
	help
	  Sets thread type for the interrupt handler.

config MAX30210_TRIGGER_NONE
	bool "No trigger"

config MAX30210_TRIGGER_GLOBAL_THREAD
	bool "Use global thread"
	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_MAX30210),interrupt-gpios)
	select GPIO
	select MAX30210_TRIGGER
	help
	  Use a global thread for the interrupt handler.

config MAX30210_TRIGGER_OWN_THREAD
	bool "Use own thread"
	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_ADI_MAX30210),interrupt-gpios)
	select GPIO
	select MAX30210_TRIGGER
	help
	  Use a separate thread for the interrupt handler.

endchoice # MAX30210_TRIGGER_MODE

if MAX30210_TRIGGER_OWN_THREAD

config MAX30210_THREAD_PRIORITY
	int "Thread priority of the interrupt handler"
	default 10
	help
	  Thread priority of the interrupt handler. A higher number implies a
	  higher priority. The thread is cooperative and will not be interrupted by
	  another thread until execution is released.

config MAX30210_THREAD_STACK_SIZE
	int "Stack size of the interrupt handler thread"
	default 1024
	help
	  Stack size of the interrupt handler thread.

endif # MAX30210_TRIGGER_OWN_THREAD

endif # MAX30210
