Skip to contentSkip to conversation

can: flexcan: add support for DT property 'wakeup-source'

PATCH In review Sean Nyekjaer 2 participants 5 messages Apr 9, 2019 – Aug 20, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 can: flexcan: add support for DT property 'wakeup-source'

The flexcan controller can be forced as a wakeup source by stating that explicitly in the device's .dts file using the "wakeup-source" boolean property.

---
 drivers/net/can/flexcan.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/can/flexcan.c +3 -0
index c46e6ce22701..df3d2abd98e4 100644
@@ -1373,6 +1373,9 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
 
 	device_set_wakeup_capable(&pdev->dev, true);
 
+	if (of_property_read_bool(np, "wakeup-source"))
+		device_set_wakeup_enable(&pdev->dev, true);
+
 	return 0;
 }
 
Signature · 1 line
2.21.0
#1 lore raw

PATCH 2/2 dt-bindings: can: flexcan: add can wakeup property

add wakeup-source boolean property.

---
 Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/net/can/fsl-flexcan.txt +2 -0
index bc77477c6878..17453be840d8 100644
@@ -32,6 +32,8 @@ Optional properties:
 		 ack_gpr is the gpr register offset of CAN stop acknowledge.
 		 ack_bit is the bit offset of CAN stop acknowledge.
 
+- wakeup-source: enable CAN remote wakeup
+
 Example:
 
 	can@1c000 {
Signature · 1 line
2.21.0
#3 lore raw

Re: [PATCH 2/2] dt-bindings: can: flexcan: add can wakeup property

Quoted 11 lines · Rob Herring
Quoted 7 lines · Sean Nyekjaer

add wakeup-source boolean property.

---
  Documentation/devicetree/bindings/net/can/fsl-flexcan.txt | 2 ++
  1 file changed, 2 insertions(+)

This doesn't seem to be applied. PATCH 1/2 in this series is applied.

In any case which repo does this patch belong to?

/Sean

#4 lore raw
In reply to Sean Nyekjaer

kind ping :-)

Quoted 24 lines · Sean Nyekjaer

The flexcan controller can be forced as a wakeup source by stating that explicitly in the device's .dts file using the "wakeup-source" boolean property.

---
  drivers/net/can/flexcan.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/net/can/flexcan.c +3 -0
index c46e6ce22701..df3d2abd98e4 100644
@@ -1373,6 +1373,9 @@ static int flexcan_setup_stop_mode(struct platform_device *pdev)
 
  	device_set_wakeup_capable(&pdev->dev, true);
 
+	if (of_property_read_bool(np, "wakeup-source"))
+		device_set_wakeup_enable(&pdev->dev, true);
+
  	return 0;
  }