conftest: add devfreq_has_suspend_freq test

Bug 5297893

Change-Id: I74388d308fdeb6673ecd7b6354971285ba6e3aa0
Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3369019
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Johnny Liu
2025-05-22 03:51:41 +00:00
committed by Jon Hunter
parent 38578736f2
commit fd42ccc45d
2 changed files with 18 additions and 0 deletions

View File

@@ -113,6 +113,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += clk_hw_determine_rate_no_reparent
NV_CONFTEST_FUNCTION_COMPILE_TESTS += define_semaphore_has_number_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_dev_profile_has_is_cooling_device
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_has_freq_table NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_has_freq_table
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devfreq_has_suspend_freq
NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type NV_CONFTEST_FUNCTION_COMPILE_TESTS += device_add_disk_has_int_return_type
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_pm_domain_attach_list NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_pm_domain_attach_list
NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_of_icc_get NV_CONFTEST_FUNCTION_COMPILE_TESTS += devm_of_icc_get

View File

@@ -6956,6 +6956,23 @@ compile_test() {
compile_check_conftest "$CODE" "NV_DEVFREQ_HAS_FREQ_TABLE" "" "types" compile_check_conftest "$CODE" "NV_DEVFREQ_HAS_FREQ_TABLE" "" "types"
;; ;;
devfreq_has_suspend_freq)
#
# Determine if the 'devfreq' structure has 'suspend_freq'
#
# Commit 83f8ca45afbf ("PM / devfreq: add support for
# suspend/resume of a devfreq device") updated the devfreq
# and add the suspend_freq field in v5.0.
#
CODE="
#include <linux/devfreq.h>
int conftest_devfreq_has_suspend_freq(void) {
return offsetof(struct devfreq, suspend_freq);
}
"
compile_check_conftest "$CODE" "NV_DEVFREQ_HAS_SUSPEND_FREQ" "" "types"
;;
device_add_disk_has_int_return_type) device_add_disk_has_int_return_type)
# #
# Determine if the function device_add_disk() returns an integer. # Determine if the function device_add_disk() returns an integer.