diff --git a/BoardConfig.mk b/BoardConfig.mk index 7f7bf15..a4dddc3 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -95,6 +95,9 @@ TARGET_COPY_OUT_VENDOR := vendor # Platform TARGET_BOARD_PLATFORM := sm6150 +# Power +TARGET_POWER_SET_FEATURE_LIB := libpower_feature.davinci + # QCOM BOARD_USES_QCOM_HARDWARE := true diff --git a/power/Android.mk b/power/Android.mk new file mode 100644 index 0000000..f581ccd --- /dev/null +++ b/power/Android.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 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. +# + +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := power-feature.c +LOCAL_SHARED_LIBRARIES := liblog libcutils + +LOCAL_MODULE := libpower_feature.davinci +LOCAL_MODULE_TAGS := optional +LOCAL_VENDOR_MODULE := true + +include $(BUILD_STATIC_LIBRARY) diff --git a/power/power-feature.c b/power/power-feature.c new file mode 100644 index 0000000..a9c8878 --- /dev/null +++ b/power/power-feature.c @@ -0,0 +1,23 @@ +/* + * Copyright (C) 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. + */ + +#include "power-feature.h" + +#include + +void set_device_specific_feature(feature_t feature, int state) { + // stub +} diff --git a/power/power-feature.h b/power/power-feature.h new file mode 100644 index 0000000..1d9e7db --- /dev/null +++ b/power/power-feature.h @@ -0,0 +1,17 @@ +/* + * Copyright (C) 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. + */ + +#define LOG_TAG "libpower_feature.davinci"