Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b233c7 authored by Alexey Starikovskiy's avatar Alexey Starikovskiy Committed by Len Brown
Browse files

ACPI: EC: Some hardware requires burst mode to operate properly

Burst mode temporary (50 ms) locks EC to do only transactions with
driver, without it some hardware returns abstract garbage.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341



Signed-off-by: default avatarAlexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 3e71a87d
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -575,6 +575,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
	if (bits != 8 && acpi_strict)
	if (bits != 8 && acpi_strict)
		return AE_BAD_PARAMETER;
		return AE_BAD_PARAMETER;


	acpi_ec_burst_enable(ec);

	if (function == ACPI_READ) {
	if (function == ACPI_READ) {
		result = acpi_ec_read(ec, address, &temp);
		result = acpi_ec_read(ec, address, &temp);
		*value = temp;
		*value = temp;
@@ -594,6 +596,8 @@ acpi_ec_space_handler(u32 function, acpi_physical_address address,
		}
		}
	}
	}


	acpi_ec_burst_disable(ec);

	switch (result) {
	switch (result) {
	case -EINVAL:
	case -EINVAL:
		return AE_BAD_PARAMETER;
		return AE_BAD_PARAMETER;