common: Import Xiaomi HAL definitions

Change-Id: I8ba524bc678101af129a3d2845737f7b18f27514
This commit is contained in:
Pierre-Hugues Husson 2019-03-25 00:07:47 +01:00 committed by PIPIPIG233666
parent 913a3de1ef
commit e8d045dd0a
No known key found for this signature in database
GPG Key ID: 5DA814344B80B947
10 changed files with 169 additions and 0 deletions

4
interfaces/Android.bp Normal file
View File

@ -0,0 +1,4 @@
hidl_package_root {
name: "vendor.xiaomi",
path: "device/xiaomi/common/interfaces",
}

View File

@ -0,0 +1,13 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "vendor.xiaomi.hardware.displayfeature@1.0",
root: "vendor.xiaomi",
srcs: [
"IDisplayFeature.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
gen_java: true,
}

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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 vendor.xiaomi.hardware.displayfeature@1.0;
interface IDisplayFeature {
setFeature(uint32_t displayId, uint32_t mode, uint32_t value, uint32_t cookie);
};

View File

@ -0,0 +1,13 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "vendor.xiaomi.hardware.fingerprintextension@1.0",
root: "vendor.xiaomi",
srcs: [
"IXiaomiFingerprint.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
gen_java: true,
}

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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 vendor.xiaomi.hardware.fingerprintextension@1.0;
interface IXiaomiFingerprint {
extCmd(int32_t cmd, int32_t param) generates (int32_t result);
};

View File

@ -0,0 +1,18 @@
// This file is autogenerated by hidl-gen -Landroidbp.
hidl_interface {
name: "vendor.xiaomi.hardware.motor@1.0",
root: "vendor.xiaomi",
srcs: [
"types.hal",
"IMotor.hal",
"IMotorCallback.hal",
],
interfaces: [
"android.hidl.base@1.0",
],
types: [
"MotorEvent",
],
gen_java: true,
}

View File

@ -0,0 +1,30 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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 vendor.xiaomi.hardware.motor@1.0;
import vendor.xiaomi.hardware.motor@1.0::IMotorCallback;
interface IMotor {
popupMotor(int32_t cookie);
takebackMotor(int32_t cookie);
setMotorCallback(IMotorCallback motorcallback);
init();
release();
getMotorStatus() generates (int32_t result);
calibration();
takebackMotorShortly();
};

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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 vendor.xiaomi.hardware.motor@1.0;
interface IMotorCallback {
oneway onNotify(MotorEvent event);
};

View File

@ -0,0 +1,22 @@
/*
* Copyright (C) 2019-2020 The LineageOS 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 vendor.xiaomi.hardware.motor@1.0;
struct MotorEvent {
int32_t vaalue;
int32_t cookie;
};

View File

@ -0,0 +1,6 @@
#!/bin/bash
source $ANDROID_BUILD_TOP/system/tools/hidl/update-makefiles-helper.sh
do_makefiles_update \
"vendor.xiaomi:device/xiaomi/common/interfaces"