mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 20:22:08 +02:00
bus: mhi: host: Enable support for miscellaneous MHI features
Add a new MHI_BUS_MISC Kconfig entry and support to build miscellaneous MHI features in Makefile if enabled. It can be enabled only if necessary for certain controllers and is tied to module init/exit and MHI registration. Change-Id: I36429eed9e786681150aceb494bcd06cf3d09ca9 Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org> Signed-off-by: Lazarus Motha <quic_lmotha@quicinc.com>
This commit is contained in:
parent
20a444391a
commit
4cdf3aac4d
|
|
@ -1021,6 +1021,14 @@ int mhi_register_controller(struct mhi_controller *mhi_cntrl,
|
|||
|
||||
mhi_cntrl->mhi_dev = mhi_dev;
|
||||
|
||||
ret = mhi_misc_register_controller(mhi_cntrl);
|
||||
if (ret) {
|
||||
dev_err(mhi_cntrl->cntrl_dev,
|
||||
"Could not enable miscellaneous features\n");
|
||||
mhi_cntrl->mhi_dev = NULL;
|
||||
goto err_release_dev;
|
||||
}
|
||||
|
||||
mhi_create_debugfs(mhi_cntrl);
|
||||
|
||||
return 0;
|
||||
|
|
@ -1050,6 +1058,8 @@ void mhi_unregister_controller(struct mhi_controller *mhi_cntrl)
|
|||
unsigned int i;
|
||||
|
||||
mhi_deinit_free_irq(mhi_cntrl);
|
||||
mhi_misc_unregister_controller(mhi_cntrl);
|
||||
|
||||
/* Free the memory controller wanted to preserve for BHIe images */
|
||||
if (mhi_cntrl->img_pre_alloc) {
|
||||
mhi_cntrl->img_pre_alloc = false;
|
||||
|
|
@ -1445,12 +1455,14 @@ struct bus_type mhi_bus_type = {
|
|||
|
||||
static int __init mhi_init(void)
|
||||
{
|
||||
mhi_misc_init();
|
||||
mhi_debugfs_init();
|
||||
return bus_register(&mhi_bus_type);
|
||||
}
|
||||
|
||||
static void __exit mhi_exit(void)
|
||||
{
|
||||
mhi_misc_exit();
|
||||
mhi_debugfs_exit();
|
||||
bus_unregister(&mhi_bus_type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user