blob: 8fe1f6e18239c81fbe89eef1ba4ca67548ae3719 [file] [log] [blame]
<?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]
@startuml
!theme plain
participant "Application" as APP
participant "Device" as DEV
participant "PM Subsystem" as PM
participant "System Workqueue" as WQ
APP -> DEV ++: ""operation(dev)""
DEV -> PM ++: ""pm_device_runtime_get(dev)""
PM -> PM: Increase usage
alt usage == 1
PM -> DEV ++: ""PM_DEVICE_ACTION_RESUME""
return
end
return
note over DEV: Operation
DEV -> PM ++: ""pm_device_runtime_put_async(dev)""
PM -> PM: Decrease usage
alt usage == 0
PM -> PM: Schedule suspend
end
return
return
alt Scheduled suspend
...
WQ -> DEV ++: ""PM_DEVICE_ACTION_SUSPEND""
return
end
@enduml
@startuml
<style>
root {
BackgroundColor white
FontColor black
FontName Verdana
HyperLinkColor blue
LineColor black
LineThickness 1
Margin 5
}
caption {
LineThickness 0
}
footer {
LineThickness 0
}
header {
LineThickness 0
}
node {
MaximumWidth 300
}
title {
FontSize 22
LineThickness 0
}
</style>
skinparam ArrowLollipopColor black
skinparam BackgroundColor white
skinparam DefaultFontName Verdana
skinparam DefaultMonospacedFontName Courier
skinparam LifelineStrategy nosolid
skinparam ParticipantPadding 10
skinparam SequenceLifeLineBorderColor black
skinparam Shadowing false
skinparam UseBetaStyle true
skinparam Activity {
BackgroundColor white
BarColor black
BorderColor black
FontColor black
FontName Verdana
}
skinparam Boundary {
FontColor black
}
skinparam Box {
Padding 5
}
skinparam CircledCharacter {
FontColor black
FontName Courier
Radius 9
}
skinparam Class {
BackgroundColor white
BorderColor black
FontColor black
FontName Verdana
}
skinparam ClassAttribute {
FontColor black
FontName Verdana
}
skinparam ClassStereotype {
FontColor black
FontName Verdana
}
skinparam Footer {
FontColor black
FontName Verdana
}
skinparam Header {
FontColor black
FontName Verdana
}
skinparam Hyperlink {
Color blue
}
skinparam IconPackage {
Color black
BackgroundColor white
}
skinparam IconPrivate {
Color black
BackgroundColor white
}
skinparam IconProtected {
Color black
BackgroundColor white
}
skinparam IconPublic {
Color black
BackgroundColor white
}
skinparam Note {
FontColor black
FontName Verdana
}
skinparam Object {
BorderColor black
}
skinparam Package {
BorderColor black
FontColor black
FontName Verdana
}
skinparam State {
BackgroundColor white
BorderColor black
}
skinparam StereotypeA {
BackgroundColor white
BorderColor black
}
skinparam StereotypeC {
BackgroundColor white
BorderColor black
}
skinparam StereotypeE {
BackgroundColor white
BorderColor black
}
skinparam StereotypeI {
BackgroundColor white
BorderColor black
}
skinparam StereotypeN {
BackgroundColor white
BorderColor black
}
skinparam UseCaseStereoType {
FontColor black
FontName Verdana
}
participant "Application" as APP
participant "Device" as DEV
participant "PM Subsystem" as PM
participant "System Workqueue" as WQ
APP -> DEV ++: ""operation(dev)""
DEV -> PM ++: ""pm_device_runtime_get(dev)""
PM -> PM: Increase usage
alt usage == 1
PM -> DEV ++: ""PM_DEVICE_ACTION_RESUME""
return
end
return
note over DEV: Operation
DEV -> PM ++: ""pm_device_runtime_put_async(dev)""
PM -> PM: Decrease usage
alt usage == 0
PM -> PM: Schedule suspend
end
return
return
alt Scheduled suspend
...
WQ -> DEV ++: ""PM_DEVICE_ACTION_SUSPEND""
return
end
@enduml
PlantUML version 1.2021.14beta6(Unknown compile time)
(GPL source distribution)
Java Runtime: Java(TM) SE Runtime Environment
JVM: Java HotSpot(TM) 64-Bit Server VM
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>