Repository navigation
VCHIQ audio Device Tree support - #3448
Merged
Merged
Conversation
Following Eric's commit 37b7b30 ("staging/vc04_services: Register a platform device for the camera driver.") this register the audio driver as a platform device, too. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
vchiq kernel clients are now instantiated as platform drivers rather than using DT, but the children of the vchiq interface may still benefit from access to DT properties. Give them the option of a a sub-node of the vchiq parent for configuration and to allow them to be disabled. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
All the registered children of vchiq have a corresponding call to platform_device_unregister except bcm2835_audio. Fix that. Fixes: 25c7597 ("staging: vchiq_arm: Register a platform device for audio") Signed-off-by: Phil Elwell <phil@raspberrypi.com>
VCHIQ kernel clients are now instantiated as platform drivers rather than using DT, but the children of the vchiq device can optionally be given a sub-node of the vchiq parent for configuration and to disable them. Move the existing audio node beneath the vchiq parent, to prevent multiple instantiation and unpleasant warnings. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Contributor
Author
|
@popcornmix This is my proposal to resolve the audio problems in a way which is more closely aligned to upstream. |
Contributor
Author
|
Are there any objections to me merging this? |
Contributor
|
@pelwell Sadly, I wasn't here when you fixed the previous mess so my perspective is limited. But I don't think this part of the driver is likely to change. We've been using this device registering pattern all over the place and seems to work fine. So no objections. |
Contributor
Author
|
Thank you for the feedback - I'm trying not to diverge too far from the upstream way. |
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.
This is an attempt to solve the problem of the BCM2835 audio driver - a client of VCHIQ - which in its downstream incarnation makes use of Device Tree properties. Until a recent reversion the audio device was being instantiated twice - once via DT and once directly by the VCHIQ parent.
VCHIQ kernel client drivers have been transformed into platform drivers instantiated explicitly by the parent. This solves the issue of device creation order, but it poses a problem for downstream use - the clients lose their Device Tree nodes. I understand that use of DT by "devices" that don't directly address hardware is against some of the DT principles, but the VCHIQ clients do control hardware - they just present proxies for services running on the RPi firmware. I therefore don't think it's unreasonable to use DT to describe them, allowing them to benefit from automatic pin configuration etc.
The solution is to give each child device an optional DT node, identified by name, and initialise the platform device object with a pointer to it. In this way the device creation is still controlled by the vchiq "bus" driver, but the children are free to use DT.