From: Hans de Goede <hdegoede@redhat.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jarkko Nikula <jarkko.nikula@linux.intel.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-i2c@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 2/2] i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz
Date: Sat, 22 Jul 2017 00:15:16 +0200	[thread overview]
Message-ID: <e344e80b-bdaa-a6df-d4f4-948b08544d60@redhat.com> (raw)
In-Reply-To: <1500213858.29303.20.camel@linux.intel.com>
Hi,
On 16-07-17 16:04, Andy Shevchenko wrote:
> On Thu, 2017-07-13 at 15:45 +0200, Hans de Goede wrote:
>> 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.
>>
> 
> Should it have a Fixes tag?
No I don't think so, as this worksaround a firmware bug the original
commit introducing the check is not really fixed by this, as the
original commit is fine really.
Regards,
Hans
> 
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> (on condition Jarkko and Wolfram are okay with this; in the future it
> would be better to have a list of possible speeds and algo that chooses
> one based on FW configuration)
> 
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   drivers/i2c/busses/i2c-designware-platdrv.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> 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.
> 
next prev parent reply	other threads:[~2017-07-21 22:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 13:45 [PATCH v3 1/2] i2c: designware: Print clock freq on invalid clock freq error Hans de Goede
2017-07-13 13:45 ` [PATCH v3 2/2] i2c: designware: Some broken DSTDs use 1MiHz instead of 1MHz Hans de Goede
2017-07-16 14:04   ` Andy Shevchenko
2017-07-21 22:15     ` Hans de Goede [this message]
2017-07-31 13:57     ` Wolfram Sang
2017-07-31 13:56   ` Wolfram Sang
2017-07-16 14:02 ` [PATCH v3 1/2] i2c: designware: Print clock freq on invalid clock freq error Andy Shevchenko
2017-07-31 13:56 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=e344e80b-bdaa-a6df-d4f4-948b08544d60@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).