-
Notifications
You must be signed in to change notification settings - Fork 215
Add kernel patches for spi-xilinx #541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
saiarcot895
merged 6 commits into
sonic-net:master
from
nexthop-ai:domingo.kernel-pathces
Mar 31, 2026
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
56c63c8
add patch for spi-xilinx and i2c-xiic
domingo-nexthop 2f41720
revert changes in patches-sonic/kconfig-inclusions
domingo-nexthop 1dbede2
update patches to match upstream commits
domingo-nexthop 1c43d2d
remove i2c-xiic patch
domingo-nexthop b7e171d
empty commit to start build
domingo-nexthop c752cf5
split into individual patch files
domingo-nexthop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
patches-sonic/0003-i2c-xiic-read-i2c-bus-number-from-platform-device-id.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| From 61b8e5e26ebe493834f351e55a477575d6ae55c0 Mon Sep 17 00:00:00 2001 | ||
| From: Domingo <domingo@nexthop.ai> | ||
| Date: Mon, 26 Jan 2026 23:39:29 +0000 | ||
| Subject: [PATCH] Read i2c bus number from platform device id | ||
|
|
||
| This is similar to drivers/i2c/busses/i2c-pxa.c and drivers/i2c/busses/i2c-imx.c | ||
| --- | ||
| drivers/i2c/busses/i2c-xiic.c | 3 ++- | ||
| 1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
|
||
| diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c | ||
| index 1d68177241a6..e0737ad1897d 100644 | ||
| --- a/drivers/i2c/busses/i2c-xiic.c | ||
| +++ b/drivers/i2c/busses/i2c-xiic.c | ||
| @@ -1262,6 +1262,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) | ||
| platform_set_drvdata(pdev, i2c); | ||
| i2c->adap = xiic_adapter; | ||
| i2c_set_adapdata(&i2c->adap, i2c); | ||
| + i2c->adap.nr = pdev->id; | ||
| i2c->adap.dev.parent = &pdev->dev; | ||
| i2c->adap.dev.of_node = pdev->dev.of_node; | ||
| snprintf(i2c->adap.name, sizeof(i2c->adap.name), | ||
| @@ -1319,7 +1320,7 @@ static int xiic_i2c_probe(struct platform_device *pdev) | ||
| } | ||
|
|
||
| /* add i2c adapter to i2c tree */ | ||
| - ret = i2c_add_adapter(&i2c->adap); | ||
| + ret = i2c_add_numbered_adapter(&i2c->adap); | ||
| if (ret) { | ||
| xiic_deinit(i2c); | ||
| goto err_pm_disable; | ||
| -- | ||
| 2.43.0 | ||
|
|
25 changes: 25 additions & 0 deletions
25
patches-sonic/0004-xilinx-spi-platform_get_irq_optional.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| From 7b32abed3ac9eb578e81cece63a508d7a24e2f7d Mon Sep 17 00:00:00 2001 | ||
| From: Domingo <domingo@nexthop.ai> | ||
| Date: Mon, 2 Feb 2026 22:57:51 +0000 | ||
| Subject: [PATCH] platform_get_irq_optional | ||
|
|
||
| --- | ||
| drivers/spi/spi-xilinx.c | 2 +- | ||
| 1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
|
||
| diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c | ||
| index f5e41813b958..e124d7e01c47 100644 | ||
| --- a/drivers/spi/spi-xilinx.c | ||
| +++ b/drivers/spi/spi-xilinx.c | ||
| @@ -470,7 +470,7 @@ static int xilinx_spi_probe(struct platform_device *pdev) | ||
| xspi->bytes_per_word = bits_per_word / 8; | ||
| xspi->buffer_size = xilinx_spi_find_buffer_size(xspi); | ||
|
|
||
| - xspi->irq = platform_get_irq(pdev, 0); | ||
| + xspi->irq = platform_get_irq_optional(pdev, 0); | ||
| if (xspi->irq < 0 && xspi->irq != -ENXIO) { | ||
| return xspi->irq; | ||
| } else if (xspi->irq >= 0) { | ||
| -- | ||
| 2.43.0 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.