Accton AS4610: let the CPLD driver handle sub devices#963
Merged
sonoble merged 3 commits intoopencomputeproject:masterfrom May 14, 2024
Merged
Accton AS4610: let the CPLD driver handle sub devices#963sonoble merged 3 commits intoopencomputeproject:masterfrom
sonoble merged 3 commits intoopencomputeproject:masterfrom
Conversation
The FAN device directly depends on the CPLD device, so let it be created by the CPLD driver. This allows us to convert the FAN driver to a simple platform driver. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
This is a platform driver, not an I2C driver, so fix and add the id table to the driver. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
The LED device directly depends on the CPLD device, so let it be created by the CPLD driver. This allows us to convert the LED driver to a simple platform driver. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
sonoble
approved these changes
Jan 10, 2024
Contributor
sonoble
left a comment
There was a problem hiding this comment.
Build is successful and runs on the DUTs in my lab
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Properly let the CPLD driver manage the LED and CPLD platform devices instead of registering them always in their respective modules.
This avoids registering devices on platforms without the CPLD present, introduces proper ordering of registering the platform devices only after the CPLD driver has finished initializing, and simplifies the drivers significantly.
To make this properly work, also fix the module device table for the FAN driver, and add one for the LED driver.