diff options
author | Loic Poulain <loic.poulain@linaro.org> | 2020-11-25 14:24:49 +0100 |
---|---|---|
committer | Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> | 2020-11-28 12:00:49 +0530 |
commit | 10ea8bcda5ae5463889e15dfc98aa2a73270ea58 (patch) | |
tree | ac90e1ceef7da9e9f8930468d2325b5670337fdc /drivers/bus/mhi/core/debugfs.c | |
parent | 206e7383b34316cf56cdde96eab9d97e9a1dbd70 (diff) |
bus: mhi: core: Fix device hierarchy
This patch fixes the hierarchical structure of MHI devices. Indeed,
MHI client devices are directly 'enumerated' from the mhi controller
and therefore must be direct descendants/children of their mhi
controller device, in accordance with the Linux Device Model.
Today both MHI clients and controller devices are at the same level,
this patch ensures that MHI controller is parent of its client devices.
The hierarchy is especially important for power management (safe
suspend/resume order). It is also useful for userspace to determine
relationship between MHI client devices and controllers.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/bus/mhi/core/debugfs.c')
-rw-r--r-- | drivers/bus/mhi/core/debugfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/bus/mhi/core/debugfs.c b/drivers/bus/mhi/core/debugfs.c index 3a48801e01f4..7d43138ce66d 100644 --- a/drivers/bus/mhi/core/debugfs.c +++ b/drivers/bus/mhi/core/debugfs.c @@ -159,7 +159,9 @@ static int mhi_debugfs_devices_show(struct seq_file *m, void *d) return -ENODEV; } - device_for_each_child(mhi_cntrl->cntrl_dev, m, mhi_device_info_show); + /* Show controller and client(s) info */ + mhi_device_info_show(&mhi_cntrl->mhi_dev->dev, m); + device_for_each_child(&mhi_cntrl->mhi_dev->dev, m, mhi_device_info_show); return 0; } |