Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da31911a authored by Chaoli Zhou's avatar Chaoli Zhou Committed by Madan Koyyalamudi
Browse files

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
parent ebb57d94
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3561,6 +3561,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
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}
}