summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguibing <guibing@google.com>2023-05-31 00:43:07 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-05-31 00:43:07 +0000
commit3b641ba386c30e8bf939b5455d1a0d9e23aefcc4 (patch)
treea6c811682439bca352b0dfa5af27bf47cda158dc
parente5172d68a96873e0e7c247483628f21508987d0f (diff)
parentc3bf8b435f0f4fe3b05c6ce2f018dcc080e2cf98 (diff)
downloadinterfaces-3b641ba386c30e8bf939b5455d1a0d9e23aefcc4.tar.gz
Add pixel thermal extension service interface. am: c38f53a913 am: c3bf8b435f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/interfaces/+/23249306 Change-Id: I001b464a05f155ff9e7a0527eb3e815de598191b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--thermal/Android.bp24
-rw-r--r--thermal/aidl_api/pixel-thermal-ext/current/google/hardware/thermal/extension/pixel/IThermalExt.aidl40
-rw-r--r--thermal/google/hardware/thermal/extension/pixel/IThermalExt.aidl41
3 files changed, 105 insertions, 0 deletions
diff --git a/thermal/Android.bp b/thermal/Android.bp
new file mode 100644
index 0000000..d646d46
--- /dev/null
+++ b/thermal/Android.bp
@@ -0,0 +1,24 @@
+package {
+ // See: http://go/android-license-faq
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aidl_interface {
+ name: "pixel-thermal-ext",
+ owner: "google",
+ vendor_available: true,
+ srcs: [
+ "google/hardware/thermal/extension/pixel/IThermalExt.aidl",
+ ],
+
+ stability: "vintf",
+
+ backend: {
+ cpp: {
+ enabled: true,
+ },
+ java: {
+ platform_apis: true,
+ },
+ },
+}
diff --git a/thermal/aidl_api/pixel-thermal-ext/current/google/hardware/thermal/extension/pixel/IThermalExt.aidl b/thermal/aidl_api/pixel-thermal-ext/current/google/hardware/thermal/extension/pixel/IThermalExt.aidl
new file mode 100644
index 0000000..6ba9d43
--- /dev/null
+++ b/thermal/aidl_api/pixel-thermal-ext/current/google/hardware/thermal/extension/pixel/IThermalExt.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2023 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file 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.thermal.extension.pixel;
+/* @hide */
+@VintfStability
+interface IThermalExt {
+ oneway void setThermalMode(in @utf8InCpp String mode, in boolean enabled);
+ boolean isThermalModeSupported(in @utf8InCpp String mode);
+}
diff --git a/thermal/google/hardware/thermal/extension/pixel/IThermalExt.aidl b/thermal/google/hardware/thermal/extension/pixel/IThermalExt.aidl
new file mode 100644
index 0000000..311d5d7
--- /dev/null
+++ b/thermal/google/hardware/thermal/extension/pixel/IThermalExt.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2023 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.thermal.extension.pixel;
+
+/* @hide */
+@VintfStability
+interface IThermalExt {
+ /**
+ * setThermalMode() is called to enable/disable a thermal mode. It will update
+ * the mode for multiple related temperature types together.
+ *
+ * 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 setThermalMode(in @utf8InCpp String mode, in boolean enabled);
+
+ /**
+ * isThermalModeSupported() checks whether a thermal mode 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 isThermalModeSupported(in @utf8InCpp String mode);
+}