qcacmn: Add qal API for of_get_named_gpio_flags
Add qal API for of_get_named_gpio_flags Change-Id: I21eb27c72baa2057028a8565fc68754818fc641c CRs-Fixed: 3579431
This commit is contained in:

committed by
Rahul Choudhary

parent
1f2743f8d4
commit
8bb0552080
@@ -34,7 +34,8 @@ struct qdf_vbus_rstctl;
|
||||
struct qdf_dev_clk;
|
||||
struct qdf_pfm_hndl;
|
||||
struct qdf_pfm_drv;
|
||||
|
||||
struct qdf_device_node;
|
||||
typedef __qdf_of_gpio_flags qdf_of_gpio_flags;
|
||||
#ifdef ENHANCED_OS_ABSTRACTION
|
||||
/**
|
||||
* qal_vbus_get_iorsc() - acquire io resource
|
||||
@@ -289,6 +290,21 @@ qal_vbus_rcu_read_lock(void);
|
||||
*/
|
||||
QDF_STATUS
|
||||
qal_vbus_rcu_read_unlock(void);
|
||||
|
||||
/**
|
||||
* qal_vbus_of_get_named_gpio_flags() - Get a GPIO descriptor and flags
|
||||
* for GPIO API
|
||||
* @np: device node to get GPIO from
|
||||
* @list_name: property name containing gpio specifier(s)
|
||||
* @index: index of the GPIO
|
||||
* @flags: a flags pointer to fill in
|
||||
*
|
||||
* The global GPIO number for the GPIO specified by its descriptor.
|
||||
*/
|
||||
int
|
||||
qal_vbus_of_get_named_gpio_flags(struct qdf_device_node *np,
|
||||
const char *list_name,
|
||||
int index, qdf_of_gpio_flags *flags);
|
||||
#else
|
||||
static inline QDF_STATUS
|
||||
qal_vbus_get_iorsc(int devnum, uint32_t flag, char *devname)
|
||||
@@ -423,5 +439,13 @@ qal_vbus_rcu_read_unlock(void)
|
||||
{
|
||||
return __qal_vbus_rcu_read_unlock();
|
||||
}
|
||||
|
||||
static inline int
|
||||
qal_vbus_of_get_named_gpio_flags(struct qdf_device_node *np,
|
||||
const char *list_name,
|
||||
int index, qdf_of_gpio_flags *flags)
|
||||
{
|
||||
return __qal_vbus_of_get_named_gpio_flags(np, list_name, index, flags);
|
||||
}
|
||||
#endif
|
||||
#endif /* __QAL_VBUS_DEV_H */
|
||||
|
@@ -41,7 +41,8 @@ struct qdf_vbus_rstctl;
|
||||
struct qdf_dev_clk;
|
||||
struct qdf_pfm_hndl;
|
||||
struct qdf_pfm_drv;
|
||||
|
||||
struct qdf_device_node;
|
||||
typedef enum of_gpio_flags __qdf_of_gpio_flags;
|
||||
/**
|
||||
* __qal_vbus_get_iorsc() - acquire io resource
|
||||
* @devnum: Device Number
|
||||
@@ -429,4 +430,22 @@ __qal_vbus_rcu_read_unlock(void)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* __qal_vbus_of_get_named_gpio_flags() - Get a GPIO descriptor and flags
|
||||
* for GPIO API
|
||||
* @np: device node to get GPIO from
|
||||
* @list_name: property name containing gpio specifier(s)
|
||||
* @index: index of the GPIO
|
||||
* @flags: a flags pointer to fill in
|
||||
*
|
||||
* The global GPIO number for the GPIO specified by its descriptor.
|
||||
*/
|
||||
static inline int
|
||||
__qal_vbus_of_get_named_gpio_flags(struct qdf_device_node *np,
|
||||
const char *list_name,
|
||||
int index, __qdf_of_gpio_flags *flags)
|
||||
{
|
||||
return of_get_named_gpio_flags((struct device_node *)np,
|
||||
list_name, index, flags);
|
||||
}
|
||||
#endif /* __I_QAL_VBUS_DEV_H */
|
||||
|
Reference in New Issue
Block a user