$(call soong_config_set,samsungVars,target_specific_header_path,$(DEVICE_PATH)/include)
Change-Id: Ibdfd255efafd471e59dfec0860ace40c21a6e27f
"hardware/google/interfaces",
],
}
+
+soong_config_module_type {
+ name: "samsung_header_path",
+ module_type: "cc_defaults",
+ config_namespace: "samsungVars",
+ value_variables: ["target_specific_header_path"],
+ properties: ["include_dirs"],
+}
+
+samsung_header_path {
+ name: "samsung_header_path_defaults",
+ soong_config_variables: {
+ target_specific_header_path: {
+ include_dirs: ["%s"],
+ },
+ },
+}
//
-// Copyright (C) 2021 The LineageOS Project
+// Copyright (C) 2021-2024 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
cc_binary {
name: "android.hardware.light-service.samsung",
+ defaults: ["samsung_header_path_defaults"],
relative_install_path: "hw",
init_rc: ["android.hardware.light-service.samsung.rc"],
vintf_fragments: ["android.hardware.light-service.samsung.xml"],
- local_include_dirs: ["include"],
srcs: [
"Lights.cpp",
"service.cpp",
#pragma once
#include <aidl/android/hardware/light/BnLights.h>
+#include <samsung_lights.h>
+
#include <unordered_map>
-#include "samsung_lights.h"
using ::aidl::android::hardware::light::HwLightState;
using ::aidl::android::hardware::light::HwLight;
+++ /dev/null
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * 2017-2022 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.
- */
-
-#pragma once
-
-/*
- * Board specific nodes
- *
- * If your kernel exposes these controls in another place, you can either
- * symlink to the locations given here, or override this header in your
- * device tree.
- */
-#define PANEL_BRIGHTNESS_NODE "/sys/class/backlight/panel/brightness"
-#define PANEL_MAX_BRIGHTNESS_NODE "/sys/class/backlight/panel/max_brightness"
-#define BUTTON_BRIGHTNESS_NODE "/sys/class/sec/sec_touchkey/brightness"
-#define LED_BLINK_NODE "/sys/class/sec/led/led_blink"
-#define LED_BLN_NODE "/sys/class/misc/backlightnotification/notification_led"
-
-// Uncomment to enable variable button brightness
-//#define VAR_BUTTON_BRIGHTNESS 1
-
-/*
- * Brightness adjustment factors
- *
- * If one of your device's LEDs is more powerful than the others, use these
- * values to equalise them. This value is in the range 0.0-1.0.
- */
-#define LED_ADJUSTMENT_R 1.0
-#define LED_ADJUSTMENT_G 1.0
-#define LED_ADJUSTMENT_B 1.0
-
-/*
- * Light brightness factors
- *
- * It might make sense for all colours to be scaled down (for example, if your
- * LED is too bright). Use these values to adjust the brightness of each
- * light. This value is within the range 0-255.
- */
-#define LED_BRIGHTNESS_BATTERY 255
-#define LED_BRIGHTNESS_NOTIFICATION 255
-#define LED_BRIGHTNESS_ATTENTION 255
--- /dev/null
+/*
+ * Copyright (C) 2016 The CyanogenMod Project
+ * 2017-2022 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.
+ */
+
+#pragma once
+
+/*
+ * Board specific nodes
+ *
+ * If your kernel exposes these controls in another place, you can either
+ * symlink to the locations given here, or override this header in your
+ * device tree.
+ */
+#define PANEL_BRIGHTNESS_NODE "/sys/class/backlight/panel/brightness"
+#define PANEL_MAX_BRIGHTNESS_NODE "/sys/class/backlight/panel/max_brightness"
+#define BUTTON_BRIGHTNESS_NODE "/sys/class/sec/sec_touchkey/brightness"
+#define LED_BLINK_NODE "/sys/class/sec/led/led_blink"
+#define LED_BLN_NODE "/sys/class/misc/backlightnotification/notification_led"
+
+// Uncomment to enable variable button brightness
+//#define VAR_BUTTON_BRIGHTNESS 1
+
+/*
+ * Brightness adjustment factors
+ *
+ * If one of your device's LEDs is more powerful than the others, use these
+ * values to equalise them. This value is in the range 0.0-1.0.
+ */
+#define LED_ADJUSTMENT_R 1.0
+#define LED_ADJUSTMENT_G 1.0
+#define LED_ADJUSTMENT_B 1.0
+
+/*
+ * Light brightness factors
+ *
+ * It might make sense for all colours to be scaled down (for example, if your
+ * LED is too bright). Use these values to adjust the brightness of each
+ * light. This value is within the range 0-255.
+ */
+#define LED_BRIGHTNESS_BATTERY 255
+#define LED_BRIGHTNESS_NOTIFICATION 255
+#define LED_BRIGHTNESS_ATTENTION 255
cc_binary {
name: "android.hardware.ir@1.0-service.samsung",
+ defaults: ["samsung_header_path_defaults"],
relative_install_path: "hw",
init_rc: ["android.hardware.ir@1.0-service.samsung.rc"],
- local_include_dirs: ["include"],
srcs: [
"ConsumerIr.cpp",
"service.cpp",
+++ /dev/null
-/*
- * Copyright (C) 2016 The CyanogenMod Project
- * 2020-2022 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.
- */
-
-#pragma once
-
-#include <android/hardware/ir/1.0/IConsumerIr.h>
-
-using android::hardware::ir::V1_0::ConsumerIrFreqRange;
-
-/*
- * Board specific nodes
- *
- * If your kernel exposes these controls in another place, you can either
- * symlink to the locations given here, or override this header in your
- * device tree.
- */
-#define IR_PATH "/sys/class/sec/sec_ir/ir_send"
-
-/*
- * Board specific configs
- *
- * If your device needs a different configuration, you
- * can override this header in your device tree
- */
-// Some devices need MS_IR_SIGNAL to avoid ms to pulses conversionn
-//#define MS_IR_SIGNAL
-
-static const std::vector<ConsumerIrFreqRange> consumerirFreqs = {
- {.min = 30000, .max = 30000},
- {.min = 33000, .max = 33000},
- {.min = 36000, .max = 36000},
- {.min = 38000, .max = 38000},
- {.min = 40000, .max = 40000},
- {.min = 56000, .max = 56000},
-};
--- /dev/null
+/*
+ * Copyright (C) 2016 The CyanogenMod Project
+ * 2020-2022 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.
+ */
+
+#pragma once
+
+#include <android/hardware/ir/1.0/IConsumerIr.h>
+
+using android::hardware::ir::V1_0::ConsumerIrFreqRange;
+
+/*
+ * Board specific nodes
+ *
+ * If your kernel exposes these controls in another place, you can either
+ * symlink to the locations given here, or override this header in your
+ * device tree.
+ */
+#define IR_PATH "/sys/class/sec/sec_ir/ir_send"
+
+/*
+ * Board specific configs
+ *
+ * If your device needs a different configuration, you
+ * can override this header in your device tree
+ */
+// Some devices need MS_IR_SIGNAL to avoid ms to pulses conversionn
+//#define MS_IR_SIGNAL
+
+static const std::vector<ConsumerIrFreqRange> consumerirFreqs = {
+ {.min = 30000, .max = 30000},
+ {.min = 33000, .max = 33000},
+ {.min = 36000, .max = 36000},
+ {.min = 38000, .max = 38000},
+ {.min = 40000, .max = 40000},
+ {.min = 56000, .max = 56000},
+};
cc_binary {
name: "vendor.lineage.fastcharge@1.0-service.samsung",
+ defaults: ["samsung_header_path_defaults"],
relative_install_path: "hw",
init_rc: ["vendor.lineage.fastcharge@1.0-service.samsung.rc"],
vintf_fragments: ["vendor.lineage.fastcharge@1.0-service.samsung.xml"],
- local_include_dirs: ["include"],
srcs: [
"FastCharge.cpp",
"service.cpp",
#include "FastCharge.h"
#include <android-base/logging.h>
#include <cutils/properties.h>
+#include <samsung_fastcharge.h>
#include <fstream>
#include <iostream>
-#include "samsung_fastcharge.h"
namespace vendor {
namespace lineage {
+++ /dev/null
-/*
- * Copyright (C) 2020-2022 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.
- */
-
-#pragma once
-
-#define FASTCHARGE_DEFAULT_SETTING true
-#define FASTCHARGE_PATH "/sys/class/sec/switch/afc_disable"
--- /dev/null
+/*
+ * Copyright (C) 2020-2022 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.
+ */
+
+#pragma once
+
+#define FASTCHARGE_DEFAULT_SETTING true
+#define FASTCHARGE_PATH "/sys/class/sec/switch/afc_disable"
cc_binary {
name: "vendor.lineage.powershare@1.0-service.samsung",
+ defaults: ["samsung_header_path_defaults"],
relative_install_path: "hw",
init_rc: ["vendor.lineage.powershare@1.0-service.samsung.rc"],
vintf_fragments: ["vendor.lineage.powershare@1.0-service.samsung.xml"],
- local_include_dirs: ["include"],
srcs: [
"PowerShare.cpp",
"service.cpp",
#include "PowerShare.h"
#include <android-base/logging.h>
+#include <samsung_powershare.h>
+
#include <fstream>
#include <iostream>
-#include "samsung_powershare.h"
namespace vendor {
namespace lineage {
+++ /dev/null
-/*
- * Copyright (C) 2020-2022 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.
- */
-
-#pragma once
-
-#define POWERSHARE_PATH "/sys/class/power_supply/battery/wc_tx_en"
-#define POWERSHARE_STOP_CAPACITY_PATH "/sys/class/power_supply/battery/wc_tx_stop_capacity"
--- /dev/null
+/*
+ * Copyright (C) 2020-2022 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.
+ */
+
+#pragma once
+
+#define POWERSHARE_PATH "/sys/class/power_supply/battery/wc_tx_en"
+#define POWERSHARE_STOP_CAPACITY_PATH "/sys/class/power_supply/battery/wc_tx_stop_capacity"
-// Copyright (C) 2019 The LineageOS Project
+// Copyright (C) 2019-2024 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.
cc_binary {
name: "vendor.lineage.touch@1.0-service.samsung",
init_rc: ["vendor.lineage.touch@1.0-service.samsung.rc"],
- defaults: ["hidl_defaults"],
+ defaults: ["samsung_header_path_defaults"],
relative_install_path: "hw",
// FIXME: this should be 'vendor: true' for modules that will eventually be
// on AOSP.
proprietary: true,
- local_include_dirs: ["include"],
srcs: [
"GloveMode.cpp",
"KeyDisabler.cpp",
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/IGloveMode.h>
-#include "samsung_touch.h"
+#include <samsung_touch.h>
namespace vendor {
namespace lineage {
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/IKeyDisabler.h>
-#include "samsung_touch.h"
+#include <samsung_touch.h>
namespace vendor {
namespace lineage {
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/IStylusMode.h>
-#include "samsung_touch.h"
+#include <samsung_touch.h>
namespace vendor {
namespace lineage {
#include <hidl/MQDescriptor.h>
#include <hidl/Status.h>
#include <vendor/lineage/touch/1.0/ITouchscreenGesture.h>
-#include "samsung_touch.h"
+#include <samsung_touch.h>
namespace vendor {
namespace lineage {
+++ /dev/null
-/*
- * Copyright (C) 2021 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.
- */
-
-#ifndef SAMSUNG_TOUCH_H
-#define SAMSUNG_TOUCH_H
-
-/*
- * Board specific nodes
- *
- * If your kernel exposes these controls in another place, you can either
- * symlink to the locations given here, or override this header in your
- * device tree.
- */
-
-// For GloveMode and StylusMode
-#define TSP_CMD_LIST_NODE "/sys/class/sec/tsp/cmd_list"
-#define TSP_CMD_RESULT_NODE "/sys/class/sec/tsp/cmd_result"
-#define TSP_CMD_NODE "/sys/class/sec/tsp/cmd"
-
-// For KeyDisabler
-#define KEY_DISABLER_NODE "/sys/class/sec/sec_touchkey/input/enabled"
-
-//For TouchscreenGesture
-#define TOUCHSCREEN_GESTURE_NODE "/sys/class/sec/sec_epen/epen_gestures"
-
-#endif // SAMSUNG_TOUCH_H
--- /dev/null
+/*
+ * Copyright (C) 2021 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.
+ */
+
+#ifndef SAMSUNG_TOUCH_H
+#define SAMSUNG_TOUCH_H
+
+/*
+ * Board specific nodes
+ *
+ * If your kernel exposes these controls in another place, you can either
+ * symlink to the locations given here, or override this header in your
+ * device tree.
+ */
+
+// For GloveMode and StylusMode
+#define TSP_CMD_LIST_NODE "/sys/class/sec/tsp/cmd_list"
+#define TSP_CMD_RESULT_NODE "/sys/class/sec/tsp/cmd_result"
+#define TSP_CMD_NODE "/sys/class/sec/tsp/cmd"
+
+// For KeyDisabler
+#define KEY_DISABLER_NODE "/sys/class/sec/sec_touchkey/input/enabled"
+
+//For TouchscreenGesture
+#define TOUCHSCREEN_GESTURE_NODE "/sys/class/sec/sec_epen/epen_gestures"
+
+#endif // SAMSUNG_TOUCH_H