net: dsa: microchip: use wakeup-source DT property to enable PME output
authorOleksij Rempel <o.rempel@pengutronix.de>
Mon, 23 Oct 2023 09:33:37 +0000 (11:33 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Oct 2023 07:47:33 +0000 (08:47 +0100)
commitaed7425d65108bc6e7cb2f64a11aa35b9f5e4397
tree6f57bdbb351e5d18d9f871815225d04a7aaa53af
parent4e1799ae84fc9e1af5c965ee4f20c5b0f7a8d566
net: dsa: microchip: use wakeup-source DT property to enable PME output

KSZ switches with WoL support signals wake event over PME pin. If this
pin is attached to some external PMIC or System Controller can't be
described as GPIO, the only way to describe it in the devicetree is to
use wakeup-source property. So, add support for this property and enable
PME switch output if this property is present.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h