]> Git Repo - J-linux.git/commitdiff
bus: mhi: host: Allow controller drivers to specify name for the MHI controller
authorSlark Xiao <[email protected]>
Mon, 1 Jul 2024 02:12:15 +0000 (10:12 +0800)
committerManivannan Sadhasivam <[email protected]>
Wed, 3 Jul 2024 13:36:14 +0000 (19:06 +0530)
MHI devices usually have a product/device name to identify each device
uniquely. So let's specify that name in 'struct mhi_controller' so that the
client drivers can use this name to uniquely identify the devices and apply
any device specific quirks.

Signed-off-by: Slark Xiao <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[mani: reworked subject and description]
Signed-off-by: Manivannan Sadhasivam <[email protected]>
drivers/bus/mhi/host/pci_generic.c
include/linux/mhi.h

index 1fb1c2f2fe126d76d7075f9725d0d216b1f1c4d3..14a11880bceafb5581035cfd396bd6cdc69ef551 100644 (file)
@@ -1086,6 +1086,7 @@ static int mhi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        mhi_cntrl->runtime_get = mhi_pci_runtime_get;
        mhi_cntrl->runtime_put = mhi_pci_runtime_put;
        mhi_cntrl->mru = info->mru_default;
+       mhi_cntrl->name = info->name;
 
        if (info->edl_trigger)
                mhi_cntrl->edl_trigger = mhi_pci_generic_edl_trigger;
index b573f15762f85a643d06a49de762e0b463699696..fabd6ed8d258679a1b33302aff2ed3541ed2f908 100644 (file)
@@ -290,6 +290,7 @@ struct mhi_controller_config {
 
 /**
  * struct mhi_controller - Master MHI controller structure
+ * @name: Device name of the MHI controller
  * @cntrl_dev: Pointer to the struct device of physical bus acting as the MHI
  *            controller (required)
  * @mhi_dev: MHI device instance for the controller
@@ -367,6 +368,7 @@ struct mhi_controller_config {
  * they can be populated depending on the usecase.
  */
 struct mhi_controller {
+       const char *name;
        struct device *cntrl_dev;
        struct mhi_device *mhi_dev;
        struct dentry *debugfs_dentry;
This page took 0.066419 seconds and 4 git commands to generate.