diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-07-13 16:45:02 +0300 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-07-31 16:55:41 +0300 |
commit | 682c6c2188f39d13548ccdc89c9888fbcb547889 (patch) | |
tree | d7ca86dcee41cc77ea1fef0e7a484f432b1b7843 /drivers/i2c/busses/i2c-designware-platdrv.c | |
parent | 22acc37b8681461707a3fc73505af808f9af8260 (diff) | |
download | linux-682c6c2188f39d13548ccdc89c9888fbcb547889.tar.xz |
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: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-designware-platdrv.c')
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index d139b156f9c9..143a8fd582b4 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -298,6 +298,9 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) } 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 * or by using fast mode if neither is set. |