mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacmn: QCA vendor interface for GPIO Configuration
Add gpio configuration vendor interface to set target gpio configuration and output info, meanwhile add GPIO component id Change-Id: I0b551cd63b61675406fe37549f2efeca1a2999bf
This commit is contained in:
parent
10aab5f245
commit
f855cb66d1
2 changed files with 109 additions and 5 deletions
|
|
@ -6763,19 +6763,54 @@ enum qca_wlan_vendor_acs_select_reason {
|
|||
|
||||
/**
|
||||
* enum qca_wlan_gpio_attr - Parameters for GPIO configuration
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND: Required (u32)
|
||||
* value to specify the gpio command, please refer to enum qca_gpio_cmd_type
|
||||
* to get the available value that this item can use.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM: Required (u32)
|
||||
* value to specify the gpio number.
|
||||
* This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
|
||||
* %QCA_WLAN_VENDOR_GPIO_CONFIG or %.QCA_WLAN_VENDOR_GPIO_OUTPUT.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE: Required (u32)
|
||||
* value to specify the gpio output level, please refer to enum qca_gpio_value
|
||||
* to get the available value that this item can use.
|
||||
* This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
|
||||
* %QCA_WLAN_VENDOR_GPIO_OUTPUT.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE: Required (u32)
|
||||
* value to specify the gpio pull type, please refer to enum qca_gpio_pull_type
|
||||
* to get the available value that this item can use.
|
||||
* This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
|
||||
* %QCA_WLAN_VENDOR_GPIO_CONFIG.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE: Required (u32)
|
||||
* value to specify the gpio interrupt mode, please refer to enum
|
||||
* qca_gpio_interrupt_mode to get the available value that this item can use.
|
||||
* This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
|
||||
* %QCA_WLAN_VENDOR_GPIO_CONFIG.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR: Required (u32)
|
||||
* value to specify the gpio direction, please refer to enum qca_gpio_direction
|
||||
* to get the available value that this item can use.
|
||||
* This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
|
||||
* %QCA_WLAN_VENDOR_GPIO_CONFIG.
|
||||
*/
|
||||
enum qca_wlan_gpio_attr {
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INVALID = 0,
|
||||
/* Unsigned 32-bit attribute for GPIO command */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND,
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND = 1,
|
||||
/* Unsigned 32-bit attribute for GPIO PIN number to configure */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM,
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM = 2,
|
||||
/* Unsigned 32-bit attribute for GPIO value to configure */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE,
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE = 3,
|
||||
/* Unsigned 32-bit attribute for GPIO pull type */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE,
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE = 4,
|
||||
/* Unsigned 32-bit attribute for GPIO interrupt mode */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE,
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE = 5,
|
||||
/* Unsigned 32-bit attribute for GPIO direction to configure */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR = 6,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST,
|
||||
|
|
@ -6783,6 +6818,73 @@ enum qca_wlan_gpio_attr {
|
|||
QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST - 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum gpio_cmd_type - GPIO configuration command type
|
||||
* @QCA_WLAN_VENDOR_GPIO_CONFIG: set gpio configuration info
|
||||
* @QCA_WLAN_VENDOR_GPIO_OUTPUT: set gpio output level
|
||||
*/
|
||||
enum qca_gpio_cmd_type {
|
||||
QCA_WLAN_VENDOR_GPIO_CONFIG = 0,
|
||||
QCA_WLAN_VENDOR_GPIO_OUTPUT = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_gpio_pull_type - GPIO pull type
|
||||
* @QCA_WLAN_GPIO_PULL_NONE: set gpio pull type to none
|
||||
* @QCA_WLAN_GPIO_PULL_UP: set gpio pull up
|
||||
* @QCA_WLAN_GPIO_PULL_DOWN: set gpio pull down
|
||||
*/
|
||||
enum qca_gpio_pull_type {
|
||||
QCA_WLAN_GPIO_PULL_NONE = 0,
|
||||
QCA_WLAN_GPIO_PULL_UP = 1,
|
||||
QCA_WLAN_GPIO_PULL_DOWN = 2,
|
||||
QCA_WLAN_GPIO_PULL_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_gpio_direction - GPIO direction
|
||||
* @QCA_WLAN_GPIO_INPUT: set gpio as input mode
|
||||
* @QCA_WLAN_GPIO_OUTPUT: set gpio as output mode
|
||||
* @QCA_WLAN_GPIO_VALUE_MAX: invalid value
|
||||
*/
|
||||
enum qca_gpio_direction {
|
||||
QCA_WLAN_GPIO_INPUT = 0,
|
||||
QCA_WLAN_GPIO_OUTPUT = 1,
|
||||
QCA_WLAN_GPIO_DIR_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum qca_gpio_value - GPIO Value
|
||||
* @QCA_WLAN_GPIO_LEVEL_LOW: set gpio output level to low
|
||||
* @QCA_WLAN_GPIO_LEVEL_HIGH: set gpio output level to high
|
||||
* @QCA_WLAN_GPIO_LEVEL_MAX: invalid value
|
||||
*/
|
||||
enum qca_gpio_value {
|
||||
QCA_WLAN_GPIO_LEVEL_LOW = 0,
|
||||
QCA_WLAN_GPIO_LEVEL_HIGH = 1,
|
||||
QCA_WLAN_GPIO_LEVEL_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum gpio_interrupt_mode - GPIO interrupt mode
|
||||
* @QCA_WLAN_GPIO_INTMODE_DISABLE: disable interrupt trigger
|
||||
* @QCA_WLAN_GPIO_INTMODE_RISING_EDGE: interrupt with gpio rising edge trigger
|
||||
* @QCA_WLAN_GPIO_INTMODE_FALLING_EDGE: interrupt with gpio falling edge trigger
|
||||
* @QCA_WLAN_GPIO_INTMODE_BOTH_EDGE: interrupt with gpio both edge trigger
|
||||
* @QCA_WLAN_GPIO_INTMODE_LEVEL_LOW: interrupt with gpio level low trigger
|
||||
* @QCA_WLAN_GPIO_INTMODE_LEVEL_HIGH: interrupt with gpio level high trigger
|
||||
* @QCA_WLAN_GPIO_INTMODE_MAX: invalid value
|
||||
*/
|
||||
enum qca_gpio_interrupt_mode {
|
||||
QCA_WLAN_GPIO_INTMODE_DISABLE = 0,
|
||||
QCA_WLAN_GPIO_INTMODE_RISING_EDGE = 1,
|
||||
QCA_WLAN_GPIO_INTMODE_FALLING_EDGE = 2,
|
||||
QCA_WLAN_GPIO_INTMODE_BOTH_EDGE = 3,
|
||||
QCA_WLAN_GPIO_INTMODE_LEVEL_LOW = 4,
|
||||
QCA_WLAN_GPIO_INTMODE_LEVEL_HIGH = 5,
|
||||
QCA_WLAN_GPIO_INTMODE_MAX,
|
||||
};
|
||||
|
||||
/**
|
||||
* qca_wlan_set_qdepth_thresh_attr - Parameters for setting
|
||||
* MSDUQ depth threshold per peer per tid in the target
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@
|
|||
* @WLAN_UMAC_COMP_DCS: DCS
|
||||
* @WLAN_IOT_SIM_COMP: IOT Simulation component
|
||||
* @WLAN_UMAC_COMP_IF_MGR: Interface manager component
|
||||
* @WLAN_UMAC_COMP_GPIO: GPIO Configuration
|
||||
* @WLAN_UMAC_COMP_ID_MAX: Maximum components in UMAC
|
||||
*
|
||||
* This id is static.
|
||||
|
|
@ -325,6 +326,7 @@ enum wlan_umac_comp_id {
|
|||
WLAN_UMAC_COMP_DCS = 36,
|
||||
WLAN_IOT_SIM_COMP = 37,
|
||||
WLAN_UMAC_COMP_IF_MGR = 38,
|
||||
WLAN_UMAC_COMP_GPIO = 39,
|
||||
WLAN_UMAC_COMP_ID_MAX,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue