Skip to content

Commit 682c6c2

Browse files
jwrdegoedeWolfram Sang
authored andcommitted
i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz
At least the Acer Iconia Tab8 / aka W1-810 uses 1MiHz instead of 1MHz for one of its busses, fix this up to 1MHz instead of failing the probe of that bus. This fixes the accelerometer on the Acer Iconia Tab8 not working. Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 22acc37 commit 682c6c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
298298
}
299299

300300
acpi_speed = i2c_acpi_find_bus_speed(&pdev->dev);
301+
/* Some broken DSTDs use 1MiHz instead of 1MHz */
302+
if (acpi_speed == 1048576)
303+
acpi_speed = 1000000;
301304
/*
302305
* Find bus speed from the "clock-frequency" device property, ACPI
303306
* or by using fast mode if neither is set.

0 commit comments

Comments
 (0)