]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
serial: 8250: omap: Parse DT wakeup-source proerty
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Wed, 7 Aug 2024 14:12:27 +0000 (16:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Aug 2024 06:22:49 +0000 (08:22 +0200)
If the wakeup-source property is present, enable wakeup from this
device.

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20240807141227.1093006-6-msp@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_omap.c

index 7a6dfd40af9ef626ce767829720b931d11b25c19..ccb83c05be20c3a1f29a94894bcee87b1b214e99 100644 (file)
@@ -1530,6 +1530,9 @@ static int omap8250_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, priv);
 
        device_set_wakeup_capable(&pdev->dev, true);
+       if (of_property_read_bool(np, "wakeup-source"))
+               device_set_wakeup_enable(&pdev->dev, true);
+
        pm_runtime_enable(&pdev->dev);
        pm_runtime_use_autosuspend(&pdev->dev);