Lines Matching refs:method
121 * @method: RT, SW1, SW2
122 * @type: Polling or interrupt based method
131 u16 method;
182 req.method = madc->use_second_irq ? TWL4030_MADC_SW2 : TWL4030_MADC_SW1;
473 const struct twl4030_madc_conversion_method *method;
502 /* No pending results for this method, move to next one */
505 method = &twl4030_conversion_methods[r->method];
507 twl4030_madc_read_channels(madc, method->rbase,
526 method = &twl4030_conversion_methods[r->method];
528 twl4030_madc_read_channels(madc, method->rbase,
550 const struct twl4030_madc_conversion_method *method;
556 method = &twl4030_conversion_methods[conv_method];
558 method->ctrl);
561 method->ctrl);
612 const struct twl4030_madc_conversion_method *method;
619 if (req->method < TWL4030_MADC_RT || req->method > TWL4030_MADC_SW2) {
624 if (twl4030_madc->requests[req->method].active) {
628 method = &twl4030_conversion_methods[req->method];
630 ret = twl_i2c_write_u16(TWL4030_MODULE_MADC, req->channels, method->sel);
633 "unable to write sel register 0x%X\n", method->sel);
639 method->avg);
643 method->avg);
647 /* With RT method we should not be here anymore */
648 if (req->method == TWL4030_MADC_RT) {
652 ret = twl4030_madc_start_conversion(twl4030_madc, req->method);
655 twl4030_madc->requests[req->method].active = true;
657 ret = twl4030_madc_wait_conversion_ready(twl4030_madc, 5, method->ctrl);
659 twl4030_madc->requests[req->method].active = false;
662 ret = twl4030_madc_read_channels(twl4030_madc, method->rbase,
664 twl4030_madc->requests[req->method].active = false;