mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
cnss2: Expose APIs to prevent and allow PCIe L1 state
WLAN driver can use the APIs to control if PCIe can enter L1 and L1ss states. Change-Id: Iad784b1ca66199ad61c471635a67542afd34480e Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
parent
7fb4a28835
commit
40eb3e3bbb
2 changed files with 19 additions and 1 deletions
|
|
@ -804,6 +804,22 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int cnss_pci_prevent_l1(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||
|
||||
return msm_pcie_prevent_l1(pci_dev);
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_pci_prevent_l1);
|
||||
|
||||
void cnss_pci_allow_l1(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pci_dev = to_pci_dev(dev);
|
||||
|
||||
msm_pcie_allow_l1(pci_dev);
|
||||
}
|
||||
EXPORT_SYMBOL(cnss_pci_allow_l1);
|
||||
|
||||
int cnss_pci_link_down(struct device *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
|
||||
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#ifndef _NET_CNSS2_H
|
||||
#define _NET_CNSS2_H
|
||||
|
|
@ -158,6 +158,8 @@ enum cnss_recovery_reason {
|
|||
extern int cnss_wlan_register_driver(struct cnss_wlan_driver *driver);
|
||||
extern void cnss_wlan_unregister_driver(struct cnss_wlan_driver *driver);
|
||||
extern void cnss_device_crashed(struct device *dev);
|
||||
extern int cnss_pci_prevent_l1(struct device *dev);
|
||||
extern void cnss_pci_allow_l1(struct device *dev);
|
||||
extern int cnss_pci_link_down(struct device *dev);
|
||||
extern int cnss_pci_is_device_down(struct device *dev);
|
||||
extern void cnss_schedule_recovery(struct device *dev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue