/* Get an available execution engine that is currently unused.  */
static int lp5562_get_available_engine(const struct device *dev, enum lp5562_led_sources *engine)
/* Get an available execution engine that is currently unused.  */
static int lp5562_get_available_engine(const struct device *dev, enum lp5562_led_sources *engine)
{
	enum lp5562_led_sources src;
	for (src = LP5562_SOURCE_ENGINE_1; src < LP5562_SOURCE_COUNT; src++) {
		if (!lp5562_is_engine_executing(dev, src)) {
			LOG_DBG("Available engine: %d", src);
			*engine = src;
			return 0;
		}
	}
	LOG_ERR("No unused engine available");
	return -ENODEV;
}