conftest: Add test to find of_gpio_named_count()

Add conftest to find if of_gpio_named_count()
function is present.

This APIS is removed in commit c7835652a85df ("gpiolib: of: stop
exporting of_gpio_named_count()") in Linux 6.2.

Bug 4346767

Change-Id: Ia8339a4f0c7bfcbeed922c7045330ae2ba83f96c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3031547
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-12-10 11:01:47 +00:00
committed by mobile promotions
parent f78f96de71
commit 5f188c61f5
2 changed files with 22 additions and 0 deletions

View File

@@ -5475,6 +5475,27 @@ compile_test() {
compile_check_conftest "$CODE" "NV_OF_GET_NAMED_GPIO_FLAGS_PRESENT" "" "functions"
;;
of_gpio_named_count)
#
# Determine if of_gpio_named_count() function is present
#
# This APIS is removed in commit c7835652a85 ("gpiolib: of: stop
# exporting of_gpio_named_count()")
# in Linux 6.2.
#
CODE="
#if defined(NV_LINUX_OF_GPIO_H_PRESENT)
#include <linux/of_gpio.h>
#endif
void conftest_of_gpio_named_count(void)
{
of_gpio_named_count();
}
"
compile_check_conftest "$CODE" "NV_OF_GPIO_NAMED_COUNT_PRESENT" "" "functions"
;;
devm_gpio_request_one)
#
# Determine if devm_gpio_request_one() function is present