Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2196301/?format=api
{ "id": 2196301, "url": "http://patchwork.ozlabs.org/api/patches/2196301/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260213-i2c-mux-v5-3-fb2cbf9979b3@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": "<20260213-i2c-mux-v5-3-fb2cbf9979b3@gmail.com>", "list_archive_url": null, "date": "2026-02-13T11:06:52", "name": "[v5,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/20260213-i2c-mux-v5-3-fb2cbf9979b3@gmail.com/mbox/", "series": [ { "id": 492083, "url": "http://patchwork.ozlabs.org/api/series/492083/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/list/?series=492083", "date": "2026-02-13T11:06:52", "name": "I2C Mux per channel bus speed", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/492083/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2196301/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2196301/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-i2c+bounces-15974-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=d5HCWn4c;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-i2c+bounces-15974-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=\"d5HCWn4c\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.208.171", "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 [104.64.211.4])\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 4fC8gB4StXz1xr1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 22:13:42 +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 55E8E304D092\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 11:08:13 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 6A3D235770A;\n\tFri, 13 Feb 2026 11:08:01 +0000 (UTC)", "from mail-lj1-f171.google.com (mail-lj1-f171.google.com\n [209.85.208.171])\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 A3D693563C5\n\tfor <linux-i2c@vger.kernel.org>; Fri, 13 Feb 2026 11:07:59 +0000 (UTC)", "by mail-lj1-f171.google.com with SMTP id\n 38308e7fff4ca-3878de20527so4661431fa.3\n for <linux-i2c@vger.kernel.org>; Fri, 13 Feb 2026 03:07:59 -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 38308e7fff4ca-387068924c3sm13635831fa.1.2026.02.13.03.07.56\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 13 Feb 2026 03:07:57 -0800 (PST)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1770980881; cv=none;\n b=PURWEZIt37sUKuwmcRVkM8ERuSLBDxsvfrLkawYC/w+5tuh88TrvH46/ZMdmqP9VqgrEBbRRSTQ46nfh8EjRQBRj7UdMK9KKaJxQapJCpkwHNzpY/KT4EzZyqH/2RYDpZDVvrfB1wxDjmIdr6rlAtYPH9hlH2I7IvgZXTw4voM4=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1770980881; 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=FMnTXjzrzcXk+tsMIrcTaHNkRaimv9YWmY+BNSmGHCWTQt6/8/HrS0wVHxqSF0aiY5UlSxiPh1XdV6DMzthRtWXlywNfK+uTegN3I5IG07Ot0SZkcyXzq+x02QFEN8QCIyowdU7UEl7l9h5d5jAWsrq8+5OaryLwKJWdVJJ967k=", "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=d5HCWn4c; arc=none smtp.client-ip=209.85.208.171", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770980878; x=1771585678;\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=d5HCWn4cZQHaFNlDeclJ0EMes9WQwVdUPBNitMM8i6QuQ0b2nDwmw1MWzjZ3KcSsm/\n e3KUaFqeL3Q7pMaBzLf8tr2lJ5msXDsdNSGzRiGsYvzwBx7tw82VpIDE4Tj9r4EQf4bi\n sOtrJjUSwkThvammcaxemg5rOHvc8lzH2TJbvCGI40SQ/HpyZfi11n+F9SAmYMePpvJ/\n 5OVvMj7Yqa3Rc6b/oopDVn9AQCJwd9+i459ECZDU9TA69uQauBgw0ST6iDa0CkeElulM\n OJPaOCUQMpM4EGFWk4iNftB9KXxc5t/hKyAtxm2EPeJXTu2liFv2ROmAGvw1bSH/DUok\n yfsQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770980878; x=1771585678;\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=eW4SZnKhu1Zy4SaeuliZ+AoLYTZ5AnyAD8+Bo8VoZvMbEPM/mW19gSnD9ECBbF0qvf\n UnsgaagX7cp4ruSN+cXMMtrGCU7howZ8qzFhXg5pREA3wn3DofIaYPdT/qEXxWaXdhK5\n 5fxuw4sRkVJn4ql1dTRyaQsQ1SNLm2MjqI9jmWFT31yNWIQYyBINb3k66jTzvNVYlL2R\n cVcNFqDcKhPHLVn3MM/CK6+8KdjwmGA3S7AoDaCpr3SU5qlPoEacQvi/5QzUgGn8PB70\n 9UUnJQmVElyCZC7ZY2uSOplch44fqUjRH+WQIoS4K89P2pbvPkh+5ITe6910HnXyhGZM\n d/4Q==", "X-Gm-Message-State": "AOJu0YxcMpQn7l+MEw/DtTp38AASPJkGHo0jpQycZXlsUKPum1bi0sbF\n\ttKIA6LPmBnIAUFeO+QACuegAgyEglPGCciQJrL8aqOCS/d7dw6qyh/me", "X-Gm-Gg": "AZuq6aIx3DfjHbWu5taqv7Iuk6Cwcv3F1J3KC8fihWe4iFx8zYIMedmRbaUBH70S6bZ\n\t/4DZ5lwQNhxMHDdRxgjNeoVg8Qf06VPoayKHog6v/oSc0ZTypeiQTDr0nL6wkuGavU/s8+d2iUY\n\tspVFt1xUVi0vHQ/XVjZRsNr+ayJ2e5uK217mkeHXudLujVXLrEem3bavEDUr1WO+ArdyKRXjh0Q\n\tNARXvQcFRyZ3eHnIHPvWuOeHqnpPsejos75ylcoco8MPMm2FWrKkoNwEmIdkWauqoZSIMtg9aHs\n\tVzwCi0FHnWvGY6YD3/RvTRlR7Kgiqsgsqm38EXPIPdrbyKrVCCz1V9LEz7g52MJWpiPFa1IbIlx\n\tr+iE9nzq+Mkvjz9pJ0TqDpmsxt7OrMTwpEpeRp/nYk5TgjG36G83w3BxnFTi5iC6owQ5BYlgZ80\n\totGn/J+y+pLeTrTMTpf6MGdD1SABRaaBjcJURlwOes9xMR0mYV8m1L2Yk2HV0gqOKnEK2f", "X-Received": "by 2002:a2e:b8c8:0:b0:385:da34:5182 with SMTP id\n 38308e7fff4ca-388104d9e2amr4905271fa.13.1770980877740;\n Fri, 13 Feb 2026 03:07:57 -0800 (PST)", "From": "Marcus Folkesson <marcus.folkesson@gmail.com>", "Date": "Fri, 13 Feb 2026 12:06:52 +0100", "Subject": "[PATCH v5 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": "<20260213-i2c-mux-v5-3-fb2cbf9979b3@gmail.com>", "References": "<20260213-i2c-mux-v5-0-fb2cbf9979b3@gmail.com>", "In-Reply-To": "<20260213-i2c-mux-v5-0-fb2cbf9979b3@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 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/ZANAwAKAYiATm9ZXVIyAcsmYgBpjwYL/mBgptLRECM6Xhb4gqTFs3FQSjGviRzOv\n JLmo5EhXpSJAjMEAAEKAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCaY8GCwAKCRCIgE5vWV1S\n MvCZD/9WMtRGpgF1nsGmzHotYBXEo3UiFoeK7+Nu+zc50fy5TcIUV8PLiDl9zLOnr/WKONF/c72\n FYdeNB+ufxhjtKxNGOIoqlw+xkIR5HtF1iehNbmPanpjW69FJ45g9dWU8iq491iNx6zyDvINhN3\n AuuhvYJmDzuLsnwgAPMALlDA7WskPKu3uigAhraJNLUb8zbtrZBHzWgY8QVF+70RWB7JjWvrvNX\n zB9eFtd6uA5iowL74VBvk4cJgknFWoo76C2jgFKNawr1E+mOQjHxp5KKcoM+2JtNINsk3R4wjoq\n xPN3TwGPNJO9bA6tS19h9fnEFLJLO+xyXB6GTnEBWo36z7mG5pssbevtsI+kN+na8+H+9+RY0cd\n PxOFsJyIBrcb0XHZ9EV68dZC0LQl7DulfGCLh6hiTn+DwiFn0KH9bNoTk3qbsTQWP/i2hihMyxD\n YV2SbP8oC56SwxAb7hQzx4vpit/Cs7aKxdbGU47uYS9wSkt/DgRpFQld5yhMqbsth2fDte6fRFL\n Y1uo4i70kLXeyP6aUK8w8SH30CO3kmPh3bMdVF6TzMO9MUnYKnmTV9r6W2p1EBW07uB9mLWRf8V\n AzfMPFwJ7l3r5OSOe2FoSOOCe//DzfmZmeMgf90tDRh9jynzenWcEv2iVArE2khhRIvdwa9kLDc\n OF7wPgFWNaWbBzg==", "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": [ "v5", "3/5" ] }