/* Update the DAC output registers with the values in the input registers. */
int32_t ad5770r_pmdz_update_out(struct ad5770r_pmdz_dev *dev, uint8_t *arg)
/* Update the DAC output registers with the values in the input registers. */
int32_t ad5770r_pmdz_update_out(struct ad5770r_pmdz_dev *dev, uint8_t *arg)
{
	int32_t ret;
	const struct ad5770r_channel_switches chan = {
		.en0 = true,
		.en1 = true,
		.en2 = true,
		.en3 = true,
		.en4 = true,
		.en5 = true,
	};
	if(dev->ad770r_device->nldac) {
		ret = gpio_set_value(dev->ad770r_device->nldac, GPIO_LOW);
		if(ret != SUCCESS)
			return ret;
		mdelay(1);
		return gpio_set_value(dev->ad770r_device->nldac, GPIO_HIGH);
	} else {
		return ad5770r_set_sw_ldac(dev->ad770r_device, &chan);
	}
}