Loading drivers/soc/fsl/rcpm.c +22 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/suspend.h> #include <linux/kernel.h> #include <linux/acpi.h> #define RCPM_WAKEUP_CELL_MAX_SIZE 7 Loading Loading @@ -78,8 +79,18 @@ static int rcpm_pm_prepare(struct device *dev) "fsl,rcpm-wakeup", value, rcpm->wakeup_cells + 1); /* Wakeup source should refer to current rcpm device */ if (ret || (np->phandle != value[0])) if (ret) continue; /* * For DT mode, would handle devices with "fsl,rcpm-wakeup" * pointing to the current RCPM node. * * For ACPI mode, currently we assume there is only one * RCPM controller existing. */ if (is_of_node(dev->fwnode)) if (np->phandle != value[0]) continue; /* Property "#fsl,rcpm-wakeup-cells" of rcpm node defines the Loading Loading @@ -172,10 +183,19 @@ static const struct of_device_id rcpm_of_match[] = { }; MODULE_DEVICE_TABLE(of, rcpm_of_match); #ifdef CONFIG_ACPI static const struct acpi_device_id rcpm_acpi_ids[] = { {"NXP0015",}, { } }; MODULE_DEVICE_TABLE(acpi, rcpm_acpi_ids); #endif static struct platform_driver rcpm_driver = { .driver = { .name = "rcpm", .of_match_table = rcpm_of_match, .acpi_match_table = ACPI_PTR(rcpm_acpi_ids), .pm = &rcpm_pm_ops, }, .probe = rcpm_probe, Loading Loading
drivers/soc/fsl/rcpm.c +22 −2 Original line number Diff line number Diff line Loading @@ -13,6 +13,7 @@ #include <linux/slab.h> #include <linux/suspend.h> #include <linux/kernel.h> #include <linux/acpi.h> #define RCPM_WAKEUP_CELL_MAX_SIZE 7 Loading Loading @@ -78,8 +79,18 @@ static int rcpm_pm_prepare(struct device *dev) "fsl,rcpm-wakeup", value, rcpm->wakeup_cells + 1); /* Wakeup source should refer to current rcpm device */ if (ret || (np->phandle != value[0])) if (ret) continue; /* * For DT mode, would handle devices with "fsl,rcpm-wakeup" * pointing to the current RCPM node. * * For ACPI mode, currently we assume there is only one * RCPM controller existing. */ if (is_of_node(dev->fwnode)) if (np->phandle != value[0]) continue; /* Property "#fsl,rcpm-wakeup-cells" of rcpm node defines the Loading Loading @@ -172,10 +183,19 @@ static const struct of_device_id rcpm_of_match[] = { }; MODULE_DEVICE_TABLE(of, rcpm_of_match); #ifdef CONFIG_ACPI static const struct acpi_device_id rcpm_acpi_ids[] = { {"NXP0015",}, { } }; MODULE_DEVICE_TABLE(acpi, rcpm_acpi_ids); #endif static struct platform_driver rcpm_driver = { .driver = { .name = "rcpm", .of_match_table = rcpm_of_match, .acpi_match_table = ACPI_PTR(rcpm_acpi_ids), .pm = &rcpm_pm_ops, }, .probe = rcpm_probe, Loading