Skip to content

Get rid of platdata from adi spi3 - #94

Open
jiez wants to merge 1 commit into
adi-u-boot-2025.10.yfrom
get-rid-of-platdata-from-adi-spi3
Open

Get rid of platdata from adi spi3#94
jiez wants to merge 1 commit into
adi-u-boot-2025.10.yfrom
get-rid-of-platdata-from-adi-spi3

Conversation

@jiez

@jiez jiez commented May 5, 2026

Copy link
Copy Markdown

A recent discussion with Caleb let me realize that adi_spi_platdata is an unnecessary indirection. Removing it will simplify the driver code.

@jiez
jiez requested review from a team, ozan956 and pamolloy May 5, 2026 15:43
@jiez
jiez force-pushed the get-rid-of-platdata-from-adi-spi3 branch from 8501f71 to af11601 Compare May 5, 2026 15:59

@vasbimpikasadi vasbimpikasadi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clean refactor and ~30 lines unneeded lines removed. Ship it!

@CalebEthridgeADI CalebEthridgeADI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on an SC598

Comment thread drivers/spi/adi_spi3.c
@pamolloy pamolloy added this to ADSP Jun 9, 2026

@pamolloy pamolloy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jiez Once you address Ozan's comment and the following please submit it upstream.

Minor inaccuracy: The commit message states that fields were "immediately copied into adi_spi_priv during probe()" in the old code. In reality, max_hz was NOT copied to priv—it remained in platdata and was accessed directly from there. However, this doesn't affect the correctness of the code change itself.

Claude Sonnet 4.6

@pamolloy pamolloy moved this to Mainlining in ADSP Jun 9, 2026
adi_spi_platdata is an unnecessary indirection. Read all DT properties
directly into priv in probe().

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
@jiez
jiez force-pushed the get-rid-of-platdata-from-adi-spi3 branch from af11601 to 164774d Compare June 10, 2026 17:21
@jiez

jiez commented Jun 10, 2026

Copy link
Copy Markdown
Author

@jiez Once you address Ozan's comment and the following please submit it upstream.

Minor inaccuracy: The commit message states that fields were "immediately copied into adi_spi_priv during probe()" in the old code. In reality, max_hz was NOT copied to priv—it remained in platdata and was accessed directly from there. However, this doesn't affect the correctness of the code change itself.

Claude Sonnet 4.6

@jiez Once you address Ozan's comment and the following please submit it upstream.

Minor inaccuracy: The commit message states that fields were "immediately copied into adi_spi_priv during probe()" in the old code. In reality, max_hz was NOT copied to priv—it remained in platdata and was accessed directly from there. However, this doesn't affect the correctness of the code change itself.

Claude Sonnet 4.6

Funny thing is this commit message was generated by Claude. I just removed the inaccurate part.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Mainlining

Development

Successfully merging this pull request may close these issues.

5 participants