mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
conftest: update tests for devfreq and thermal
Introduce the following three tests: 1. devfreq_dev_profile_has_is_cooling_device 2. devfreq_has_freq_table 3. thermal_zone_for_each_trip Bug 4854967 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: I5fe2f7102f667a31d61550487a153590584ed638 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213844 (cherry picked from commit ae9d7ea9479637e77732bc1842a5488653157d21) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221294 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Tested-by: Paritosh Dixit <paritoshd@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c580fd0d06
commit
93b1b8542e
@@ -104,6 +104,8 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_attribute_struct_has_const_struct_cl
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_create_has_no_owner_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += class_struct_devnode_has_const_dev_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_dev_profile_has_is_cooling_device
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_has_freq_table
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_tegra_core_dev_init_opp_table_common
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_thermal_of_zone_register
|
||||
@@ -173,6 +175,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra264_chip_id
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_dev_iommu_get_stream_id
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_struct_has_iosys_map
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_device_priv
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += thermal_zone_for_each_trip
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_send_xchar_has_u8_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_write_has_u8_ptr_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_set_termios_has_const_ktermios_arg
|
||||
|
||||
@@ -6763,6 +6763,39 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_DEFINE_SEMAPHORE_HAS_NUMBER_ARG" "" "types"
|
||||
;;
|
||||
|
||||
devfreq_dev_profile_has_is_cooling_device)
|
||||
#
|
||||
# Determine if the 'devfreq_dev_profile' structure has 'is_cooling_device'.
|
||||
#
|
||||
# Commit 1224451bb6f93 ("PM / devfreq: Register devfreq as a cooling device
|
||||
# on demand") updated the devfreq_dev_profile and add the is_cooling_device
|
||||
# field in v5.12.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/devfreq.h>
|
||||
bool conftest_devfreq_dev_profile_has_is_cooling_device(struct devfreq_dev_profile *profile) {
|
||||
return profile->is_cooling_device;
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DEVFREQ_DEV_PROFILE_HAS_IS_COOLING_DEVICE" "" "types"
|
||||
;;
|
||||
|
||||
devfreq_has_freq_table)
|
||||
#
|
||||
# Determine if the 'devfreq' structure has 'freq_table'.
|
||||
#
|
||||
# Commit b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq
|
||||
# struct") updated the devfreq and add the freq_table field in v5.19.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/devfreq.h>
|
||||
unsigned long *conftest_devfreq_has_freq_table(struct devfreq *devfreq) {
|
||||
return devfreq->freq_table;
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_DEVFREQ_HAS_FREQ_TABLE" "" "types"
|
||||
;;
|
||||
|
||||
device_add_disk_has_int_return_type)
|
||||
#
|
||||
# Determine if the function device_add_disk() returns an integer.
|
||||
@@ -7917,6 +7950,23 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_THERMAL_ZONE_DEVICE_PRIV_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
thermal_zone_for_each_trip)
|
||||
#
|
||||
# Determine if the function thermal_zone_for_each_trip is present.
|
||||
#
|
||||
# thermal_zone_for_each_trip was added in commit a56cc0a833852
|
||||
# ("thermal: core: Add function to walk trips under zone lock")
|
||||
# in v6.6-rc3 (2023-10-03)
|
||||
#
|
||||
CODE="
|
||||
#include <linux/thermal.h>
|
||||
int conftest_thermal_zone_for_each_trip(void) {
|
||||
return thermal_zone_for_each_trip();
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_THERMAL_ZONE_FOR_EACH_TRIP_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
tegra_dev_iommu_get_stream_id)
|
||||
#
|
||||
# Determine if the function tegra_dev_iommu_get_stream_id is present.
|
||||
|
||||
Reference in New Issue
Block a user