aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/ksz_common.c
diff options
context:
space:
mode:
authorOleksij Rempel <[email protected]>2023-10-23 09:33:37 +0000
committerDavid S. Miller <[email protected]>2023-10-25 07:47:33 +0000
commitaed7425d65108bc6e7cb2f64a11aa35b9f5e4397 (patch)
tree6f57bdbb351e5d18d9f871815225d04a7aaa53af /drivers/net/dsa/microchip/ksz_common.c
parentdt-bindings: net: dsa: microchip: add wakeup-source property (diff)
downloadkernel-aed7425d65108bc6e7cb2f64a11aa35b9f5e4397.tar.gz
kernel-aed7425d65108bc6e7cb2f64a11aa35b9f5e4397.zip
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 <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
-rw-r--r--drivers/net/dsa/microchip/ksz_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index e3f797cab836..71c860e0d3af 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -4159,6 +4159,9 @@ int ksz_switch_register(struct ksz_device *dev)
dev_err(dev->dev, "inconsistent synclko settings\n");
return -EINVAL;
}
+
+ dev->wakeup_source = of_property_read_bool(dev->dev->of_node,
+ "wakeup-source");
}
ret = dsa_register_switch(dev->ds);