# Copyright 2021 The Chromium OS Authors
#
# SPDX-License-Identifier: Apache-2.0

config INA23X
	bool "INA23X Current and Power Monitor"
	default y
	depends on DT_HAS_TI_INA230_ENABLED || DT_HAS_TI_INA236_ENABLED || DT_HAS_TI_INA237_ENABLED
	select I2C
	help
	  Enable driver for INA23X Current and Power Monitor.

if INA23X

config INA230
	bool "INA230"
	default y
	depends on DT_HAS_TI_INA230_ENABLED || DT_HAS_TI_INA236_ENABLED
	help
	  Enable driver for INA230/INA231/INA236.

config INA237
	bool "INA237"
	default y
	depends on DT_HAS_TI_INA237_ENABLED
	help
	  Enable driver for INA237.

config INA237_VSHUNT
	bool "INA237 VShunt Measurement Enable"
	depends on DT_HAS_TI_INA237_ENABLED
	help
	  Enable shunt voltage measurement for INA237.

	  This is the actual shunt voltage measured which is scaled within the
	  INA237 based upon the SHUNT_CAL register.  This value is useful for
	  looking at measurement noise or debugging the SHUNT_CAL value.

	  Note that enabling this option requires an extra I2C read when
	  SENSOR_CHAN_ALL is selected, so only enable if the shunt voltage
	  measurement is required.

config INA230_TRIGGER
	bool "INA230 trigger mode"
	depends on INA230
	depends on GPIO
	depends on $(dt_compat_any_has_prop,$(DT_COMPAT_TI_INA230),alert-gpios) || $(dt_compat_any_has_prop,$(DT_COMPAT_TI_INA236),alert-gpios)
	help
	  Set to enable trigger mode using gpio interrupt, where
	  interrupts are configured to line ALERT PIN.

endif # INA23X
