Lines Matching refs:t

647 static void acpi_ec_spurious_interrupt(struct acpi_ec *ec, struct transaction *t)  in acpi_ec_spurious_interrupt()  argument
649 if (t->irq_count < ec_storm_threshold) in acpi_ec_spurious_interrupt()
650 ++t->irq_count; in acpi_ec_spurious_interrupt()
653 if (t->irq_count == ec_storm_threshold) in acpi_ec_spurious_interrupt()
659 struct transaction *t = ec->curr; in advance_transaction() local
671 if (!t || !(t->flags & ACPI_EC_COMMAND_POLL)) { in advance_transaction()
676 if (!t) in advance_transaction()
680 if (t->flags & ACPI_EC_COMMAND_POLL) { in advance_transaction()
681 if (t->wlen > t->wi) { in advance_transaction()
683 acpi_ec_write_data(ec, t->wdata[t->wi++]); in advance_transaction()
685 acpi_ec_spurious_interrupt(ec, t); in advance_transaction()
686 } else if (t->rlen > t->ri) { in advance_transaction()
688 t->rdata[t->ri++] = acpi_ec_read_data(ec); in advance_transaction()
689 if (t->rlen == t->ri) { in advance_transaction()
692 if (t->command == ACPI_EC_COMMAND_QUERY) in advance_transaction()
697 acpi_ec_spurious_interrupt(ec, t); in advance_transaction()
699 } else if (t->wlen == t->wi && !(status & ACPI_EC_FLAG_IBF)) { in advance_transaction()
704 acpi_ec_write_cmd(ec, t->command); in advance_transaction()
781 struct transaction *t) in acpi_ec_transaction_unlocked() argument
786 if (t->rdata) in acpi_ec_transaction_unlocked()
787 memset(t->rdata, 0, t->rlen); in acpi_ec_transaction_unlocked()
798 ec->curr = t; in acpi_ec_transaction_unlocked()
799 ec_dbg_req("Command(%s) started", acpi_ec_cmd_string(t->command)); in acpi_ec_transaction_unlocked()
806 if (t->irq_count == ec_storm_threshold) in acpi_ec_transaction_unlocked()
808 ec_dbg_req("Command(%s) stopped", acpi_ec_cmd_string(t->command)); in acpi_ec_transaction_unlocked()
818 static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) in acpi_ec_transaction() argument
823 if (!ec || (!t) || (t->wlen && !t->wdata) || (t->rlen && !t->rdata)) in acpi_ec_transaction()
835 status = acpi_ec_transaction_unlocked(ec, t); in acpi_ec_transaction()
847 struct transaction t = {.command = ACPI_EC_BURST_ENABLE, in acpi_ec_burst_enable() local
851 return acpi_ec_transaction_unlocked(ec, &t); in acpi_ec_burst_enable()
856 struct transaction t = {.command = ACPI_EC_BURST_DISABLE, in acpi_ec_burst_disable() local
861 acpi_ec_transaction_unlocked(ec, &t) : 0; in acpi_ec_burst_disable()
868 struct transaction t = {.command = ACPI_EC_COMMAND_READ, in acpi_ec_read() local
872 result = acpi_ec_transaction(ec, &t); in acpi_ec_read()
881 struct transaction t = {.command = ACPI_EC_COMMAND_READ, in acpi_ec_read_unlocked() local
885 result = acpi_ec_transaction_unlocked(ec, &t); in acpi_ec_read_unlocked()
893 struct transaction t = {.command = ACPI_EC_COMMAND_WRITE, in acpi_ec_write() local
897 return acpi_ec_transaction(ec, &t); in acpi_ec_write()
903 struct transaction t = {.command = ACPI_EC_COMMAND_WRITE, in acpi_ec_write_unlocked() local
907 return acpi_ec_transaction_unlocked(ec, &t); in acpi_ec_write_unlocked()
941 struct transaction t = {.command = command, in ec_transaction() local
948 return acpi_ec_transaction(first_ec, &t); in ec_transaction()
1175 struct transaction *t; in acpi_ec_create_query() local
1182 t = &q->transaction; in acpi_ec_create_query()
1183 t->command = ACPI_EC_COMMAND_QUERY; in acpi_ec_create_query()
1184 t->rdata = pval; in acpi_ec_create_query()
1185 t->rlen = 1; in acpi_ec_create_query()