ufs: Add conftest to check UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE

Not all kernel define the enum UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE

Add conftest to find out whether kernel has define the enum
UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE or not and then check for macro
before using it.

Bug 4911768

Change-Id: I4eba6f02ab79c1d4a5bdefb3ec831cc4ae34d527
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
Laxman Dewangan
2024-10-25 13:06:05 +00:00
committed by Jon Hunter
parent ac4e44ec34
commit 267eedc25d
3 changed files with 17 additions and 0 deletions

View File

@@ -8357,6 +8357,20 @@ compile_test() {
compile_check_conftest "$CODE" "NV_UFSHCD_QUIRKS_ENUM_HAS_UFSHCD_QUIRK_BROKEN_64BIT_ADDRESS" "" "types"
;;
ufshcd_quirks_enum_has_ufshcd_quirk_broken_power_seqeunce)
#
# Determine if the 'UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE' is defined in the
# enum ufshcd_quirks.
#
#
CODE="
#include <ufs/ufshcd.h>
enum ufshcd_quirks quirk = UFSHCD_QUIRK_BROKEN_PWR_SEQUENCE;
"
compile_check_conftest "$CODE" "NV_UFSHCD_QUIRKS_ENUM_HAS_UFSHCD_QUIRK_BROKEN_POWER_SEQUENCE" "" "types"
;;
v4l2_async_connection_struct_present)
#
# Determine if the 'struct v4l2_async_connection' present or not.