43#define AD7293_R1B NO_OS_BIT(16)
44#define AD7293_R2B NO_OS_BIT(17)
45#define AD7293_PAGE_ADDR_MSK NO_OS_GENMASK(15, 8)
46#define AD7293_PAGE(x) no_os_field_prep(AD7293_PAGE_ADDR_MSK, x)
49#define AD7293_REG_NO_OP (AD7293_R1B | AD7293_PAGE(0x0) | 0x0)
50#define AD7293_REG_PAGE_SELECT (AD7293_R1B | AD7293_PAGE(0x0) | 0x1)
51#define AD7293_REG_CONV_CMD (AD7293_R2B | AD7293_PAGE(0x0) | 0x2)
52#define AD7293_REG_RESULT (AD7293_R1B | AD7293_PAGE(0x0) | 0x3)
53#define AD7293_REG_DAC_EN (AD7293_R1B | AD7293_PAGE(0x0) | 0x4)
54#define AD7293_REG_DEVICE_ID (AD7293_R2B | AD7293_PAGE(0x0) | 0xC)
55#define AD7293_REG_SOFT_RESET (AD7293_R2B | AD7293_PAGE(0x0) | 0xF)
58#define AD7293_REG_VIN0 (AD7293_R2B | AD7293_PAGE(0x0) | 0x10)
59#define AD7293_REG_VIN1 (AD7293_R2B | AD7293_PAGE(0x0) | 0x11)
60#define AD7293_REG_VIN2 (AD7293_R2B | AD7293_PAGE(0x0) | 0x12)
61#define AD7293_REG_VIN3 (AD7293_R2B | AD7293_PAGE(0x0) | 0x13)
62#define AD7293_REG_TSENSE_INT (AD7293_R2B | AD7293_PAGE(0x0) | 0x20)
63#define AD7293_REG_TSENSE_D0 (AD7293_R2B | AD7293_PAGE(0x0) | 0x21)
64#define AD7293_REG_TSENSE_D1 (AD7293_R2B | AD7293_PAGE(0x0) | 0x22)
65#define AD7293_REG_ISENSE_0 (AD7293_R2B | AD7293_PAGE(0x0) | 0x28)
66#define AD7293_REG_ISENSE_1 (AD7293_R2B | AD7293_PAGE(0x0) | 0x29)
67#define AD7293_REG_ISENSE_2 (AD7293_R2B | AD7293_PAGE(0x0) | 0x2A)
68#define AD7293_REG_ISENSE_3 (AD7293_R2B | AD7293_PAGE(0x0) | 0x2B)
69#define AD7293_REG_UNI_VOUT0 (AD7293_R2B | AD7293_PAGE(0x0) | 0x30)
70#define AD7293_REG_UNI_VOUT1 (AD7293_R2B | AD7293_PAGE(0x0) | 0x31)
71#define AD7293_REG_UNI_VOUT2 (AD7293_R2B | AD7293_PAGE(0x0) | 0x32)
72#define AD7293_REG_UNI_VOUT3 (AD7293_R2B | AD7293_PAGE(0x0) | 0x33)
73#define AD7293_REG_BI_VOUT0 (AD7293_R2B | AD7293_PAGE(0x0) | 0x34)
74#define AD7293_REG_BI_VOUT1 (AD7293_R2B | AD7293_PAGE(0x0) | 0x35)
75#define AD7293_REG_BI_VOUT2 (AD7293_R2B | AD7293_PAGE(0x0) | 0x36)
76#define AD7293_REG_BI_VOUT3 (AD7293_R2B | AD7293_PAGE(0x0) | 0x37)
79#define AD7293_REG_AVDD (AD7293_R2B | AD7293_PAGE(0x01) | 0x10)
80#define AD7293_REG_DACVDD_UNI (AD7293_R2B | AD7293_PAGE(0x01) | 0x11)
81#define AD7293_REG_DACVDD_BI (AD7293_R2B | AD7293_PAGE(0x01) | 0x12)
82#define AD7293_REG_AVSS (AD7293_R2B | AD7293_PAGE(0x01) | 0x13)
83#define AD7293_REG_BI_VOUT0_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x14)
84#define AD7293_REG_BI_VIOU1_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x15)
85#define AD7293_REG_BI_VOUT2_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x16)
86#define AD7293_REG_BI_VOUT3_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x17)
87#define AD7293_REG_RS0_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x28)
88#define AD7293_REG_RS1_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x29)
89#define AD7293_REG_RS2_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x2A)
90#define AD7293_REG_RS3_MON (AD7293_R2B | AD7293_PAGE(0x01) | 0x2B)
93#define AD7293_REG_DIGITAL_OUT_EN (AD7293_R2B | AD7293_PAGE(0x2) | 0x11)
94#define AD7293_REG_DIGITAL_INOUT_FUNC (AD7293_R2B | AD7293_PAGE(0x2) | 0x12)
95#define AD7293_REG_DIGITAL_FUNC_POL (AD7293_R2B | AD7293_PAGE(0x2) | 0x13)
96#define AD7293_REG_GENERAL (AD7293_R2B | AD7293_PAGE(0x2) | 0x14)
97#define AD7293_REG_VINX_RANGE0 (AD7293_R2B | AD7293_PAGE(0x2) | 0x15)
98#define AD7293_REG_VINX_RANGE1 (AD7293_R2B | AD7293_PAGE(0x2) | 0x16)
99#define AD7293_REG_VINX_DIFF_SE (AD7293_R2B | AD7293_PAGE(0x2) | 0x17)
100#define AD7293_REG_VINX_FILTER (AD7293_R2B | AD7293_PAGE(0x2) | 0x18)
101#define AD7293_REG_BG_EN (AD7293_R2B | AD7293_PAGE(0x2) | 0x19)
102#define AD7293_REG_CONV_DELAY (AD7293_R2B | AD7293_PAGE(0x2) | 0x1A)
103#define AD7293_REG_TSENSE_BG_EN (AD7293_R2B | AD7293_PAGE(0x2) | 0x1B)
104#define AD7293_REG_ISENSE_BG_EN (AD7293_R2B | AD7293_PAGE(0x2) | 0x1C)
105#define AD7293_REG_ISENSE_GAIN (AD7293_R2B | AD7293_PAGE(0x2) | 0x1D)
106#define AD7293_REG_DAC_SNOOZE_O (AD7293_R2B | AD7293_PAGE(0x2) | 0x1F)
107#define AD7293_REG_DAC_SNOOZE_1 (AD7293_R2B | AD7293_PAGE(0x2) | 0x20)
108#define AD7293_REG_RSX_MON_BG_EN (AD7293_R2B | AD7293_PAGE(0x2) | 0x23)
109#define AD7293_REG_INTEGR_CL (AD7293_R2B | AD7293_PAGE(0x2) | 0x28)
110#define AD7293_REG_PA_ON_CTRL (AD7293_R2B | AD7293_PAGE(0x2) | 0x29)
111#define AD7293_REG_RAMP_TIME_0 (AD7293_R2B | AD7293_PAGE(0x2) | 0x2A)
112#define AD7293_REG_RAMP_TIME_1 (AD7293_R2B | AD7293_PAGE(0x2) | 0x2B)
113#define AD7293_REG_RAMP_TIME_2 (AD7293_R2B | AD7293_PAGE(0x2) | 0x2C)
114#define AD7293_REG_RAMP_TIME_3 (AD7293_R2B | AD7293_PAGE(0x2) | 0x2D)
115#define AD7293_REG_CL_FR_IT (AD7293_R2B | AD7293_PAGE(0x2) | 0x2E)
116#define AD7293_REG_INTX_AVSS_AVDD (AD7293_R2B | AD7293_PAGE(0x2) | 0x2F)
119#define AD7293_REG_VINX_SEQ (AD7293_R2B | AD7293_PAGE(0x3) | 0x10)
120#define AD7293_REG_ISENSEX_TSENSEX_SEQ (AD7293_R2B | AD7293_PAGE(0x3) | 0x11)
121#define AD7293_REG_RSX_MON_BI_VOUTX_SEQ (AD7293_R2B | AD7293_PAGE(0x3) | 0x12)
124#define AD7293_REG_AVDD_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x10)
125#define AD7293_REG_DACVDD_UNI_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x11)
126#define AD7293_REG_DACVDD_BI_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x12)
127#define AD7293_REG_AVSS_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x13)
128#define AD7293_REG_BI_VOUT0_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x14)
129#define AD7293_REG_BI_VOUT1_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x15)
130#define AD7293_REG_BI_VOUT2_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x16)
131#define AD7293_REG_BI_VOUT3_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x17)
132#define AD7293_REG_RS0_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x28)
133#define AD7293_REG_RS1_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x29)
134#define AD7293_REG_RS2_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x2A)
135#define AD7293_REG_RS3_MON_HL (AD7293_R2B | AD7293_PAGE(0x05) | 0x2B)
138#define AD7293_REG_VIN0_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x10)
139#define AD7293_REG_VIN1_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x11)
140#define AD7293_REG_VIN2_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x12)
141#define AD7293_REG_VIN3_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x13)
142#define AD7293_REG_TSENSE_D0_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x20)
143#define AD7293_REG_TSENSE_D1_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x21)
144#define AD7293_REG_TSENSE_D2_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x22)
145#define AD7293_REG_ISENSE0_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x28)
146#define AD7293_REG_ISENSE1_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x29)
147#define AD7293_REG_ISENSE2_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x2A)
148#define AD7293_REG_ISENSE3_LL (AD7293_R2B | AD7293_PAGE(0x06) | 0x2B)
151#define AD7293_REG_AVDD_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x10)
152#define AD7293_REG_DACVDD_UNI_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x11)
153#define AD7293_REG_DACVDD_BI_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x12)
154#define AD7293_REG_AVSS_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x13)
155#define AD7293_REG_BI_VOUT0_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x14)
156#define AD7293_REG_BI_VOUT1_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x15)
157#define AD7293_REG_BI_VOUT2_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x16)
158#define AD7293_REG_BI_VOUT3_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x17)
159#define AD7293_REG_RS0_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x28)
160#define AD7293_REG_RS1_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x29)
161#define AD7293_REG_RS2_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x2A)
162#define AD7293_REG_RS3_MON_LL (AD7293_R2B | AD7293_PAGE(0x07) | 0x2B)
165#define AD7293_REG_VIN0_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x10)
166#define AD7293_REG_VIN1_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x11)
167#define AD7293_REG_VIN2_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x12)
168#define AD7293_REG_VIN3_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x13)
169#define AD7293_REG_TSENSE_INT_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x20)
170#define AD7293_REG_TSENSE_D0_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x21)
171#define AD7293_REG_TSENSE_D1_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x22)
172#define AD7293_REG_ISENSE0_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x28)
173#define AD7293_REG_ISENSE1_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x29)
174#define AD7293_REG_ISENSE2_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x2A)
175#define AD7293_REG_ISENSE3_HYS (AD7293_R2B | AD7293_PAGE(0x08) | 0x2B)
178#define AD7293_REG_AVDD_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x10)
179#define AD7293_REG_DACVDD_UNI_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x11)
180#define AD7293_REG_DACVDD_BI_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x12)
181#define AD7293_REG_AVSS_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x13)
182#define AD7293_REG_BI_VOUT0_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x14)
183#define AD7293_REG_BI_VOUT1_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x15)
184#define AD7293_REG_BI_VOUT2_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x16)
185#define AD7293_REG_BI_VOUT3_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x17)
186#define AD7293_REG_RS0_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x28)
187#define AD7293_REG_RS1_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x29)
188#define AD7293_REG_RS2_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x2A)
189#define AD7293_REG_RS3_MON_HYS (AD7293_R2B | AD7293_PAGE(0x09) | 0x2B)
192#define AD7293_REG_VIN0_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x10)
193#define AD7293_REG_VIN1_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x11)
194#define AD7293_REG_VIN2_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x12)
195#define AD7293_REG_VIN3_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x13)
196#define AD7293_REG_TSENSE_INT_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x20)
197#define AD7293_REG_TSENSE_D0_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x21)
198#define AD7293_REG_TSENSE_D1_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x22)
199#define AD7293_REG_ISENSE0_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x28)
200#define AD7293_REG_ISENSE1_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x29)
201#define AD7293_REG_ISENSE2_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x2A)
202#define AD7293_REG_ISENSE3_MIN (AD7293_R2B | AD7293_PAGE(0x0A) | 0x2B)
205#define AD7293_REG_AVDD_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x10)
206#define AD7293_REG_DACVDD_UNI_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x11)
207#define AD7293_REG_DACVDD_BI_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x12)
208#define AD7293_REG_AVSS_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x13)
209#define AD7293_REG_BI_VOUT0_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x14)
210#define AD7293_REG_BI_VOUT1_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x15)
211#define AD7293_REG_BI_VOUT2_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x16)
212#define AD7293_REG_BI_VOUT3_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x17)
213#define AD7293_REG_RS0_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x28)
214#define AD7293_REG_RS1_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x29)
215#define AD7293_REG_RS2_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x2A)
216#define AD7293_REG_RS3_MON_MIN (AD7293_R2B | AD7293_PAGE(0x0B) | 0x2B)
219#define AD7293_REG_VIN0_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x10)
220#define AD7293_REG_VIN1_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x11)
221#define AD7293_REG_VIN2_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x12)
222#define AD7293_REG_VIN3_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x13)
223#define AD7293_REG_TSENSE_INT_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x20)
224#define AD7293_REG_TSENSE_D0_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x21)
225#define AD7293_REG_TSENSE_D1_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x22)
226#define AD7293_REG_ISENSE0_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x28)
227#define AD7293_REG_ISENSE1_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x29)
228#define AD7293_REG_ISENSE2_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x2A)
229#define AD7293_REG_ISENSE3_MAX (AD7293_R2B | AD7293_PAGE(0x0C) | 0x2B)
232#define AD7293_REG_AVDD_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x10)
233#define AD7293_REG_DACVDD_UNI_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x11)
234#define AD7293_REG_DACVDD_BI_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x12)
235#define AD7293_REG_AVSS_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x13)
236#define AD7293_REG_BI_VOUT0_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x14)
237#define AD7293_REG_BI_VOUT1_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x15)
238#define AD7293_REG_BI_VOUT2_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x16)
239#define AD7293_REG_BI_VOUT3_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x17)
240#define AD7293_REG_RS0_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x28)
241#define AD7293_REG_RS1_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x29)
242#define AD7293_REG_RS2_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x2A)
243#define AD7293_REG_RS3_MON_MAX (AD7293_R2B | AD7293_PAGE(0x0D) | 0x2B)
246#define AD7293_REG_VIN0_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x10)
247#define AD7293_REG_VIN1_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x11)
248#define AD7293_REG_VIN2_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x12)
249#define AD7293_REG_VIN3_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x13)
250#define AD7293_REG_TSENSE_INT_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x20)
251#define AD7293_REG_TSENSE_D0_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x21)
252#define AD7293_REG_TSENSE_D1_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x22)
253#define AD7293_REG_ISENSE0_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x28)
254#define AD7293_REG_ISENSE1_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x29)
255#define AD7293_REG_ISENSE2_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x2A)
256#define AD7293_REG_ISENSE3_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x2B)
257#define AD7293_REG_UNI_VOUT0_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x30)
258#define AD7293_REG_UNI_VOUT1_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x31)
259#define AD7293_REG_UNI_VOUT2_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x32)
260#define AD7293_REG_UNI_VOUT3_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x33)
261#define AD7293_REG_BI_VOUT0_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x34)
262#define AD7293_REG_BI_VOUT1_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x35)
263#define AD7293_REG_BI_VOUT2_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x36)
264#define AD7293_REG_BI_VOUT3_OFFSET (AD7293_R1B | AD7293_PAGE(0xE) | 0x37)
267#define AD7293_REG_AVDD_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x10)
268#define AD7293_REG_DACVDD_UNI_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x11)
269#define AD7293_REG_DACVDD_BI_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x12)
270#define AD7293_REG_AVSS_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x13)
271#define AD7293_REG_BI_VOUT0_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x14)
272#define AD7293_REG_BI_VOUT1_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x15)
273#define AD7293_REG_BI_VOUT2_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x16)
274#define AD7293_REG_BI_VOUT3_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x17)
275#define AD7293_REG_RS0_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x28)
276#define AD7293_REG_RS1_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x29)
277#define AD7293_REG_RS2_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x2A)
278#define AD7293_REG_RS3_MON_OFFSET (AD7293_R1B | AD7293_PAGE(0x0F) | 0x2B)
281#define AD7293_REG_ALERT_SUM (AD7293_R2B | AD7293_PAGE(0x10) | 0x10)
282#define AD7293_REG_VINX_ALERT (AD7293_R2B | AD7293_PAGE(0x10) | 0x12)
283#define AD7293_REG_TSENSEX_ALERT (AD7293_R2B | AD7293_PAGE(0x10) | 0x14)
284#define AD7293_REG_ISENSEX_ALERT (AD7293_R2B | AD7293_PAGE(0x10) | 0x15)
285#define AD7293_REG_BI_VOUTX_MON_ALERT (AD7293_R2B | AD7293_PAGE(0x10) | 0x18)
286#define AD7293_REG_RSX_MON_ALERT (AD7293_R2B | AD7293_PAGE(0x10) | 0x19)
287#define AD7293_REG_INT_LIMIT_AVSS_ALERT (AD7293_R2B | AD7293_PAGE(0x10) | 0x1A)
290#define AD7293_REG_VINX_ALERT0 (AD7293_R2B | AD7293_PAGE(0x11) | 0x12)
291#define AD7293_REG_TSENSEX_ALERT0 (AD7293_R2B | AD7293_PAGE(0x11) | 0x14)
292#define AD7293_REG_ISENSEX_ALERT0 (AD7293_R2B | AD7293_PAGE(0x11) | 0x15)
293#define AD7293_REG_BI_VOUTX_MON_ALERT0 (AD7293_R2B | AD7293_PAGE(0x11) | 0x18)
294#define AD7293_REG_RSX_MON_ALERT0 (AD7293_R2B | AD7293_PAGE(0x11) | 0x19)
295#define AD7293_REG_INT_LIMIT_AVSS_ALERT0 (AD7293_R2B | AD7293_PAGE(0x11) | 0x1A)
298#define AD7293_REG_VINX_ALERT1 (AD7293_R2B | AD7293_PAGE(0x12) | 0x12)
299#define AD7293_REG_TSENSEX_ALERT1 (AD7293_R2B | AD7293_PAGE(0x12) | 0x14)
300#define AD7293_REG_ISENSEX_ALERT1 (AD7293_R2B | AD7293_PAGE(0x12) | 0x15)
301#define AD7293_REG_BI_VOUTX_MON_ALERT1 (AD7293_R2B | AD7293_PAGE(0x12) | 0x18)
302#define AD7293_REG_RSX_MON_ALERT1 (AD7293_R2B | AD7293_PAGE(0x12) | 0x19)
303#define AD7293_REG_INT_LIMIT_AVSS_ALERT1 (AD7293_R2B | AD7293_PAGE(0x12) | 0x1A)
306#define AD7293_READ NO_OS_BIT(7)
307#define AD7293_TRANSF_LEN_MSK NO_OS_GENMASK(17, 16)
308#define AD7293_BUFF_SIZE_BYTES 3
309#define AD7293_REG_ADDR_MSK NO_OS_GENMASK(7, 0)
310#define AD7293_REG_VOUT_OFFSET_MSK NO_OS_GENMASK(5, 4)
311#define AD7293_REG_DATA_RAW_MSK NO_OS_GENMASK(15, 4)
312#define AD7293_REG_VINX_RANGE_GET_CH_MSK(x, ch) (((x) >> (ch)) & 0x1)
313#define AD7293_REG_VINX_RANGE_SET_CH_MSK(x, ch) (((x) & 0x1) << (ch))
314#define AD7293_CHIP_ID 0x18
315#define AD7293_SOFT_RESET_VAL 0x7293
316#define AD7293_SOFT_RESET_CLR_VAL 0x0000
317#define AD7293_CONV_CMD_VAL 0x82
359 uint16_t mask, uint16_t val);
379 unsigned int ch, uint16_t *offset);
383 unsigned int ch, uint16_t offset);
391 unsigned int ch, uint16_t *raw);
int ad7293_isense_get_gain(struct ad7293_dev *dev, unsigned int ch, uint16_t *gain)
Get the gain value for ISENSE channels.
Definition ad7293.c:225
int ad7293_dac_write_raw(struct ad7293_dev *dev, unsigned int ch, uint16_t raw)
Set the DAC output raw value.
Definition ad7293.c:320
int ad7293_adc_get_range(struct ad7293_dev *dev, unsigned int ch, uint16_t *range)
Get the range value for ADC channels.
Definition ad7293.c:159
int ad7293_spi_update_bits(struct ad7293_dev *dev, unsigned int reg, uint16_t mask, uint16_t val)
Update AD7293 register.
Definition ad7293.c:137
int ad7293_set_offset(struct ad7293_dev *dev, enum ad7293_ch_type type, unsigned int ch, uint16_t offset)
Set offset value for specific channel and channel type.
Definition ad7293.c:284
int ad7293_adc_set_range(struct ad7293_dev *dev, unsigned int ch, uint16_t range)
Set the range value for ADC channels.
Definition ad7293.c:187
int ad7293_spi_write(struct ad7293_dev *dev, unsigned int reg, uint16_t val)
Writes data to AD7293 over SPI.
Definition ad7293.c:107
int ad7293_get_offset(struct ad7293_dev *dev, enum ad7293_ch_type type, unsigned int ch, uint16_t *offset)
Set offset value for specific channel and channel type.
Definition ad7293.c:247
int ad7293_init(struct ad7293_dev **device, struct ad7293_init_param *init_param)
Initializes the ad7293.
Definition ad7293.c:454
int ad7293_spi_read(struct ad7293_dev *dev, unsigned int reg, uint16_t *val)
Reads data from AD7293 over SPI.
Definition ad7293.c:72
int ad7293_soft_reset(struct ad7293_dev *dev)
Perform software reset.
Definition ad7293.c:415
int ad7293_isense_set_gain(struct ad7293_dev *dev, unsigned int ch, uint16_t gain)
Set the gain value for ISENSE channels.
Definition ad7293.c:209
ad7293_ch_type
AD7293 Channel Type.
Definition ad7293.h:323
@ AD7293_ADC_TSENSE
Definition ad7293.h:325
@ AD7293_DAC
Definition ad7293.h:327
@ AD7293_ADC_ISENSE
Definition ad7293.h:326
@ AD7293_ADC_VINX
Definition ad7293.h:324
int ad7293_reset(struct ad7293_dev *dev)
Perform both hardware and software reset.
Definition ad7293.c:431
int ad7293_ch_read_raw(struct ad7293_dev *dev, enum ad7293_ch_type type, unsigned int ch, uint16_t *raw)
Read raw value for specific channel and channel type.
Definition ad7293.c:342
int ad7293_remove(struct ad7293_dev *dev)
AD7293 Resources Deallocation.
Definition ad7293.c:509
struct ad7616_init_param init_param
Definition ad7616_sdz.c:107
Header file of GPIO Interface.
Header file of SPI Interface.
Header file of utility functions.
AD7293 Device Descriptor.
Definition ad7293.h:334
uint8_t page_select
Definition ad7293.h:338
struct no_os_gpio_desc * gpio_reset
Definition ad7293.h:337
struct no_os_spi_desc * spi_desc
Definition ad7293.h:336
AD7293 Initialization Parameters structure.
Definition ad7293.h:345
struct no_os_spi_init_param * spi_init
Definition ad7293.h:347
struct no_os_gpio_init_param * gpio_reset
Definition ad7293.h:348
Definition ad9361_util.h:63
Structure holding the GPIO descriptor.
Definition no_os_gpio.h:84
Structure holding the parameters for GPIO initialization.
Definition no_os_gpio.h:67
Structure holding SPI descriptor.
Definition no_os_spi.h:180
Structure holding the parameters for SPI initialization.
Definition no_os_spi.h:128