Commit 1f2f0f1a authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz

commit 682c6c21 upstream.

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.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cfea0422
...@@ -254,6 +254,9 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) ...@@ -254,6 +254,9 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
} }
acpi_speed = i2c_acpi_find_bus_speed(&pdev->dev); acpi_speed = i2c_acpi_find_bus_speed(&pdev->dev);
/* Some broken DSTDs use 1MiHz instead of 1MHz */
if (acpi_speed == 1048576)
acpi_speed = 1000000;
/* /*
* Find bus speed from the "clock-frequency" device property, ACPI * Find bus speed from the "clock-frequency" device property, ACPI
* or by using fast mode if neither is set. * or by using fast mode if neither is set.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment