qcacmn: Fix gpio direction conversion wrong issue

Since in wmi_gpio_config_cmd_fixed_param, the input
0 mean output, and 1 mean input, which is different
from host side enum gpio_direction. So add this fix
to do the right conversion.

Change-Id: Id60a9327e853440fd58a45c7c839109cf1f22c22
CRs-Fixed: 2856833
This commit is contained in:
Chaoli Zhou
2020-12-23 14:27:03 +08:00
committed by snandini
부모 0d4a8a6781
커밋 c87b5d218f
2개의 변경된 파일14개의 추가작업 그리고 4개의 파일을 삭제

파일 보기

@@ -3342,6 +3342,16 @@ enum gpio_direction {
WMI_HOST_GPIO_DIR_MAX,
};
/**
* enum fw_gpio_direction - GPIO Direction
* @WMI_FW_GPIO_OUTPUT: set gpio as output mode
* @WMI_FW_GPIO_INPUT: set gpio as input mode
*/
enum fw_gpio_direction {
WMI_FW_GPIO_OUTPUT = 0,
WMI_FW_GPIO_INPUT = 1,
};
/**
* enum qca_gpio_value - GPIO Value
* @WLAN_GPIO_LEVEL_LOW: set gpio output level low

파일 보기

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -34,11 +34,11 @@ convert_gpio_direction(enum gpio_direction dir)
{
switch (dir) {
case WMI_HOST_GPIO_INPUT:
return 0;
return WMI_FW_GPIO_INPUT;
case WMI_HOST_GPIO_OUTPUT:
return 1;
return WMI_FW_GPIO_OUTPUT;
default:
return 0;
return WMI_FW_GPIO_OUTPUT;
}
}