/* Get the register for the given LED channel used to directly write a brightness value instead of using the execution engines.  */
static int lp5562_get_pwm_reg(enum lp5562_led_channels channel, uint8_t *reg)
/* Get the register for the given LED channel used to directly write a brightness value instead of using the execution engines.  */
static int lp5562_get_pwm_reg(enum lp5562_led_channels channel, uint8_t *reg)
{
	switch (channel) {
	case LP5562_CHANNEL_W:
		*reg = LP5562_W_PWM;
		break;
	case LP5562_CHANNEL_R:
		*reg = LP5562_R_PWM;
		break;
	case LP5562_CHANNEL_G:
		*reg = LP5562_G_PWM;
		break;
	case LP5562_CHANNEL_B:
		*reg = LP5562_B_PWM;
		break;
	default:
		LOG_ERR("Invalid channel given.");
		return -EINVAL;
	}
	return 0;
}