Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4920b41f authored by Bhaumik Bhatt's avatar Bhaumik Bhatt
Browse files

mhi: core: assign controller name to own device



Controller name can be assigned to the mhi device under the
chan_name field which can be read in certain use cases.

Change-Id: I4bd8050b3ba485f3cf27a2f355e0ce2bacc66ccc
Signed-off-by: default avatarBhaumik Bhatt <bbhatt@codeaurora.org>
parent 7ac0985e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */

#include <linux/debugfs.h>
#include <linux/device.h>
@@ -1468,6 +1468,7 @@ int of_register_mhi_controller(struct mhi_controller *mhi_cntrl)
	}

	mhi_dev->dev_type = MHI_CONTROLLER_TYPE;
	mhi_dev->chan_name = mhi_cntrl->name;
	mhi_dev->mhi_cntrl = mhi_cntrl;
	dev_set_name(&mhi_dev->dev, "%04x_%02u.%02u.%02u", mhi_dev->dev_id,
		     mhi_dev->domain, mhi_dev->bus, mhi_dev->slot);