Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/807064/?format=api
{ "id": 807064, "url": "http://patchwork.ozlabs.org/api/1.2/patches/807064/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20170829120835.17276-1-hdegoede@redhat.com/", "project": { "id": 35, "url": "http://patchwork.ozlabs.org/api/1.2/projects/35/?format=api", "name": "Linux I2C development", "link_name": "linux-i2c", "list_id": "linux-i2c.vger.kernel.org", "list_email": "linux-i2c@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170829120835.17276-1-hdegoede@redhat.com>", "list_archive_url": null, "date": "2017-08-29T12:08:35", "name": "i2c: designware: Round down ACPI provided clk to nearest supported clk", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d60c672f658d6e703537c963e4fe1c8a43dd0532", "submitter": { "id": 1893, "url": "http://patchwork.ozlabs.org/api/1.2/people/1893/?format=api", "name": "Hans de Goede", "email": "hdegoede@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20170829120835.17276-1-hdegoede@redhat.com/mbox/", "series": [ { "id": 355, "url": "http://patchwork.ozlabs.org/api/1.2/series/355/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=355", "date": "2017-08-29T12:08:35", "name": "i2c: designware: Round down ACPI provided clk to nearest supported clk", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/355/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807064/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807064/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linux-i2c-owner@vger.kernel.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-i2c-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=hdegoede@redhat.com" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhS8q37jwz9t1t\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 22:08:43 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753376AbdH2MIk (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 29 Aug 2017 08:08:40 -0400", "from mx1.redhat.com ([209.132.183.28]:37176 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1753246AbdH2MIi (ORCPT <rfc822;linux-i2c@vger.kernel.org>);\n\tTue, 29 Aug 2017 08:08:38 -0400", "from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id D55D681DF0;\n\tTue, 29 Aug 2017 12:08:37 +0000 (UTC)", "from shalem.localdomain.com (ovpn-117-162.ams2.redhat.com\n\t[10.36.117.162])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id B900663631;\n\tTue, 29 Aug 2017 12:08:36 +0000 (UTC)" ], "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com D55D681DF0", "From": "Hans de Goede <hdegoede@redhat.com>", "To": "Jarkko Nikula <jarkko.nikula@linux.intel.com>,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>", "Cc": "Hans de Goede <hdegoede@redhat.com>, linux-i2c@vger.kernel.org", "Subject": "[PATCH] i2c: designware: Round down ACPI provided clk to nearest\n\tsupported clk", "Date": "Tue, 29 Aug 2017 14:08:35 +0200", "Message-Id": "<20170829120835.17276-1-hdegoede@redhat.com>", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.15", "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tTue, 29 Aug 2017 12:08:38 +0000 (UTC)", "Sender": "linux-i2c-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<linux-i2c.vger.kernel.org>", "X-Mailing-List": "linux-i2c@vger.kernel.org" }, "content": "The Lenovo Miix2 8 DSDT contains an i2c clk / bus speed of 1700000 Hz\nfor one if its devices, which is not supported.\n\nThis is the second DSDT to show up with an unsupported clk in a short\ntime, remove the hardcoded fix for DSDTs with a 1 MiHz clock and simply\nalways round down the clk to the nearest supported value.\n\nReported-by: russianneuromancer@ya.ru\nFixes: 682c6c2188 (\"i2c: designware: Some broken DSTDs use 1MiHz ...\")\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\n---\n drivers/i2c/busses/i2c-designware-platdrv.c | 16 ++++++++++++----\n 1 file changed, 12 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c\nindex 57248bccadbc..2b98a173136f 100644\n--- a/drivers/i2c/busses/i2c-designware-platdrv.c\n+++ b/drivers/i2c/busses/i2c-designware-platdrv.c\n@@ -256,7 +256,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)\n \tstruct dw_i2c_dev *dev;\n \tu32 acpi_speed, ht = 0;\n \tstruct resource *mem;\n-\tint irq, ret;\n+\tint i, irq, ret;\n+\tconst int supported_speeds[] = { 0, 100000, 400000, 1000000, 3400000 };\n \n \tirq = platform_get_irq(pdev, 0);\n \tif (irq < 0)\n@@ -297,9 +298,16 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)\n \t}\n \n \tacpi_speed = i2c_acpi_find_bus_speed(&pdev->dev);\n-\t/* Some broken DSTDs use 1MiHz instead of 1MHz */\n-\tif (acpi_speed == 1048576)\n-\t\tacpi_speed = 1000000;\n+\t/*\n+\t * Some DSTDs use a non standard speed, round down to the lowest\n+\t * standard speed.\n+\t */\n+\tfor (i = 1; i < ARRAY_SIZE(supported_speeds); i++) {\n+\t\tif (acpi_speed < supported_speeds[i])\n+\t\t\tbreak;\n+\t}\n+\tacpi_speed = supported_speeds[i - 1];\n+\n \t/*\n \t * Find bus speed from the \"clock-frequency\" device property, ACPI\n \t * or by using fast mode if neither is set.\n", "prefixes": [] }