/* Selects if the channel clears when CLEAR pin is activated.  */
void ad5755_channel_clear_enable(struct ad5755_dev *dev, uint8_t channel, uint8_t clear_en)
/* Selects if the channel clears when CLEAR pin is activated.  */
void ad5755_channel_clear_enable(struct ad5755_dev *dev, uint8_t channel, uint8_t clear_en)
{
	uint32_t old_dac_ctrl_reg = 0;
	uint32_t new_dac_ctrl_reg = 0;
	old_dac_ctrl_reg = ad5755_get_register_value(dev,
			   AD5755_RD_CTRL_REG(channel));
	old_dac_ctrl_reg &= ~(AD5755_DAC_CLR_EN);
	new_dac_ctrl_reg |= old_dac_ctrl_reg | (clear_en * AD5755_DAC_CLR_EN);
	ad5755_set_control_registers(dev,
				     AD5755_CREG_DAC,
				     channel,
				     new_dac_ctrl_reg);
}