|
11 | 11 | #include <linux/irqdomain.h>
|
12 | 12 | #include <linux/io.h>
|
13 | 13 | #include <linux/kernel.h>
|
| 14 | +#include <linux/module.h> |
14 | 15 | #include <linux/of.h>
|
15 | 16 | #include <linux/of_address.h>
|
16 | 17 | #include <linux/of_device.h>
|
| 18 | +#include <linux/of_irq.h> |
17 | 19 | #include <linux/soc/qcom/irq.h>
|
18 | 20 | #include <linux/spinlock.h>
|
19 | 21 | #include <linux/slab.h>
|
@@ -430,4 +432,28 @@ static int qcom_pdc_init(struct device_node *node, struct device_node *parent)
|
430 | 432 | return ret;
|
431 | 433 | }
|
432 | 434 |
|
433 |
| -IRQCHIP_DECLARE(qcom_pdc, "qcom,pdc", qcom_pdc_init); |
| 435 | +static int qcom_pdc_probe(struct platform_device *pdev) |
| 436 | +{ |
| 437 | + struct device_node *np = pdev->dev.of_node; |
| 438 | + struct device_node *parent = of_irq_find_parent(np); |
| 439 | + |
| 440 | + return qcom_pdc_init(np, parent); |
| 441 | +} |
| 442 | + |
| 443 | +static const struct of_device_id qcom_pdc_match_table[] = { |
| 444 | + { .compatible = "qcom,pdc" }, |
| 445 | + {} |
| 446 | +}; |
| 447 | +MODULE_DEVICE_TABLE(of, qcom_pdc_match_table); |
| 448 | + |
| 449 | +static struct platform_driver qcom_pdc_driver = { |
| 450 | + .probe = qcom_pdc_probe, |
| 451 | + .driver = { |
| 452 | + .name = "qcom-pdc", |
| 453 | + .of_match_table = qcom_pdc_match_table, |
| 454 | + .suppress_bind_attrs = true, |
| 455 | + }, |
| 456 | +}; |
| 457 | +module_platform_driver(qcom_pdc_driver); |
| 458 | +MODULE_DESCRIPTION("Qualcomm Technologies, Inc. Power Domain Controller"); |
| 459 | +MODULE_LICENSE("GPL v2"); |
0 commit comments