/* Set an register shifted for the given execution engine.  */
static int lp5562_set_engine_reg(const struct device *dev, enum lp5562_led_sources engine, uint8_t reg, uint8_t val)
/* Set an register shifted for the given execution engine.  */
static int lp5562_set_engine_reg(const struct device *dev, enum lp5562_led_sources engine, uint8_t reg, uint8_t val)
{
	const struct lp5562_config *config = dev->config;
	uint8_t shift;
	int ret;
	ret = lp5562_get_engine_reg_shift(engine, &shift);
	if (ret) {
		return ret;
	}
	if (i2c_reg_update_byte_dt(&config->bus, reg, LP5562_MASK << shift,
				   val << shift)) {
		return -EIO;
	}
	return 0;
}