summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--power/Android.bp16
-rw-r--r--power/aidl_api/pixel-power-ext/1/.hash1
-rw-r--r--power/aidl_api/pixel-power-ext/1/google/hardware/power/extension/pixel/IPowerExt.aidl25
-rw-r--r--power/aidl_api/pixel-power-ext/current/google/hardware/power/extension/pixel/IPowerExt.aidl25
-rw-r--r--power/google/hardware/power/extension/pixel/IPowerExt.aidl69
5 files changed, 136 insertions, 0 deletions
diff --git a/power/Android.bp b/power/Android.bp
new file mode 100644
index 0000000..5beaf51
--- /dev/null
+++ b/power/Android.bp
@@ -0,0 +1,16 @@
+aidl_interface {
+ name: "pixel-power-ext",
+ vendor_available: true,
+ srcs: [
+ "google/hardware/power/extension/pixel/IPowerExt.aidl",
+ ],
+
+ stability: "vintf",
+
+ backend: {
+ java: {
+ platform_apis: true,
+ },
+ },
+ versions: ["1"],
+}
diff --git a/power/aidl_api/pixel-power-ext/1/.hash b/power/aidl_api/pixel-power-ext/1/.hash
new file mode 100644
index 0000000..86ce27d
--- /dev/null
+++ b/power/aidl_api/pixel-power-ext/1/.hash
@@ -0,0 +1 @@
+3ce8c3ba6e332074ed51fa88088ac4af5d6c08a5
diff --git a/power/aidl_api/pixel-power-ext/1/google/hardware/power/extension/pixel/IPowerExt.aidl b/power/aidl_api/pixel-power-ext/1/google/hardware/power/extension/pixel/IPowerExt.aidl
new file mode 100644
index 0000000..cc9a7cb
--- /dev/null
+++ b/power/aidl_api/pixel-power-ext/1/google/hardware/power/extension/pixel/IPowerExt.aidl
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package google.hardware.power.extension.pixel;
+@VintfStability
+interface IPowerExt {
+ oneway void setMode(in @utf8InCpp String mode, in boolean enabled);
+ boolean isModeSupported(in @utf8InCpp String mode);
+ oneway void setBoost(in @utf8InCpp String boost, in int durationMs);
+ boolean isBoostSupported(in @utf8InCpp String boost);
+}
diff --git a/power/aidl_api/pixel-power-ext/current/google/hardware/power/extension/pixel/IPowerExt.aidl b/power/aidl_api/pixel-power-ext/current/google/hardware/power/extension/pixel/IPowerExt.aidl
new file mode 100644
index 0000000..cc9a7cb
--- /dev/null
+++ b/power/aidl_api/pixel-power-ext/current/google/hardware/power/extension/pixel/IPowerExt.aidl
@@ -0,0 +1,25 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
+// edit this file. It looks like you are doing that because you have modified
+// an AIDL interface in a backward-incompatible way, e.g., deleting a function
+// from an interface or a field from a parcelable and it broke the build. That
+// breakage is intended.
+//
+// You must not make a backward incompatible changes to the AIDL files built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package google.hardware.power.extension.pixel;
+@VintfStability
+interface IPowerExt {
+ oneway void setMode(in @utf8InCpp String mode, in boolean enabled);
+ boolean isModeSupported(in @utf8InCpp String mode);
+ oneway void setBoost(in @utf8InCpp String boost, in int durationMs);
+ boolean isBoostSupported(in @utf8InCpp String boost);
+}
diff --git a/power/google/hardware/power/extension/pixel/IPowerExt.aidl b/power/google/hardware/power/extension/pixel/IPowerExt.aidl
new file mode 100644
index 0000000..46b07da
--- /dev/null
+++ b/power/google/hardware/power/extension/pixel/IPowerExt.aidl
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package google.hardware.power.extension.pixel;
+
+@VintfStability
+interface IPowerExt {
+ /**
+ * setMode() is called to enable/disable specific hint mode, which
+ * may result in adjustment of power/performance parameters of the
+ * cpufreq governor and other controls on device side.
+ *
+ * A particular platform may choose to ignore any mode hint.
+ *
+ * @param mode which is to be enable/disable.
+ * @param enabled true to enable, false to disable the mode.
+ */
+ oneway void setMode(in @utf8InCpp String mode, in boolean enabled);
+
+ /**
+ * isModeSupported() is called to query if the given mode hint is
+ * supported by vendor.
+ *
+ * @return true if the hint passed is supported on this platform.
+ * If false, setting the mode will have no effect.
+ * @param mode to be queried
+ */
+ boolean isModeSupported(in @utf8InCpp String mode);
+
+ /**
+ * setBoost() indicates the device may need to boost some resources, as the
+ * the load is likely to increase before the kernel governors can react.
+ * Depending on the boost, it may be appropriate to raise the frequencies of
+ * CPU, GPU, memory subsystem, or stop CPU from going into deep sleep state.
+ * A particular platform may choose to ignore this hint.
+ *
+ * @param boost which is to be set with a timeout.
+ * @param durationMs The expected duration of the user's interaction, if
+ * known, or 0 if the expected duration is unknown.
+ * a negative value indicates canceling previous boost.
+ * A given platform can choose to boost some time based on durationMs,
+ * and may also pick an appropriate timeout for 0 case.
+ */
+ oneway void setBoost(in @utf8InCpp String boost, in int durationMs);
+
+ /**
+ * isBoostSupported() is called to query if the given boost hint is
+ * supported by vendor. When returns false, set the boost will have
+ * no effect on the platform.
+ *
+ * @return true if the hint passed is supported on this platform.
+ * If false, setting the boost will have no effect.
+ * @param boost to be queried
+ */
+ boolean isBoostSupported(in @utf8InCpp String boost);
+}