mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mfd: qcom-spmi-pmic: instantiate pmic peripherals at arch_initcall
The spmi_devices spawn platform devices for pmic peripherals. Some of these devices are required early on in the boot process. Initialize the driver at arch_initcall to avoid unnecessary probe deferrals. Change-Id: I38474bedcb284ed5a7df1ec8d26f680787f2c074 Signed-off-by: Abhijeet Dharmapurikar <[email protected]> Signed-off-by: Subbaraman Narayanamurthy <[email protected]> [[email protected]: add module exit function] Signed-off-by: David Collins <[email protected]>
This commit is contained in:
parent
a4d2754961
commit
5a5e52e13f
1 changed files with 16 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2014, 2017-2018, The Linux Foundation. All rights reserved. */
|
||||
/*
|
||||
* Copyright (c) 2014-2015, 2017-2019, The Linux Foundation.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
|
|
@ -150,7 +153,18 @@ static struct spmi_driver pmic_spmi_driver = {
|
|||
.of_match_table = pmic_spmi_id_table,
|
||||
},
|
||||
};
|
||||
module_spmi_driver(pmic_spmi_driver);
|
||||
|
||||
static int __init pmic_spmi_init(void)
|
||||
{
|
||||
return spmi_driver_register(&pmic_spmi_driver);
|
||||
}
|
||||
arch_initcall(pmic_spmi_init);
|
||||
|
||||
static void __exit pmic_spmi_exit(void)
|
||||
{
|
||||
spmi_driver_unregister(&pmic_spmi_driver);
|
||||
}
|
||||
module_exit(pmic_spmi_exit);
|
||||
|
||||
MODULE_DESCRIPTION("Qualcomm SPMI PMIC driver");
|
||||
MODULE_ALIAS("spmi:spmi-pmic");
|
||||
|
|
|
|||
Loading…
Reference in a new issue