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

Commit 57a0c15f authored by Nandha Kishore Easwaran's avatar Nandha Kishore Easwaran Committed by Madan Koyyalamudi
Browse files

qcacmn: Add extra parameters to gpio attr

Add extra parameters mux_config, drive and init_enable
to gpio config command.

Change-Id: I439aec6cbd6769a36c7f5629f9249bdd25466138
parent 33f521b8
Loading
Loading
Loading
Loading
+68 −11
Original line number Original line Diff line number Diff line
@@ -6645,32 +6645,59 @@ enum qca_wlan_vendor_acs_select_reason {
 *
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM: Required (u32)
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM: Required (u32)
 * value to specify the gpio number.
 * value to specify the gpio number.
 * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND 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_GPIO_CONFIG or %.QCA_WLAN_VENDOR_GPIO_OUTPUT.
 *
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE: Required (u32)
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_VALUE: Required (u32)
 * value to specify the gpio output level, please refer to enum qca_gpio_value
 * value to specify the gpio output level, please refer to enum qca_gpio_value
 * to get the available value that this item can use.
 * to get the available value that this item can use.
 * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * Required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_OUTPUT.
 * %QCA_WLAN_VENDOR_GPIO_OUTPUT.
 *
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE: Required (u32)
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PULL_TYPE: Optional (u32)
 * value to specify the gpio pull type, please refer to enum qca_gpio_pull_type
 * 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.
 * to get the available value that this item can use.
 * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * Required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_CONFIG.
 * %QCA_WLAN_VENDOR_GPIO_CONFIG and
 * %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG attribute is not present.
 * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG
 * attribute is present.
 *
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE: Required (u32)
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE: Optional (u32)
 * value to specify the gpio interrupt mode, please refer to enum
 * 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.
 * 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
 * Required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_CONFIG.
 * %QCA_WLAN_VENDOR_GPIO_CONFIG and
 * %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG attribute is not present.
 * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG
 * attribute is present.
 *
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR: Required (u32)
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR: Optional (u32)
 * value to specify the gpio direction, please refer to enum qca_gpio_direction
 * value to specify the gpio direction, please refer to enum qca_gpio_direction
 * to get the available value that this item can use.
 * to get the available value that this item can use.
 * This is required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * Required, when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_CONFIG.
 * %QCA_WLAN_VENDOR_GPIO_CONFIG and
 * %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG attribute is not present.
 * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG
 * attribute is present.
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MUX_CONFIG: Optional (u32)
 * Value to specify the mux config. Meaning of a given value is dependent
 * on the target chipset and gpio pin. Must be of the range 0-15.
 * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_CONFIG. Defaults to 0.
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DRIVE: Optional (u32)
 * Value to specify the drive, Refer to enum qca_gpio_drive.
 * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_CONFIG. Defaults to QCA_WLAN_GPIO_DRIVE_2MA(0).
 *
 * @QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG: Optional (flag)
 * Optional when %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_COMMAND is
 * %QCA_WLAN_VENDOR_GPIO_CONFIG. When present this attribute signals that all
 * other parameters for the given GPIO will be obtained from internal
 * configuration. Only %QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_PINNUM must be
 * specified to indicate the GPIO pin being configured.
 */
 */
enum qca_wlan_gpio_attr {
enum qca_wlan_gpio_attr {
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INVALID = 0,
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INVALID = 0,
@@ -6686,6 +6713,12 @@ enum qca_wlan_gpio_attr {
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE = 5,
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTR_MODE = 5,
	/* Unsigned 32-bit attribute for GPIO direction to configure */
	/* Unsigned 32-bit attribute for GPIO direction to configure */
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR = 6,
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DIR = 6,
	/* Unsigned 32-bit attribute for GPIO mux config */
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_MUX_CONFIG = 7,
	/* Unsigned 32-bit attribute for GPIO drive */
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_DRIVE = 8,
	/* Flag attribute for using internal gpio configuration */
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_INTERNAL_CONFIG = 9,


	/* keep last */
	/* keep last */
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST,
	QCA_WLAN_VENDOR_ATTR_GPIO_PARAM_LAST,
@@ -6760,6 +6793,30 @@ enum qca_gpio_interrupt_mode {
	QCA_WLAN_GPIO_INTMODE_MAX,
	QCA_WLAN_GPIO_INTMODE_MAX,
};
};


/**
 * enum gpio_drive - GPIO drive
 * @QCA_WLAN_GPIO_DRIVE_2MA: drive 2MA
 * @QCA_WLAN_GPIO_DRIVE_4MA: drive 4MA
 * @QCA_WLAN_GPIO_DRIVE_6MA: drive 6MA
 * @QCA_WLAN_GPIO_DRIVE_8MA: drive 8MA
 * @QCA_WLAN_GPIO_DRIVE_10MA: drive 10MA
 * @QCA_WLAN_GPIO_DRIVE_12MA: drive 12MA
 * @QCA_WLAN_GPIO_DRIVE_14MA: drive 14MA
 * @QCA_WLAN_GPIO_DRIVE_16MA: drive 16MA
 * @QCA_WLAN_GPIO_DRIVE_MAX: invalid gpio drive
 */
enum qca_gpio_drive {
	QCA_WLAN_GPIO_DRIVE_2MA = 0,
	QCA_WLAN_GPIO_DRIVE_4MA = 1,
	QCA_WLAN_GPIO_DRIVE_6MA = 2,
	QCA_WLAN_GPIO_DRIVE_8MA = 3,
	QCA_WLAN_GPIO_DRIVE_10MA = 4,
	QCA_WLAN_GPIO_DRIVE_12MA = 5,
	QCA_WLAN_GPIO_DRIVE_14MA = 6,
	QCA_WLAN_GPIO_DRIVE_16MA = 7,
	QCA_WLAN_GPIO_DRIVE_MAX,
};

/**
/**
 * qca_wlan_set_qdepth_thresh_attr - Parameters for setting
 * qca_wlan_set_qdepth_thresh_attr - Parameters for setting
 * MSDUQ depth threshold per peer per tid in the target
 * MSDUQ depth threshold per peer per tid in the target