Enable i2c-xiic and add upstream patches#564
Enable i2c-xiic and add upstream patches#564domingo-nexthop wants to merge 3 commits intosonic-net:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
paulmenzel
left a comment
There was a problem hiding this comment.
I think the description of the merge/pull request is not copied when submitting, so please add the text to the commit, and also use the full name in the Signed-off-by line there.
Lastly, instead of the tag Fixes, please use Resolves: when referencing issues.
| @@ -0,0 +1,107 @@ | |||
| From d1520f927851bb76f562d2fd1067acc55179e866 Mon Sep 17 00:00:00 2001 | |||
There was a problem hiding this comment.
No idea, how to do it with b4, but as the patches are in Linus’ branch master, please generate the patches from this, so the upstream commit hashes are used. The command below should do the trick:
git format-patch -7 dd0422eb1566a823587ede7780aef9c9c7a45b04
There was a problem hiding this comment.
Thanks. I updated the commit hashes of the patch files. Note that the patches come from master and so won't apply cleanly to the 6.12 sonic-linux-kernel. They are a bit different and won't match master exactly, despite the same commit hashes.
Applying patch 0001-i2c-xiic-switch-to-devres-managed-APIs.patch
4 out of 7 hunks FAILED
Patch 0001-i2c-xiic-switch-to-devres-managed-APIs.patch does not apply (enforce with -f)
There was a problem hiding this comment.
Ah good observation. No idea, if this will cause more confusion later on compared to just having the commit hash in the commit message body. @saiarcot895, what do you think?
There was a problem hiding this comment.
I'm fine with having the master branch commit hash either in the From line or in the commit body. When checking if a patch has been upstreamed, I'll use whatever's available.
|
/azp run |
375ec17 to
5660848
Compare
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Regarding the commit message, I will update the commit message before squash merge |
5660848 to
abef9ef
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
abef9ef to
144b7dc
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I updated the commit message and the sign-off line. Thank you! |
144b7dc to
95ac758
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
95ac758 to
c5d970e
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hi @saiarcot895 would you be able to review this change too? Thank you in advance. |
paulmenzel
left a comment
There was a problem hiding this comment.
Too improve it even more, you could also put possibly new Linux log messages to the sonic-linux-kernel commit message, or document some commands how to verify that the i2c-xiic device works properly.
Anyway, for me this looks good, and @saiarcot895 needs to decide how to handle the upstream commit hashes.
In my opinion, these patches should also go into the stable series as it fixes a hardware quirk, but the cosmetic improvement patches might raise objections. (The reality also contradicts the document a little in my experience.) Anyway, you could ask Andy and Greg, what they think.
c5d970e to
d3342f1
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d3342f1 to
d6fc214
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Cherry-pick the i2c-xiic upstream patches and pull in the one PM-runtime devm helper they depend on, since v6.12.41 predates it. Patches added (in series order, each cherry-picked from upstream; v6.12.41 lacks 73db799bf5ef so 0006 is needed by 0010 and 0013): - 0006-PM-runtime-Add-new-devm-functions.patch (stable 69a837b75edc / mainline 73db799bf5ef, in v6.12.55+) Adds devm_pm_runtime_set_active_enabled() and devm_pm_runtime_get_noresume(). Link: https://lore.kernel.org/r/20250327195928.680771-3-csokas.bence@prolan.hu - 0007-i2c-xiic-Relocate-xiic_i2c_runtime_suspend-and-xiic_.patch Link: https://lore.kernel.org/r/20241210095242.1982770-2-manikanta.guntupalli@amd.com - 0008-i2c-xiic-Add-atomic-transfer-support.patch Link: https://lore.kernel.org/r/20241210095242.1982770-3-manikanta.guntupalli@amd.com - 0009-i2c-i2c-xiic-Replace-dev_err-with-dev_err_probe-in-p.patch Link: https://lore.kernel.org/r/20250415183447.396277-10-e.zanda1@gmail.com - 0010-i2c-xiic-switch-to-devres-managed-APIs.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-1-b6c9ce4e4f3c@nexthop.ai - 0011-i2c-xiic-remove-duplicate-error-message.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-2-b6c9ce4e4f3c@nexthop.ai - 0012-i2c-xiic-switch-to-generic-device-property-accessors.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-3-b6c9ce4e4f3c@nexthop.ai - 0013-i2c-xiic-cosmetic-cleanup.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-4-b6c9ce4e4f3c@nexthop.ai - 0014-i2c-xiic-cosmetic-use-resource-format-specifier-in-d.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-5-b6c9ce4e4f3c@nexthop.ai - 0015-i2c-xiic-use-numbered-adapter-registration.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-6-b6c9ce4e4f3c@nexthop.ai - 0016-i2c-xiic-skip-input-clock-setup-on-non-OF-systems.patch Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-7-b6c9ce4e4f3c@nexthop.ai Also enable CONFIG_I2C_XILINX=m in config.local/amd64/config.sonic so the driver is actually built into the SONIC kernel. Resolves [sonic-net#543](sonic-net#543) Resolves [sonic-net#544](sonic-net#544) Signed-off-by: domingo-nexthop <domingo@nexthop.ai>
d6fc214 to
1fa5bea
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| From a085b9385bfbc6b6887a9fa21f3cd40bd3811b37 Mon Sep 17 00:00:00 2001 | ||
| From: Manikanta Guntupalli <manikanta.guntupalli@amd.com> | ||
| Date: Tue, 10 Dec 2024 15:22:41 +0530 | ||
| Subject: [PATCH 07/22] i2c: xiic: Relocate xiic_i2c_runtime_suspend and |
There was a problem hiding this comment.
Having just a subset of a series included, might be confusing, but I won’t object.
paulmenzel
left a comment
There was a problem hiding this comment.
Any new Linux logs from this module, which you could add to the commit message?
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: domingo-nexthop <domingo@nexthop.ai>
b07cade to
8bc8857
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Please see updated PR description. I have added more upstream patches to backport the i2c-xiic driver from 7.0. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Signed-off-by: domingo-nexthop <domingo@nexthop.ai>
4bcb22c to
d4e342b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Include the i2c-xiic driver and backport kernel patches from linux 7.0.
Patches added (in series order, each cherry-picked from upstream;
v6.12.41 lacks 73db799bf5ef so 0001 is needed by 0010 and 0013):
0001-PM-runtime-Add-new-devm-functions.patch
(stable 69a837b75edc / mainline 73db799bf5ef, in v6.12.55+)
Adds devm_pm_runtime_set_active_enabled() and
devm_pm_runtime_get_noresume().
Link: https://lore.kernel.org/r/20250327195928.680771-3-csokas.bence@prolan.hu
0007-i2c-xiic-Relocate-xiic_i2c_runtime_suspend-and-xiic_.patch
Link: https://lore.kernel.org/r/20241210095242.1982770-2-manikanta.guntupalli@amd.com
0008-i2c-xiic-Add-atomic-transfer-support.patch
Link: https://lore.kernel.org/r/20241210095242.1982770-3-manikanta.guntupalli@amd.com
0009-i2c-i2c-xiic-Replace-dev_err-with-dev_err_probe-in-p.patch
Link: https://lore.kernel.org/r/20250415183447.396277-10-e.zanda1@gmail.com
0010-i2c-xiic-switch-to-devres-managed-APIs.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-1-b6c9ce4e4f3c@nexthop.ai
0011-i2c-xiic-remove-duplicate-error-message.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-2-b6c9ce4e4f3c@nexthop.ai
0012-i2c-xiic-switch-to-generic-device-property-accessors.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-3-b6c9ce4e4f3c@nexthop.ai
0013-i2c-xiic-cosmetic-cleanup.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-4-b6c9ce4e4f3c@nexthop.ai
0014-i2c-xiic-cosmetic-use-resource-format-specifier-in-d.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-5-b6c9ce4e4f3c@nexthop.ai
0015-i2c-xiic-use-numbered-adapter-registration.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-6-b6c9ce4e4f3c@nexthop.ai
0016-i2c-xiic-skip-input-clock-setup-on-non-OF-systems.patch
Link: https://lore.kernel.org/r/20260223-i2c-xiic-v12-7-b6c9ce4e4f3c@nexthop.ai
Resolves sonic-net/sonic-linux-kernel#543
Resolves sonic-net/sonic-linux-kernel#544