get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196891/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196891,
    "url": "http://patchwork.ozlabs.org/api/patches/2196891/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-i2c/patch/20260216-i2c-mux-v6-4-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-4-9be28ecfd7e3@gmail.com>",
    "list_archive_url": null,
    "date": "2026-02-16T12:38:16",
    "name": "[v6,4/5] i2c: davinci: add support for setting bus frequency",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "62eb0999e4620f41aad8cda4d172831ed0d15f52",
    "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-4-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/2196891/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196891/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-i2c+bounces-16014-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=QtevYd0C;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-i2c+bounces-16014-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=\"QtevYd0C\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.167.47",
            "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 tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4fF2R90TNNz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 23:39:49 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 4A6D7301FAB1\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 16 Feb 2026 12:38:55 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 352C02D73B5;\n\tMon, 16 Feb 2026 12:38:41 +0000 (UTC)",
            "from mail-lf1-f47.google.com (mail-lf1-f47.google.com\n [209.85.167.47])\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 4E2C7254B18\n\tfor <linux-i2c@vger.kernel.org>; Mon, 16 Feb 2026 12:38:39 +0000 (UTC)",
            "by mail-lf1-f47.google.com with SMTP id\n 2adb3069b0e04-59de66fda55so3187420e87.3\n        for <linux-i2c@vger.kernel.org>; Mon, 16 Feb 2026 04:38:39 -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.36\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Mon, 16 Feb 2026 04:38:36 -0800 (PST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771245520; cv=none;\n b=fQz9kA914qwL0nU1xQkp0QGt+2SCDGkJYIN7qocUMnuGfQ8NvG5QyjpUWG+9AwhGCznwiyy+Z71PnqoNzIxvfAEUz7LBbm44GPpJyTBrI07NMmr+simi2P3kILV91nUOUkL0lopD2DcnJN9O0KKG3Bf+y9a7ffC+AL9lwK6daDU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771245520; c=relaxed/simple;\n\tbh=FZLb5XRyW3qJmkpIPIeOUrGpSdB/lOwxjtGV8G6aT1w=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=WfGjjSCvcYIbCg5wnY078YOwz/iKTUpHB6idBoy0gZWKwVw4qWMr8HA2arMCt9pE9HSs1JDvr3NrU0mvFG7PHmCi5s2q1WrYP6/8ip3ZVlaDhILdoSK797z3SFswvHYo+MamH35rAvAWTIibYt7ReldLp0UHWc/OpNrT6GAq++Q=",
        "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=QtevYd0C; arc=none smtp.client-ip=209.85.167.47",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20230601; t=1771245517; x=1771850317;\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=cGd9MnZZeJn6tPn8V3/jY050merklc3RKXS0iFKCy0A=;\n        b=QtevYd0CGwECo2ucYFbvZz2H1HatKDGqQKFnxHhUFh+gveCLeB6sg229E+7mjYnFII\n         HofqzFs4ITPtdQkTaieFHuzIe+eVrRv71mBgqvpyq2190Y5q3lzEpWP9i8b13aMpY+jT\n         7GDUlX/WHPLmfwHuKtytx2KtHsz0aV9ndq3H7ALt9ANYhMLhQpcrwCJGsYippmbl1w4y\n         9OLz78Y6i0bO4P/ke4Fqda38vJXtzqa5X/wWmXM75IgmeoXYvpZSPF3cRsOCVkIQX1Ph\n         efiM1Y5nqpoxqXXWl8K188E/CDZKmqzNDMCU3lLty/6MnSLjm9gm5Llg6FbgNOlIS6F9\n         uxoQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20230601; t=1771245517; x=1771850317;\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=cGd9MnZZeJn6tPn8V3/jY050merklc3RKXS0iFKCy0A=;\n        b=Bs/WsjidBBU5MFFdJz4EMiY4nKhVO4W0Xyfg41UYVTlWsVqHckMbqOAm2NDYCweHx/\n         VgDFKN6gVUeYdPeQzufV476puxcl6Dey7Yl2fGzQWbEFnWJ5C17VJ4eYjn+/eIcM/GcB\n         8G4+fvmRJie4FhLC+5Am4xIusLo7N8p/Gz7MM/BaZw1HaPxyDbLQtnZmBBIgO4C9CatZ\n         PaKLvB+O5hChM3+cl7zxAOKhYQigQmfcKOpd/VuOWi2gbx48Jw3yLwfFTbTf1Z5SO/k9\n         Q7uWKCyhr0RuSq3Qz3sOFZtizMJERCqvkNvt0XS1+tA3mkJZJKOXoVueCFUH1hnkD3/i\n         jO3g==",
        "X-Gm-Message-State": "AOJu0YyO5tiDWVYGOm36FcHVbYls1h4mzr+kWWnr6CM4AdYwpErK6O97\n\tOCe9XU8KHk3/NIZ3KDvbwkn9OFmx8lMUsHivRVqkqvJ1vOk8tFtGxFJ2",
        "X-Gm-Gg": "AZuq6aKt/xlg51Nb9Ft8wRWcRSm75ReFoRf+0sPBgEqd4RT1k8nUCGulpmrOGCIOcd1\n\t4nA1wUwufqJVuhVDvBPNQuHBJepWE1TAcwHjvicCVMgSoKHOnyrNSFSuuBYOClhLDd4Dq9aysNE\n\tLU85m9RTGaJe4DRSzYiNsTE2n8X+IisU4ZeutRj4VA/vrGzU1cCXkYE2IB9uAGxY6/Pg+CDXpnY\n\tA6VO1JQrvl6EIfVKYC/XYBOepsYSuotn74DEIgfY3uRNR5AE62sLIFS7Jswhd6AY7/NQxCNoqi6\n\tTvKiF4nm296756Yw0Ke/TTmwr7n5VgZx9g1C5uJEYnWDXEgdO66OvVz6EceDIIQ9mQntD0GS4XN\n\teX4TSXYQLUNeXn/KZDs3OFz18c9YNHMuVbrL/T7G8UGcVFV8eq/RDxqo1WcqXrEyitNxfHZES7L\n\tr2Il3AJf6VzWeAaLodNqB9DmxVs7WM9bLw6hfsE7kM/229olvS/DxjANo5gCJELoa5Pctv",
        "X-Received": "by 2002:a05:6512:ac9:b0:59e:49f3:657e with SMTP id\n 2adb3069b0e04-59f6d3590aamr1998626e87.21.1771245517227;\n        Mon, 16 Feb 2026 04:38:37 -0800 (PST)",
        "From": "Marcus Folkesson <marcus.folkesson@gmail.com>",
        "Date": "Mon, 16 Feb 2026 13:38:16 +0100",
        "Subject": "[PATCH v6 4/5] i2c: davinci: add support for setting bus frequency",
        "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-4-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=4136;\n i=marcus.folkesson@gmail.com; h=from:subject:message-id;\n bh=FZLb5XRyW3qJmkpIPIeOUrGpSdB/lOwxjtGV8G6aT1w=;\n b=owEBbQKS/ZANAwAKAYiATm9ZXVIyAcsmYgBpkw/SjhxPbOdl6PzzFXxkG7V00Yfw6LrO32v8G\n AJ5G3J/oZaJAjMEAAEKAB0WIQQFUaLotmy1TWTBLGWIgE5vWV1SMgUCaZMP0gAKCRCIgE5vWV1S\n MuWAD/sEgcqRDjfv4dBtPGn2rMygDHEQ/WhM8LZZY/ZsUdTu9IEazfaetDhsq19yVFasDasuKDN\n DsYRv1P0iG0tx5+MlZkmLfN/5UETYd/30vekBJhObSat5hw6ipvIhKzQG9pPCIJ+T5K5yhRhITn\n KU1Bt0hFa+0TF4vhsVUfP0pgEEsdTUDu/b7b0LZIv5hCUbk1pv56Y0uM65puMV8FuIh+4MH1Pkl\n 8q4lVmWLYnbUEevmJTy3eEHw+BTKzwAf6NnpVAZL8MZd8e8+jdZkZbGMUdTfmIsMKb+GQZ/9Y3h\n rArQXnWUk/5sOPLjlwlMe5hBpv16OmHWtjkJ6e0U3mUBzEHYtlNpZ/T1Mmh8JYVMwIyA4QJAJdM\n dWrqg9RbU8x+499vybmgDvEaDqG/4O916z0m1G4mXHJ3cus79TG2Mt3Px8821pcBdxEoA/5QRPE\n dMmaylJHuhoBgEgAOkufNDCMbbFWI/xF/lXnN5QFUlOKsR5c3BI7OZ8F/q9gF0x4uEGRtEnkYjl\n SmtX+sYiLL/WDiNd+tTD/4Q0W3vbS7c7sGjeAlLk9tv5nR9Cj2kMz8qi3jHLFtQtcy+CRzm3Ij9\n R3K6H+G6lIuuHpi/0pBxr13dJSVrUk8cTbSJWAU00Yi0MNC6zTaBMcg8nmqx9yDLb88ehl1xQAZ\n 7m+FV3jxrMt5h7Q==",
        "X-Developer-Key": "i=marcus.folkesson@gmail.com; a=openpgp;\n fpr=AB91D46C7E0F6E6FB2AB640EC0FE25D598F6C127"
    },
    "content": "Populate adapter with clock_hz and set_clk_freq to enable support for\ndynamic bus frequency.\n\nRemove bus_freq_hz entirely and only use clock_hz instead.\n\nAcked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>\nSigned-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>\n---\n drivers/i2c/busses/i2c-davinci.c | 38 ++++++++++++++++++++++++++++++--------\n 1 file changed, 30 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c\nindex 761de5a814df..ca41e6d6b623 100644\n--- a/drivers/i2c/busses/i2c-davinci.c\n+++ b/drivers/i2c/busses/i2c-davinci.c\n@@ -132,8 +132,6 @@ struct davinci_i2c_dev {\n #ifdef CONFIG_CPU_FREQ\n \tstruct notifier_block\tfreq_transition;\n #endif\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@@ -171,6 +169,8 @@ static void i2c_davinci_calc_clk_dividers(struct davinci_i2c_dev *dev)\n \tu32 clkh;\n \tu32 clkl;\n \tu32 input_clock = clk_get_rate(dev->clk);\n+\tu32 bus_freq_hz = dev->adapter.clock_hz;\n+\n \n \t/* NOTE: I2C Clock divider programming info\n \t * As per I2C specs the following formulas provide prescaler\n@@ -207,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_hz));\n+\tclk = ((input_clock / (psc + 1)) / (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_hz)\n+\tif (input_clock / (psc + 1) / clk > 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_hz > 100000)\n+\tif (bus_freq_hz > 100000)\n \t\tclkl = (clk << 1) / 3;\n \telse\n \t\tclkl = (clk >> 1);\n@@ -267,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_hz = %dHz\\n\", dev->bus_freq_hz);\n+\tdev_dbg(dev->dev, \"bus_freq_hz = %dHz\\n\", dev->adapter.clock_hz);\n \n \n \t/* Take the I2C module out of reset: */\n@@ -279,6 +279,27 @@ static int i2c_davinci_init(struct davinci_i2c_dev *dev)\n \treturn 0;\n }\n \n+static int davinci_i2c_set_clk(struct i2c_adapter *adap, u32 clock_hz)\n+{\n+\tstruct davinci_i2c_dev *dev = i2c_get_adapdata(adap);\n+\n+\tif (adap->clock_hz == clock_hz)\n+\t\treturn 0;\n+\n+\tadap->clock_hz = clock_hz;\n+\n+\t/* put I2C into reset */\n+\tdavinci_i2c_reset_ctrl(dev, 0);\n+\n+\t/* compute clock dividers */\n+\ti2c_davinci_calc_clk_dividers(dev);\n+\n+\t/* Take the I2C module out of reset: */\n+\tdavinci_i2c_reset_ctrl(dev, 1);\n+\n+\treturn 0;\n+}\n+\n /*\n  * This routine does i2c bus recovery by using i2c_generic_scl_recovery\n  * which is provided by I2C Bus recovery infrastructure.\n@@ -755,12 +776,13 @@ static int davinci_i2c_probe(struct platform_device *pdev)\n \tdev->dev = &pdev->dev;\n \tdev->irq = irq;\n \tplatform_set_drvdata(pdev, dev);\n+\tadap = &dev->adapter;\n \n \tr = device_property_read_u32(&pdev->dev, \"clock-frequency\", &prop);\n \tif (r)\n \t\tprop = I2C_MAX_STANDARD_MODE_FREQ;\n \n-\tdev->bus_freq_hz = prop;\n+\tadap->clock_hz = prop;\n \n \tdev->has_pfunc = device_property_present(&pdev->dev, \"ti,has-pfunc\");\n \n@@ -800,7 +822,6 @@ static int davinci_i2c_probe(struct platform_device *pdev)\n \t\tgoto err_unuse_clocks;\n \t}\n \n-\tadap = &dev->adapter;\n \ti2c_set_adapdata(adap, dev);\n \tadap->owner = THIS_MODULE;\n \tadap->class = I2C_CLASS_DEPRECATED;\n@@ -809,6 +830,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)\n \tadap->dev.parent = &pdev->dev;\n \tadap->timeout = DAVINCI_I2C_TIMEOUT;\n \tadap->dev.of_node = dev_of_node(&pdev->dev);\n+\tadap->set_clk_freq = davinci_i2c_set_clk;\n \n \tif (dev->has_pfunc)\n \t\tadap->bus_recovery_info = &davinci_i2c_scl_recovery_info;\n",
    "prefixes": [
        "v6",
        "4/5"
    ]
}