mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
Adding helper functions to enable,disable wake irqs to make the code simple and readable. Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com> Signed-off-by: Sandeep Maheswaram <quic_c_sanm@quicinc.com> Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com> Link: https://lore.kernel.org/r/1655094654-24052-4-git-send-email-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
649f5c842b
commit
360e823051
@ -296,50 +296,44 @@ static void dwc3_qcom_interconnect_exit(struct dwc3_qcom *qcom)
|
||||
icc_put(qcom->icc_path_apps);
|
||||
}
|
||||
|
||||
static void dwc3_qcom_enable_wakeup_irq(int irq)
|
||||
{
|
||||
if (!irq)
|
||||
return;
|
||||
|
||||
enable_irq(irq);
|
||||
enable_irq_wake(irq);
|
||||
}
|
||||
|
||||
static void dwc3_qcom_disable_wakeup_irq(int irq)
|
||||
{
|
||||
if (!irq)
|
||||
return;
|
||||
|
||||
disable_irq_wake(irq);
|
||||
disable_irq_nosync(irq);
|
||||
}
|
||||
|
||||
static void dwc3_qcom_disable_interrupts(struct dwc3_qcom *qcom)
|
||||
{
|
||||
if (qcom->hs_phy_irq) {
|
||||
disable_irq_wake(qcom->hs_phy_irq);
|
||||
disable_irq_nosync(qcom->hs_phy_irq);
|
||||
}
|
||||
dwc3_qcom_disable_wakeup_irq(qcom->hs_phy_irq);
|
||||
|
||||
if (qcom->dp_hs_phy_irq) {
|
||||
disable_irq_wake(qcom->dp_hs_phy_irq);
|
||||
disable_irq_nosync(qcom->dp_hs_phy_irq);
|
||||
}
|
||||
dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq);
|
||||
|
||||
if (qcom->dm_hs_phy_irq) {
|
||||
disable_irq_wake(qcom->dm_hs_phy_irq);
|
||||
disable_irq_nosync(qcom->dm_hs_phy_irq);
|
||||
}
|
||||
dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq);
|
||||
|
||||
if (qcom->ss_phy_irq) {
|
||||
disable_irq_wake(qcom->ss_phy_irq);
|
||||
disable_irq_nosync(qcom->ss_phy_irq);
|
||||
}
|
||||
dwc3_qcom_disable_wakeup_irq(qcom->ss_phy_irq);
|
||||
}
|
||||
|
||||
static void dwc3_qcom_enable_interrupts(struct dwc3_qcom *qcom)
|
||||
{
|
||||
if (qcom->hs_phy_irq) {
|
||||
enable_irq(qcom->hs_phy_irq);
|
||||
enable_irq_wake(qcom->hs_phy_irq);
|
||||
}
|
||||
dwc3_qcom_enable_wakeup_irq(qcom->hs_phy_irq);
|
||||
|
||||
if (qcom->dp_hs_phy_irq) {
|
||||
enable_irq(qcom->dp_hs_phy_irq);
|
||||
enable_irq_wake(qcom->dp_hs_phy_irq);
|
||||
}
|
||||
dwc3_qcom_enable_wakeup_irq(qcom->dp_hs_phy_irq);
|
||||
|
||||
if (qcom->dm_hs_phy_irq) {
|
||||
enable_irq(qcom->dm_hs_phy_irq);
|
||||
enable_irq_wake(qcom->dm_hs_phy_irq);
|
||||
}
|
||||
dwc3_qcom_enable_wakeup_irq(qcom->dm_hs_phy_irq);
|
||||
|
||||
if (qcom->ss_phy_irq) {
|
||||
enable_irq(qcom->ss_phy_irq);
|
||||
enable_irq_wake(qcom->ss_phy_irq);
|
||||
}
|
||||
dwc3_qcom_enable_wakeup_irq(qcom->ss_phy_irq);
|
||||
}
|
||||
|
||||
static int dwc3_qcom_suspend(struct dwc3_qcom *qcom)
|
||||
|
Loading…
Reference in New Issue
Block a user