qcacmn: move over to new explicit reset API

Move over to new explicit reset API as the old calls are removed
in kernel msm-4.19.

CRs-Fixed: 2386317
Change-Id: I4d550fc19970baa8e1c90ed170beb995cb850706
This commit is contained in:
Yuanyuan Liu
2019-01-16 16:35:16 -08:00
committed by nshrivas
parent 091c291f38
commit 4c21f53aa9

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2019 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
@@ -88,6 +88,7 @@ qal_vbus_disable_devclk(struct qdf_dev_clk *clk)
qdf_export_symbol(qal_vbus_disable_devclk);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
QDF_STATUS
qal_vbus_get_dev_rstctl(struct qdf_pfm_hndl *pfhndl, const char *state,
struct qdf_vbus_rstctl **rstctl)
@@ -97,7 +98,8 @@ qal_vbus_get_dev_rstctl(struct qdf_pfm_hndl *pfhndl, const char *state,
if (!pfhndl || !state)
return QDF_STATUS_E_INVAL;
rsctl = reset_control_get_optional((struct device *)pfhndl, state);
rsctl = reset_control_get_optional_exclusive((struct device *)pfhndl,
state);
if (!rsctl)
return QDF_STATUS_E_FAILURE;
@@ -108,6 +110,27 @@ qal_vbus_get_dev_rstctl(struct qdf_pfm_hndl *pfhndl, const char *state,
}
#else
QDF_STATUS
qal_vbus_get_dev_rstctl(struct qdf_pfm_hndl *pfhndl, const char *state,
struct qdf_vbus_rstctl **rstctl)
{
struct reset_control *rsctl;
if (!pfhndl || !state)
return QDF_STATUS_E_INVAL;
rsctl = reset_control_get_optional((struct device *)pfhndl,
state);
if (!rsctl)
return QDF_STATUS_E_FAILURE;
*rstctl = (struct qdf_vbus_rstctl *)rsctl;
return QDF_STATUS_SUCCESS;
}
#endif
#else
QDF_STATUS
qal_vbus_get_dev_rstctl(struct qdf_pfm_hndl *pfhndl, const char *state,
struct qdf_vbus_rstctl **rstctl)
{