From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:58570 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752154AbdHNAdy (ORCPT ); Sun, 13 Aug 2017 20:33:54 -0400 Subject: Patch "i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz" has been added to the 4.12-stable tree To: hdegoede@redhat.com, andriy.shevchenko@linux.intel.com, gregkh@linuxfoundation.org, wsa@the-dreams.de Cc: , From: Date: Sun, 13 Aug 2017 15:18:55 -0700 Message-ID: <150266273517788@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz to the 4.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: i2c-designware-some-broken-dstds-use-1mihz-instead-of-1mhz.patch and it can be found in the queue-4.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 682c6c2188f39d13548ccdc89c9888fbcb547889 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 13 Jul 2017 15:45:02 +0200 Subject: i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz From: Hans de Goede commit 682c6c2188f39d13548ccdc89c9888fbcb547889 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: Hans de Goede Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-designware-platdrv.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -254,6 +254,9 @@ static int dw_i2c_plat_probe(struct plat } 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. Patches currently in stable-queue which might be from hdegoede@redhat.com are queue-4.12/iio-accel-bmc150-always-restore-device-to-normal-mode-after-suspend-resume.patch queue-4.12/iio-adc-revert-axp288-drop-bogus-axp288_adc_ts_pin_ctrl-register-modifications.patch queue-4.12/i2c-designware-some-broken-dstds-use-1mihz-instead-of-1mhz.patch