drivers: sensor: lm77: use DT_ANY_INST_HAS_PROP_STATUS_OKAY

Replace custom macrology that was checking if any instance had the
int_gpios property with DT_ANY_INST_HAS_PROP_STATUS_OKAY.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2023-04-21 11:38:45 +02:00 committed by Kumar Gala
parent 8605a8700c
commit f6061a5ea0

View file

@ -20,9 +20,8 @@ LOG_MODULE_REGISTER(lm77, CONFIG_SENSOR_LOG_LEVEL);
* Only compile in trigger support if enabled in Kconfig and at least one
* enabled lm77 devicetree node has the int-gpios property.
*/
#define LM77_TRIGGER_SUPPORT_INST(inst) DT_INST_NODE_HAS_PROP(inst, int_gpios) ||
#define LM77_TRIGGER_SUPPORT \
(CONFIG_LM77_TRIGGER && (DT_INST_FOREACH_STATUS_OKAY(LM77_TRIGGER_SUPPORT_INST) 0))
(CONFIG_LM77_TRIGGER && DT_ANY_INST_HAS_PROP_STATUS_OKAY(int_gpios))
/* LM77 registers */
#define LM77_REG_TEMP 0x00U