mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
FROMGIT: usb: xhci-mtk: support quirk to disable usb2 lpm
The xHCI driver support usb2 HW LPM by default, here add support
XHCI_HW_LPM_DISABLE quirk, then we can disable usb2 lpm when
need it.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1617181553-3503-4-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit bee1f89aad
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9279b071f75b4284aae40fa4ee0673bd27ad818f
This commit is contained in:
parent
c318e67f71
commit
047943d499
|
|
@ -388,6 +388,8 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci)
|
|||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
if (mtk->lpm_support)
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
if (mtk->u2_lpm_disable)
|
||||
xhci->quirks |= XHCI_HW_LPM_DISABLE;
|
||||
|
||||
/*
|
||||
* MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream,
|
||||
|
|
@ -470,6 +472,7 @@ static int xhci_mtk_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
|
||||
mtk->lpm_support = of_property_read_bool(node, "usb3-lpm-capable");
|
||||
mtk->u2_lpm_disable = of_property_read_bool(node, "usb2-lpm-disable");
|
||||
/* optional property, ignore the error if it does not exist */
|
||||
of_property_read_u32(node, "mediatek,u3p-dis-msk",
|
||||
&mtk->u3p_dis_msk);
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ struct xhci_hcd_mtk {
|
|||
struct phy **phys;
|
||||
int num_phys;
|
||||
bool lpm_support;
|
||||
bool u2_lpm_disable;
|
||||
/* usb remote wakeup */
|
||||
bool uwk_en;
|
||||
struct regmap *uwk;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user