IPU7: FIX GMSL + MIPI - #98
Open
syafiqnizam25 wants to merge 1 commit into
Open
Conversation
- tested with isx031 gmsl + mipi Signed-off-by: syafiqnizam25 <muhammadsyafiqnizamuddinx.binshafie@intel.com>
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 pull request refactors and improves the device registration and subdevice handling logic in
ipu7-isys.c, mainly to better support both platform-data and device-tree based configurations. It introduces a helper function to robustly fetch fwnode endpoints, adjusts the order and conditions for registering external subdevices, and ensures proper cleanup. The most important changes are:Device Tree / fwnode Handling Improvements
isys_get_fwnode_endpoint_by_idhelper function to recursively fetch the correct fwnode endpoint, improving robustness in cases where endpoints may be attached to secondary fwnodes. (isys_get_fwnode_endpoint_by_id,ipu7-isys.c)isys_notifier_initto use the new helper function, ensuring endpoints are found even in more complex fwnode hierarchies. (isys_notifier_init,ipu7-isys.c)Subdevice Registration Logic
isys_register_devices, so that they are always registered if platform data is present, and the notifier is always initialized. Also, subdev nodes are registered only if there is no platform data or the notifier's waiting list is empty. (isys_register_devices,ipu7-isys.c)isys_register_ext_subdev, added logic to unregister subdevices that lack fwnodes, ensuring proper cleanup for manually linked platform-data subdevs. (isys_register_ext_subdev,ipu7-isys.c)Cleanup
Simplified the device removal logic in
isys_removeby always cleaning up the notifier, regardless of whether platform data is present. (isys_remove,ipu7-isys.c)tested with isx031 gmsl + mipi