Lines Matching full:vref
179 #define ADS_PD10_REF_ON (2 << 0) /* vREF on + penirq */
180 #define ADS_PD10_ALL_ON (3 << 0) /* ADC + vREF on */
185 #define READ_12BIT_DFR(x, adc, vref) (ADS_START | ADS_A2A1A0_d_ ## x \ argument
187 (adc ? ADS_PD10_ADC_ON : 0) | (vref ? ADS_PD10_REF_ON : 0))
189 #define READ_Y(vref) (READ_12BIT_DFR(y, 1, vref)) argument
190 #define READ_Z1(vref) (READ_12BIT_DFR(z1, 1, vref)) argument
191 #define READ_Z2(vref) (READ_12BIT_DFR(z2, 1, vref)) argument
192 #define READ_X(vref) (READ_12BIT_DFR(x, 1, vref)) argument
196 * we leave both ADC and VREF powered
204 /* Order commands in the most optimal way to reduce Vref switching and
206 * Measure: X; Vref: X+, X-; IN: Y+
207 * Measure: Y; Vref: Y+, Y-; IN: X+
208 * Measure: Z1; Vref: Y+, X-; IN: X+
209 * Measure: Z2; Vref: Y+, X-; IN: Y-
324 * The range is GND..vREF. The ads7843 and ads7835 must use external vREF;
325 * ads7846 lets that pin be unconnected, to use internal vREF.
366 /* maybe turn on internal vREF, and let it settle */ in ads7846_read12_ser()
494 * if we know vREF. userspace may need to scale vAUX to match the board's in SHOW()
501 /* external resistors may scale vAUX into 0..vREF */ in SHOW()
558 dev_dbg(&spi->dev, "assuming 2.5V internal vREF\n"); in ads784x_hwmon_register()
567 "external vREF for ADS%d not specified\n", in ads784x_hwmon_register()
718 static u8 ads7846_get_cmd(enum ads7846_cmds cmd_idx, int vref) in ads7846_get_cmd() argument
722 return READ_Y(vref); in ads7846_get_cmd()
724 return READ_X(vref); in ads7846_get_cmd()
728 return READ_Z1(vref); in ads7846_get_cmd()
730 return READ_Z2(vref); in ads7846_get_cmd()
1037 int vref = pdata->keep_vref_on; in ads7846_setup_spi_msg() local
1091 * keep VREF off during differential/ratiometric in ads7846_setup_spi_msg()
1095 vref = 0; in ads7846_setup_spi_msg()
1109 cmd = ads7846_get_cmd(cmd_idx, vref); in ads7846_setup_spi_msg()
1154 device_property_read_u16(dev, "ti,vref-delay-usecs", in ads7846_get_props()
1156 device_property_read_u16(dev, "ti,vref-mv", &pdata->vref_mv); in ads7846_get_props()
1157 pdata->keep_vref_on = device_property_read_bool(dev, "ti,keep-vref-on"); in ads7846_get_props()
1382 * Take a first sample, leaving nPENIRQ active and vREF off; avoid in ads7846_probe()