Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196889/?format=api
{ "id": 2196889, "url": "http://patchwork.ozlabs.org/api/patches/2196889/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260216-i2c-mux-v6-3-9be28ecfd7e3@gmail.com/", "project": { "id": 35, "url": "http://patchwork.ozlabs.org/api/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": "<20260216-i2c-mux-v6-3-9be28ecfd7e3@gmail.com>", "list_archive_url": null, "date": "2026-02-16T12:38:15", "name": "[v6,3/5] i2c: davinci: calculate bus freq from Hz instead of kHz", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "0172149e115658463d286e2f01035c806c486f63", "submitter": { "id": 46679, "url": "http://patchwork.ozlabs.org/api/people/46679/?format=api", "name": "Marcus Folkesson", "email": "marcus.folkesson@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260216-i2c-mux-v6-3-9be28ecfd7e3@gmail.com/mbox/", "series": [ { "id": 492305, "url": "http://patchwork.ozlabs.org/api/series/492305/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=492305", "date": "2026-02-16T12:38:13", "name": "I2C Mux per channel bus speed", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/492305/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196889/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196889/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-i2c+bounces-16013-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-i2c@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=Ng3KgqJK;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16013-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"Ng3KgqJK\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.167.53", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fF2QV6vSvz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 23:39:14 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id A0A183001CEB\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 12:38:49 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id B2D29271A94;\n\tMon, 16 Feb 2026 12:38:39 +0000 (UTC)", "from mail-lf1-f53.google.com (mail-lf1-f53.google.com\n [209.85.167.53])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 04B0323C4F3\n\tfor <linux-i2c@vger.kernel.org>; Mon, 16 Feb 2026 12:38:37 +0000 (UTC)", "by mail-lf1-f53.google.com with SMTP id\n 2adb3069b0e04-59e614b3dbcso3436413e87.2\n for <linux-i2c@vger.kernel.org>; Mon, 16 Feb 2026 04:38:37 -0800 (PST)", "from [192.168.1.135] (83-233-6-197.cust.bredband2.com.\n [83.233.6.197])\n by smtp.gmail.com with ESMTPSA id\n 2adb3069b0e04-59e5f5b0577sm3175920e87.71.2026.02.16.04.38.33\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 16 Feb 2026 04:38:35 -0800 (PST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771245519; cv=none;\n b=er8hkdEZH37hjlV7+CfS47DSji4IGF/ndTxBC+t4g3PrnhDq46mbb4mDgPc5ZnisMn0JcCOo5CVauGJctBT9rR26dkNHOh70DW/hK6UCb4CvhMxgpFBv39835d/VYT7dH8zekOLnRLrRzuhzVQKbBUEpy4scFET+Gq4zItDDeQM=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771245519; c=relaxed/simple;\n\tbh=NgWDqx3izSY9aW9W75gFytkLHJndTcTMdemaHAZbfa4=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=cODAKaOpOkR2KGWywyjVxQNsti6PoujuGDw9TIrxTIlhIcUSIR35WfhUY2YL/R++Ne7+gtv2wTWMhvCWMmTlGczbSnJE9Ur9SJ95ZGnnvR3MdHi/5BX7RlD+l0XR3/ya/oXmpRiN3hsQm8eqd3FgwZUkbJXv9ctaGkQSmfE+uTc=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=Ng3KgqJK; arc=none smtp.client-ip=209.85.167.53", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1771245516; x=1771850316;\n darn=vger.kernel.org;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to;\n bh=hgLydv0OAbPSYmy/7mtUdSMM6gy3g70cS63c1sKd/bM=;\n b=Ng3KgqJKFzpVn3u+jDb5S+tMn1MCQHaR/PfN1mkCKfY9yGLTkiJmDHYjTjmCVfLkPU\n bL++ja3rXSAKpvRwdhvwAfe1CZBkVURJP6lg5AUAGFlPffKnhHG9vFzYDoDquETgRWsh\n CYgBB5z2NJJ5rNbMXzzsAMpRE2esVosAxgy08+/gmvufIGgcxUl4JYbq8AsLqXMyfZ2U\n 9gMu0iUCYNd9JF2MS09Le/UTXrmmj6Q40sX9y+sjHbFqoaggpBS9PoW01KEfOHhZ0Wwb\n es1bJuKx0xFPrxJGqhZLFFwOPaddZgWEM+Jn2fQ7hdDqH1QQWfGNuzGwCAOa+EKJiJ7J\n +T8A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771245516; x=1771850316;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=hgLydv0OAbPSYmy/7mtUdSMM6gy3g70cS63c1sKd/bM=;\n b=nxmjbtSIEqR5CS2WJxTlvW4g0g6ISxJ4pThag7A74x7EckRXjE/g4DFFzh9H8zKspk\n wfUaqxWQaA/zcU0+zDWhqvXmalp/teBhNhzApRQVg1cg9fw+fzeFScXC2iEsgcWYZv+c\n VZtTZ60aPQ4TtUV7/w9tFEarky3WFWJtbW6Ndr07BjvtOnKgOCIKvlxRaC1dVQA7E/85\n 1LqLOjDKqadMacvOsQnZYJtwG4yb7jTl4E3kgSdIDEWm2OXli6zmWA/803arue/hKeHN\n MSFJBTlnVUb6srQ+v8omW2w9cAEcvYeplrDd+V2x2X4OMgp6nzqdgG3jqbmox2zyyOz1\n 1zmQ==", "X-Gm-Message-State": "AOJu0Yx3v1fDZdOT/9+R+ON37FEdrb5n5g+LNmmCWvLfj+4QFWXWRn46\n\t4lwGzOdmwRArcIkRc3+eMFNOsWq+e3xVIsgRBjFjIQNNOyUApl7gyWcE", "X-Gm-Gg": "AZuq6aKtqqW4R4VpicsBtnZDR8gsu/WL/HtKaMil56sg899JCvlXFjVgLmjbVC2/86F\n\tYcpbQ41Hx5rlIsXTUhsQoyR4S25nTzck0I9FrlCkTsPSgVulDrKYEHIWqx0hiVpeSXD5eQJJLnP\n\tWZvLdbjnJkaIdDBBaZZQv+Xr5Zdl++WyLgfXFGi1hu8C0Nn65bxxgDaWpNv9zmhvVFMpj5ejYkK\n\t9S62EfTFegGUPGHhIDIq2TYy63+PYdGMZWKoiAyorjoCsWbotJ4xVT83VxJF74EDNQv8BqTOYtg\n\tQMipxmJ4S7UBhSF4RBP50/hTmvh9XFtK10DQP6ixCrlNRrpjUWWteMHW4AyBnHrIQoafZRDjulT\n\t0FNnkFZ837ghad0fXDJlp8MCaCrVlLJDVH0suFjHB+TuW82lGBGQfkSv7HiKRkIg/xjTpIhl3kY\n\tKmlCTiU+m/jDMYbYEnx8P5ecPBgHgmKyPIbGXY6c9SgBDYqM75gbsJO+CyNQ1fbBNUGoG8", "X-Received": "by 2002:ac2:5687:0:b0:59f:7ccd:fe96 with SMTP id\n 2adb3069b0e04-59f7cce0005mr50852e87.28.1771245516024;\n Mon, 16 Feb 2026 04:38:36 -0800 (PST)", "From": "Marcus Folkesson <marcus.folkesson@gmail.com>", "Date": "Mon, 16 Feb 2026 13:38:15 +0100", "Subject": "[PATCH v6 3/5] i2c: davinci: calculate bus freq from Hz instead of\n kHz", "Precedence": "bulk", "X-Mailing-List": "linux-i2c@vger.kernel.org", "List-Id": "<linux-i2c.vger.kernel.org>", "List-Subscribe": "<mailto:linux-i2c+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-i2c+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260216-i2c-mux-v6-3-9be28ecfd7e3@gmail.com>", "References": "<20260216-i2c-mux-v6-0-9be28ecfd7e3@gmail.com>", "In-Reply-To": "<20260216-i2c-mux-v6-0-9be28ecfd7e3@gmail.com>", "To": "Wolfram Sang <wsa+renesas@sang-engineering.com>,\n Peter Rosin <peda@axentia.se>,\n Michael Hennerich <michael.hennerich@analog.com>,\n Bartosz Golaszewski <brgl@bgdev.pl>, Andi Shyti <andi.shyti@kernel.org>,\n Andy Shevchenko <andriy.shevchenko@intel.com>,\n Bartosz Golaszewski <brgl@kernel.org>", "Cc": "linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,\n linux-arm-kernel@lists.infradead.org,\n Marcus Folkesson <marcus.folkesson@gmail.com>,\n Bartosz Golaszewski <brgl@kernel.org>", "X-Mailer": "b4 0.14.3", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=2849;\n i=marcus.folkesson@gmail.com; h=from:subject:message-id;\n bh=NgWDqx3izSY9aW9W75gFytkLHJndTcTMdemaHAZbfa4=;\n b=owEBbQKS/ZANAwAKAYiATm9ZXVIyAcsmYgBpkw/NXf7RWEjJ/IHuBDaOR5YxveNI6Lowg3H3U\n elFFoc1vxCJAjMEAAEKAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCaZMPzQAKCRCIgE5vWV1S\n MrLgEACZHJ0+g5pduSJlFU/RbYUHW2lmuku+IK338ZI1j2QH7T1l+cotOX7Ww5+L/OeSUDrwUy6\n CE8TXG9ijuh9gBJ8N3b7PYGVFEe2PwqQQsgW1RJpLPxwYm6MseTIm2fIRwPUan44PWCwUVV+AyL\n VGnahHqu3Qn8mSTbYdD114xuMzR6XWsZ5hThlJyDijmMCj4aSxtBDWVJgxKHFwl8E0rnfa07wCT\n gYKd/2/18wr61E3xHJXFrhTnSuzIPu8uKRcDVi5hiBfI2LOKnpzluSWqLc8s5nCbPrYyhYne1yO\n Vpv02/spQssfx9PV9Jm7EiFTFg7AxaBHnVoGrGQrLyMkKUUsFNRVd3YqOLSPwKRQ576hGEs6HrN\n n9nQpZUt0SFzlLXEdijzT86rjkKt+tytvnQDRtTiqJ/i1t9YY18jJ7TohSAyAw36vbkat46P9f1\n DEmknjjVwcp/4dbnEtsflYF/SH63toL6P6ZI4ys4FwS57a8ei40VtZFStSko5K2j3K9TuV/z5ZX\n ljs2xYiu5/lz1UosoxgYj+xvbWkdULcj7DOqZKcOSMjPfhKbA3af9Hz3NHBnGiWZ/2zi8DCX/n1\n uP7xRprEudez2VV4YK+S+1BOwPFpzcCFlQpU/9YK++8/JXDX2QoEq8DVS3oWSTGHlR1Bco0RX/C\n kgnMaMsoNUiJ67Q==", "X-Developer-Key": "i=marcus.folkesson@gmail.com; a=openpgp;\n fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127" }, "content": "The bus frequency is unnecessarily converted between Hz and kHz in\nseveral places.\nThis is probably an old legacy from the old times (pre-devicetrees)\nwhen the davinci_i2c_platform_data took the bus_freq in kHz.\n\nStick to Hz.\n\nReviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>\nSigned-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>\n---\n drivers/i2c/busses/i2c-davinci.c | 18 ++++++++----------\n 1 file changed, 8 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c\nindex a773ba082321..761de5a814df 100644\n--- a/drivers/i2c/busses/i2c-davinci.c\n+++ b/drivers/i2c/busses/i2c-davinci.c\n@@ -117,8 +117,6 @@\n /* timeout for pm runtime autosuspend */\n #define DAVINCI_I2C_PM_TIMEOUT\t1000\t/* ms */\n \n-#define DAVINCI_I2C_DEFAULT_BUS_FREQ\t100\n-\n struct davinci_i2c_dev {\n \tstruct device *dev;\n \tvoid __iomem\t\t*base;\n@@ -134,8 +132,8 @@ struct davinci_i2c_dev {\n #ifdef CONFIG_CPU_FREQ\n \tstruct notifier_block\tfreq_transition;\n #endif\n-\t/* standard bus frequency (kHz) */\n-\tunsigned int\t\tbus_freq;\n+\t/* standard bus frequency */\n+\tunsigned int\t\tbus_freq_hz;\n \t/* Chip has a ICPFUNC register */\n \tbool\t\t\thas_pfunc;\n };\n@@ -209,16 +207,16 @@ static void i2c_davinci_calc_clk_dividers(struct davinci_i2c_dev *dev)\n \tif (device_is_compatible(dev->dev, \"ti,keystone-i2c\"))\n \t\td = 6;\n \n-\tclk = ((input_clock / (psc + 1)) / (dev->bus_freq * 1000));\n+\tclk = ((input_clock / (psc + 1)) / (dev->bus_freq_hz));\n \t/* Avoid driving the bus too fast because of rounding errors above */\n-\tif (input_clock / (psc + 1) / clk > dev->bus_freq * 1000)\n+\tif (input_clock / (psc + 1) / clk > dev->bus_freq_hz)\n \t\tclk++;\n \t/*\n \t * According to I2C-BUS Spec 2.1, in FAST-MODE LOW period should be at\n \t * least 1.3uS, which is not the case with 50% duty cycle. Driving HIGH\n \t * to LOW ratio as 1 to 2 is more safe.\n \t */\n-\tif (dev->bus_freq > 100)\n+\tif (dev->bus_freq_hz > 100000)\n \t\tclkl = (clk << 1) / 3;\n \telse\n \t\tclkl = (clk >> 1);\n@@ -269,7 +267,7 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev)\n \t\tdavinci_i2c_read_reg(dev, DAVINCI_I2C_CLKL_REG));\n \tdev_dbg(dev->dev, \"CLKH = %d\\n\",\n \t\tdavinci_i2c_read_reg(dev, DAVINCI_I2C_CLKH_REG));\n-\tdev_dbg(dev->dev, \"bus_freq = %dkHz\\n\", dev->bus_freq);\n+\tdev_dbg(dev->dev, \"bus_freq_hz = %dHz\\n\", dev->bus_freq_hz);\n \n \n \t/* Take the I2C module out of reset: */\n@@ -760,9 +758,9 @@ static int davinci_i2c_probe(struct platform_device *pdev)\n \n \tr = device_property_read_u32(&pdev->dev, \"clock-frequency\", &prop);\n \tif (r)\n-\t\tprop = DAVINCI_I2C_DEFAULT_BUS_FREQ;\n+\t\tprop = I2C_MAX_STANDARD_MODE_FREQ;\n \n-\tdev->bus_freq = prop / 1000;\n+\tdev->bus_freq_hz = prop;\n \n \tdev->has_pfunc = device_property_present(&pdev->dev, \"ti,has-pfunc\");\n \n", "prefixes": [ "v6", "3/5" ] }