diff mbox series

[2/2] ARM: at91: pm: use of_device_id array to find the proper shdwc node

Message ID 1576062248-18514-3-git-send-email-claudiu.beznea@microchip.com (mailing list archive)
State Mainlined
Commit ec6e618c8c018c1361d77789a100a5f6f6317178
Headers show
Series pm fixes for SAM9X60 | expand

Commit Message

Claudiu Beznea Dec. 11, 2019, 11:04 a.m. UTC
Use of_device_id array to find the proper shdwc compatibile node.
SAM9X60's shdwc changes were not integrated when
commit eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60")
was integrated.

Fixes: eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60")
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
---
 arch/arm/mach-at91/pm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Alexandre Belloni Dec. 25, 2019, 5:25 p.m. UTC | #1
On 11/12/2019 13:04:08+0200, Claudiu Beznea wrote:
> Use of_device_id array to find the proper shdwc compatibile node.
> SAM9X60's shdwc changes were not integrated when
> commit eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60")
> was integrated.
> 
> Fixes: eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60")
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> ---
>  arch/arm/mach-at91/pm.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
Applied, thanks.
diff mbox series

Patch

diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 457301709e54..ce907672438b 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -695,6 +695,12 @@  static void __init at91_pm_use_default_mode(int pm_mode)
 		soc_pm.data.suspend_mode = AT91_PM_ULP0;
 }
 
+static const struct of_device_id atmel_shdwc_ids[] = {
+	{ .compatible = "atmel,sama5d2-shdwc" },
+	{ .compatible = "microchip,sam9x60-shdwc" },
+	{ /* sentinel. */ }
+};
+
 static void __init at91_pm_modes_init(void)
 {
 	struct device_node *np;
@@ -704,7 +710,7 @@  static void __init at91_pm_modes_init(void)
 	    !at91_is_pm_mode_active(AT91_PM_ULP1))
 		return;
 
-	np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-shdwc");
+	np = of_find_matching_node(NULL, atmel_shdwc_ids);
 	if (!np) {
 		pr_warn("%s: failed to find shdwc!\n", __func__);
 		goto ulp1_default;