diff --git a/drivers/irqchip/qcom-pdc.c b/drivers/irqchip/qcom-pdc.c index 2014dbb0bc43..216d0803b0e0 100644 --- a/drivers/irqchip/qcom-pdc.c +++ b/drivers/irqchip/qcom-pdc.c @@ -445,8 +445,31 @@ static int qcom_pdc_probe(struct platform_device *pdev, struct device_node *pare return ret; } -IRQCHIP_PLATFORM_DRIVER_BEGIN(qcom_pdc) -IRQCHIP_MATCH("qcom,pdc", qcom_pdc_probe) -IRQCHIP_PLATFORM_DRIVER_END(qcom_pdc) +static const struct of_device_id qcom_pdc_irqchip_match_table[] = { + { .compatible = "qcom,pdc", .data = qcom_pdc_probe }, + { } +}; +MODULE_DEVICE_TABLE(of, qcom_pdc_irqchip_match_table); + +static struct platform_driver qcom_pdc_driver = { + .probe = platform_irqchip_probe, + .driver = { + .name = "qcom_pdc", + .of_match_table = qcom_pdc_irqchip_match_table, + .suppress_bind_attrs = true, + }, +}; + +/* + * The TLMM needs its wakeup parent at probe. Registered with the device initcalls, the PDC binds + * after the TLMM's first try, and the TLMM, deferred until the late initcalls, holds back every pin + * state and GPIO until then. Registered before the platform devices are made, the PDC binds as + * its device appears, and the TLMM right after it. + */ +static int __init qcom_pdc_init(void) +{ + return platform_driver_register(&qcom_pdc_driver); +} +arch_initcall(qcom_pdc_init); MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); MODULE_LICENSE("GPL v2");