1<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="592px" preserveAspectRatio="none" style="width:757px;height:592px;background:#FFFFFF;" version="1.1" viewBox="0 0 757 592" width="757px" zoomAndPan="magnify"><defs/><g><rect fill="#FFFFFF" height="368.5969" style="stroke:#000000;stroke-width:1.0;" width="10" x="199.5" y="67.8969"/><rect fill="#FFFFFF" height="14" style="stroke:#000000;stroke-width:1.0;" width="10" x="204.5" y="193.3625"/><rect fill="#FFFFFF" height="14" style="stroke:#000000;stroke-width:1.0;" width="10" x="199.5" y="518.2266"/><rect fill="#FFFFFF" height="130.8656" style="stroke:#000000;stroke-width:1.0;" width="10" x="484.5" y="97.4969"/><rect fill="#FFFFFF" height="129.3984" style="stroke:#000000;stroke-width:1.0;" width="10" x="484.5" y="293.0954"/><rect fill="#FFFFFF" height="60.7328" style="stroke:#000000;stroke-width:1.0;" width="415.5" x="153" y="154.6297"/><rect fill="#FFFFFF" height="59.2656" style="stroke:#000000;stroke-width:1.0;" width="219" x="410.5" y="350.2282"/><rect fill="#FFFFFF" height="88.7328" style="stroke:#000000;stroke-width:1.0;" width="598.5" x="153" y="451.4938"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="68" x2="68" y1="36.2969" y2="468.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="68" x2="68" y1="468.6266" y2="496.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="68" x2="68" y1="496.6266" y2="557.2266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="204" x2="204" y1="36.2969" y2="468.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="204" x2="204" y1="468.6266" y2="496.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="204" x2="204" y1="496.6266" y2="557.2266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="489.5" x2="489.5" y1="36.2969" y2="468.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="489.5" x2="489.5" y1="468.6266" y2="496.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="489.5" x2="489.5" y1="496.6266" y2="557.2266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="654.5" x2="654.5" y1="36.2969" y2="468.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:1.0,4.0;" x1="654.5" x2="654.5" y1="468.6266" y2="496.6266"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="654.5" x2="654.5" y1="496.6266" y2="557.2266"/><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="97" x="20" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="83" x="27" y="24.9951">Application</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="97" x="20" y="556.2266"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="83" x="27" y="576.2217">Application</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="63" x="173" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="49" x="180" y="24.9951">Device</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="63" x="173" y="556.2266"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="49" x="180" y="576.2217">Device</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="118" x="430.5" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="104" x="437.5" y="24.9951">PM Subsystem</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="118" x="430.5" y="556.2266"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="104" x="437.5" y="576.2217">PM Subsystem</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="153" x="578.5" y="5"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="139" x="585.5" y="24.9951">System Workqueue</text><rect fill="#FFFFFF" height="30.2969" style="stroke:#000000;stroke-width:1.0;" width="153" x="578.5" y="556.2266"/><text fill="#000000" font-family="Verdana" font-size="14" lengthAdjust="spacing" textLength="139" x="585.5" y="576.2217">System Workqueue</text><rect fill="#FFFFFF" height="368.5969" style="stroke:#000000;stroke-width:1.0;" width="10" x="199.5" y="67.8969"/><rect fill="#FFFFFF" height="14" style="stroke:#000000;stroke-width:1.0;" width="10" x="204.5" y="193.3625"/><rect fill="#FFFFFF" height="14" style="stroke:#000000;stroke-width:1.0;" width="10" x="199.5" y="518.2266"/><rect fill="#FFFFFF" height="130.8656" style="stroke:#000000;stroke-width:1.0;" width="10" x="484.5" y="97.4969"/><rect fill="#FFFFFF" height="129.3984" style="stroke:#000000;stroke-width:1.0;" width="10" x="484.5" y="293.0954"/><polygon fill="#000000" points="187.5,63.8969,197.5,67.8969,187.5,71.8969,191.5,67.8969" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="68.5" x2="193.5" y1="67.8969" y2="67.8969"/><text fill="#000000" font-family="Courier" font-size="13" lengthAdjust="spacing" textLength="112" x="75.5" y="62.3349">operation(dev)</text><polygon fill="#000000" points="472.5,93.4969,482.5,97.4969,472.5,101.4969,476.5,97.4969" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="209.5" x2="478.5" y1="97.4969" y2="97.4969"/><text fill="#000000" font-family="Courier" font-size="13" lengthAdjust="spacing" textLength="208" x="216.5" y="91.9349">pm_device_runtime_get(dev)</text><line style="stroke:#000000;stroke-width:1.0;" x1="494.5" x2="536.5" y1="126.6297" y2="126.6297"/><line style="stroke:#000000;stroke-width:1.0;" x1="536.5" x2="536.5" y1="126.6297" y2="139.6297"/><line style="stroke:#000000;stroke-width:1.0;" x1="495.5" x2="536.5" y1="139.6297" y2="139.6297"/><polygon fill="#000000" points="505.5,135.6297,495.5,139.6297,505.5,143.6297,501.5,139.6297" style="stroke:#000000;stroke-width:1.0;"/><text fill="#000000" font-family="Verdana" font-size="13" lengthAdjust="spacing" textLength="97" x="501.5" y="121.5638">Increase usage</text><path d="M153,154.6297 L219,154.6297 L219,161.6297 L209,171.6297 L153,171.6297 L153,154.6297 " fill="#FFFFFF" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="60.7328" style="stroke:#000000;stroke-width:1.0;" width="415.5" x="153" y="154.6297"/><text fill="#000000" font-family="Verdana" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="21" x="168" y="167.6966">alt</text><text fill="#000000" font-family="Verdana" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="83" x="234" y="166.8402">[usage == 1]</text><polygon fill="#000000" points="225.5,189.3625,215.5,193.3625,225.5,197.3625,221.5,193.3625" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="219.5" x2="483.5" y1="193.3625" y2="193.3625"/><text fill="#000000" font-family="Courier" font-size="13" lengthAdjust="spacing" textLength="184" x="231.5" y="187.8005">PM_DEVICE_ACTION_RESUME</text><polygon fill="#000000" points="472.5,203.3625,482.5,207.3625,472.5,211.3625,476.5,207.3625" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="209.5" x2="478.5" y1="207.3625" y2="207.3625"/><polygon fill="#000000" points="220.5,224.3625,210.5,228.3625,220.5,232.3625,216.5,228.3625" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="214.5" x2="488.5" y1="228.3625" y2="228.3625"/><path d="M162,241.3625 L162,266.3625 L246,266.3625 L246,251.3625 L236,241.3625 L162,241.3625 " fill="#FFFFFF" style="stroke:#000000;stroke-width:1.0;"/><path d="M236,241.3625 L236,251.3625 L246,251.3625 L236,241.3625 " fill="#FFFFFF" style="stroke:#000000;stroke-width:1.0;"/><text fill="#000000" font-family="Verdana" font-size="13" lengthAdjust="spacing" textLength="63" x="168" y="258.4294">Operation</text><polygon fill="#000000" points="472.5,289.0954,482.5,293.0954,472.5,297.0954,476.5,293.0954" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="209.5" x2="478.5" y1="293.0954" y2="293.0954"/><text fill="#000000" font-family="Courier" font-size="13" lengthAdjust="spacing" textLength="256" x="216.5" y="287.5334">pm_device_runtime_put_async(dev)</text><line style="stroke:#000000;stroke-width:1.0;" x1="494.5" x2="536.5" y1="322.2282" y2="322.2282"/><line style="stroke:#000000;stroke-width:1.0;" x1="536.5" x2="536.5" y1="322.2282" y2="335.2282"/><line style="stroke:#000000;stroke-width:1.0;" x1="495.5" x2="536.5" y1="335.2282" y2="335.2282"/><polygon fill="#000000" points="505.5,331.2282,495.5,335.2282,505.5,339.2282,501.5,335.2282" style="stroke:#000000;stroke-width:1.0;"/><text fill="#000000" font-family="Verdana" font-size="13" lengthAdjust="spacing" textLength="104" x="501.5" y="317.1623">Decrease usage</text><path d="M410.5,350.2282 L476.5,350.2282 L476.5,357.2282 L466.5,367.2282 L410.5,367.2282 L410.5,350.2282 " fill="#FFFFFF" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="59.2656" style="stroke:#000000;stroke-width:1.0;" width="219" x="410.5" y="350.2282"/><text fill="#000000" font-family="Verdana" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="21" x="425.5" y="363.2951">alt</text><text fill="#000000" font-family="Verdana" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="84" x="491.5" y="362.4386">[usage == 0]</text><line style="stroke:#000000;stroke-width:1.0;" x1="494.5" x2="536.5" y1="388.4938" y2="388.4938"/><line style="stroke:#000000;stroke-width:1.0;" x1="536.5" x2="536.5" y1="388.4938" y2="401.4938"/><line style="stroke:#000000;stroke-width:1.0;" x1="495.5" x2="536.5" y1="401.4938" y2="401.4938"/><polygon fill="#000000" points="505.5,397.4938,495.5,401.4938,505.5,405.4938,501.5,401.4938" style="stroke:#000000;stroke-width:1.0;"/><text fill="#000000" font-family="Verdana" font-size="13" lengthAdjust="spacing" textLength="116" x="501.5" y="383.4279">Schedule suspend</text><polygon fill="#000000" points="220.5,418.4938,210.5,422.4938,220.5,426.4938,216.5,422.4938" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="214.5" x2="488.5" y1="422.4938" y2="422.4938"/><polygon fill="#000000" points="79.5,432.4938,69.5,436.4938,79.5,440.4938,75.5,436.4938" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="73.5" x2="203.5" y1="436.4938" y2="436.4938"/><path d="M153,451.4938 L219,451.4938 L219,458.4938 L209,468.4938 L153,468.4938 L153,451.4938 " fill="#FFFFFF" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="88.7328" style="stroke:#000000;stroke-width:1.0;" width="598.5" x="153" y="451.4938"/><text fill="#000000" font-family="Verdana" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="21" x="168" y="464.5607">alt</text><text fill="#000000" font-family="Verdana" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="135" x="234" y="463.7043">[Scheduled suspend]</text><polygon fill="#000000" points="220.5,514.2266,210.5,518.2266,220.5,522.2266,216.5,518.2266" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;" x1="214.5" x2="654" y1="518.2266" y2="518.2266"/><text fill="#000000" font-family="Courier" font-size="13" lengthAdjust="spacing" textLength="192" x="226.5" y="512.6646">PM_DEVICE_ACTION_SUSPEND</text><polygon fill="#000000" points="643,528.2266,653,532.2266,643,536.2266,647,532.2266" style="stroke:#000000;stroke-width:1.0;"/><line style="stroke:#000000;stroke-width:1.0;stroke-dasharray:2.0,2.0;" x1="204.5" x2="649" y1="532.2266" y2="532.2266"/><!--MD5=[99ad3c73ad633139f6715d34c87522f0] 2@startuml 3!theme plain 4 5participant "Application" as APP 6participant "Device" as DEV 7participant "PM Subsystem" as PM 8participant "System Workqueue" as WQ 9 10APP -> DEV ++: ""operation(dev)"" 11DEV -> PM ++: ""pm_device_runtime_get(dev)"" 12PM -> PM: Increase usage 13alt usage == 1 14 PM -> DEV ++: ""PM_DEVICE_ACTION_RESUME"" 15 return 16end 17return 18 19note over DEV: Operation 20 21DEV -> PM ++: ""pm_device_runtime_put_async(dev)"" 22PM -> PM: Decrease usage 23alt usage == 0 24 PM -> PM: Schedule suspend 25end 26return 27 28return 29 30alt Scheduled suspend 31... 32WQ -> DEV ++: ""PM_DEVICE_ACTION_SUSPEND"" 33return 34end 35@enduml 36 37@startuml 38 39 40 41 42 43 44 45<style> 46 root { 47 BackgroundColor white 48 FontColor black 49 FontName Verdana 50 HyperLinkColor blue 51 LineColor black 52 LineThickness 1 53 Margin 5 54 } 55 caption { 56 LineThickness 0 57 } 58 footer { 59 LineThickness 0 60 } 61 header { 62 LineThickness 0 63 } 64 node { 65 MaximumWidth 300 66 } 67 title { 68 FontSize 22 69 LineThickness 0 70 } 71</style> 72 73skinparam ArrowLollipopColor black 74skinparam BackgroundColor white 75skinparam DefaultFontName Verdana 76skinparam DefaultMonospacedFontName Courier 77skinparam LifelineStrategy nosolid 78skinparam ParticipantPadding 10 79skinparam SequenceLifeLineBorderColor black 80skinparam Shadowing false 81skinparam UseBetaStyle true 82 83skinparam Activity { 84 BackgroundColor white 85 BarColor black 86 BorderColor black 87 FontColor black 88 FontName Verdana 89} 90skinparam Boundary { 91 FontColor black 92} 93skinparam Box { 94 Padding 5 95} 96skinparam CircledCharacter { 97 FontColor black 98 FontName Courier 99 Radius 9 100} 101skinparam Class { 102 BackgroundColor white 103 BorderColor black 104 FontColor black 105 FontName Verdana 106} 107skinparam ClassAttribute { 108 FontColor black 109 FontName Verdana 110} 111skinparam ClassStereotype { 112 FontColor black 113 FontName Verdana 114} 115skinparam Footer { 116 FontColor black 117 FontName Verdana 118} 119skinparam Header { 120 FontColor black 121 FontName Verdana 122} 123skinparam Hyperlink { 124 Color blue 125} 126skinparam IconPackage { 127 Color black 128 BackgroundColor white 129} 130skinparam IconPrivate { 131 Color black 132 BackgroundColor white 133} 134skinparam IconProtected { 135 Color black 136 BackgroundColor white 137} 138skinparam IconPublic { 139 Color black 140 BackgroundColor white 141} 142skinparam Note { 143 FontColor black 144 FontName Verdana 145} 146skinparam Object { 147 BorderColor black 148} 149skinparam Package { 150 BorderColor black 151 FontColor black 152 FontName Verdana 153} 154skinparam State { 155 BackgroundColor white 156 BorderColor black 157} 158skinparam StereotypeA { 159 BackgroundColor white 160 BorderColor black 161} 162skinparam StereotypeC { 163 BackgroundColor white 164 BorderColor black 165} 166skinparam StereotypeE { 167 BackgroundColor white 168 BorderColor black 169} 170skinparam StereotypeI { 171 BackgroundColor white 172 BorderColor black 173} 174skinparam StereotypeN { 175 BackgroundColor white 176 BorderColor black 177} 178skinparam UseCaseStereoType { 179 FontColor black 180 FontName Verdana 181} 182 183participant "Application" as APP 184participant "Device" as DEV 185participant "PM Subsystem" as PM 186participant "System Workqueue" as WQ 187 188APP -> DEV ++: ""operation(dev)"" 189DEV -> PM ++: ""pm_device_runtime_get(dev)"" 190PM -> PM: Increase usage 191alt usage == 1 192 PM -> DEV ++: ""PM_DEVICE_ACTION_RESUME"" 193 return 194end 195return 196 197note over DEV: Operation 198 199DEV -> PM ++: ""pm_device_runtime_put_async(dev)"" 200PM -> PM: Decrease usage 201alt usage == 0 202 PM -> PM: Schedule suspend 203end 204return 205 206return 207 208alt Scheduled suspend 209... 210WQ -> DEV ++: ""PM_DEVICE_ACTION_SUSPEND"" 211return 212end 213@enduml 214 215PlantUML version 1.2021.14beta6(Unknown compile time) 216(GPL source distribution) 217Java Runtime: Java(TM) SE Runtime Environment 218JVM: Java HotSpot(TM) 64-Bit Server VM 219Default Encoding: UTF-8 220Language: en 221Country: US 222--></g></svg>