1/* 2 * AD9833/AD9834/AD9837/AD9838 SPI DDS driver 3 * 4 * Copyright 2010-2011 Analog Devices Inc. 5 * 6 * Licensed under the GPL-2. 7 */ 8#ifndef IIO_DDS_AD9834_H_ 9#define IIO_DDS_AD9834_H_ 10 11/* 12 * TODO: struct ad7887_platform_data needs to go into include/linux/iio 13 */ 14 15/** 16 * struct ad9834_platform_data - platform specific information 17 * @mclk: master clock in Hz 18 * @freq0: power up freq0 tuning word in Hz 19 * @freq1: power up freq1 tuning word in Hz 20 * @phase0: power up phase0 value [0..4095] correlates with 0..2PI 21 * @phase1: power up phase1 value [0..4095] correlates with 0..2PI 22 * @en_div2: digital output/2 is passed to the SIGN BIT OUT pin 23 * @en_signbit_msb_out: the MSB (or MSB/2) of the DAC data is connected to the 24 * SIGN BIT OUT pin. en_div2 controls whether it is the MSB 25 * or MSB/2 that is output. if en_signbit_msb_out=false, 26 * the on-board comparator is connected to SIGN BIT OUT 27 */ 28 29struct ad9834_platform_data { 30 unsigned int mclk; 31 unsigned int freq0; 32 unsigned int freq1; 33 unsigned short phase0; 34 unsigned short phase1; 35 bool en_div2; 36 bool en_signbit_msb_out; 37}; 38 39#endif /* IIO_DDS_AD9834_H_ */ 40