Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc4713cc authored by Maxim Pleshivenkov's avatar Maxim Pleshivenkov
Browse files

Add constants for hibernation to VHAL

Extended VHAL with constants for hibernation
(suspend to disk).

Bug: 188666978
Test: manual
Change-Id: I11469b5e4c18ff6fa8450276188eaaa4c6cfa61a
parent f92b7f90
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -36,4 +36,5 @@ package android.hardware.automotive.vehicle;
enum VehicleApPowerStateConfigFlag {
  ENABLE_DEEP_SLEEP_FLAG = 1,
  CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 2,
  ENABLE_HIBERNATION_FLAG = 3,
}
+2 −0
Original line number Diff line number Diff line
@@ -42,4 +42,6 @@ enum VehicleApPowerStateReport {
  ON = 6,
  SHUTDOWN_PREPARE = 7,
  SHUTDOWN_CANCELLED = 8,
  HIBERNATION_ENTRY = 9,
  HIBERNATION_EXIT = 10,
}
+2 −0
Original line number Diff line number Diff line
@@ -38,4 +38,6 @@ enum VehicleApPowerStateShutdownParam {
  CAN_SLEEP = 2,
  SHUTDOWN_ONLY = 3,
  SLEEP_IMMEDIATELY = 4,
  HIBERNATE_IMMEDIATELY = 5,
  CAN_HIBERNATE = 6,
}
+11 −2
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@ package android.hardware.automotive.vehicle;
@Backing(type="int")
enum VehicleApPowerStateConfigFlag {
    /**
     * AP can enter deep sleep state. If not set, AP will always shutdown from
     * VehicleApPowerState#SHUTDOWN_PREPARE power state.
     * AP can enter deep sleep state. If not set, AP will shutdown from
     * VehicleApPowerState#SHUTDOWN_PREPARE power state when deep sleep is requested
     * (via VehicleApPowerStateShutdownParam#CAN_SLEEP or
     * VehicleApPowerStateShutdownParam#SLEEP_IMMEDIATELY flags)/
     */
    ENABLE_DEEP_SLEEP_FLAG = 0x1,
    /**
@@ -29,4 +31,11 @@ enum VehicleApPowerStateConfigFlag {
     * specified in VehicleApPowerSet VEHICLE_AP_POWER_SET_SHUTDOWN_READY message.
     */
    CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2,
    /**
     * AP can enter hibernation state. If not set, AP will shutdown from
     * VehicleApPowerState#SHUTDOWN_PREPARE when hibernation is requested
     * (via VehicleApPowerStateShutdownParam#CAN_HIBERNATE or
     *  VehicleApPowerStateShutdownParam#HIBERNATE_IMMEDIATELY flags)
     */
    ENABLE_HIBERNATION_FLAG = 0x3,
}
+18 −0
Original line number Diff line number Diff line
@@ -89,4 +89,22 @@ enum VehicleApPowerStateReport {
     * VehicleApPowerStateReq#SHUTDOWN_PREPARE. Other power state requests are ignored.
     */
    SHUTDOWN_CANCELLED = 0x8,
    /**
     * AP is ready to hibernate.
     * The AP will not send any more state reports after this.
     * After reporting this state, AP will accept VehicleApPowerStateReq#FINISHED.
     * Other power state requests are ignored.
     *
     * int32Values[1]: Time to turn AP back on, in seconds. Power controller should turn on
     *                 AP after the specified time has elapsed, so AP can run tasks like
     *                 update. If this value is 0, no wake up is requested. The power
     *                 controller may not necessarily support timed wake-up.
     */
    HIBERNATION_ENTRY = 0x9,
    /**
     * AP is exiting from hibernation state.
     * After reporting this state, AP will accept VehicleApPowerStateReq#ON or
     * VehicleApPowerStateReq#SHUTDOWN_PREPARE. Other power state requests are ignored.
     */
    HIBERNATION_EXIT = 0xA,
}
Loading