summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMayank Rana <mrana@codeaurora.org>2016-03-08 20:46:35 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:23:34 -0700
commitc6246e5ef93a064e87c514fb1e62f308ac1d5d01 (patch)
tree5e12334a52300d3239e4b76b04cc82a9d6413b23 /include/linux
parent7d9fa0899e06a4d1b910621529de95d59b9eaf65 (diff)
msm_hsusb: Allow USB BAM driver to compile if CI is not enable
USB BAM driver is accessing some of APIs which are specific to CI controller. Hence add definitions of those APIs as No-ops when CI is not enable to compile USB BAM driver. Change-Id: Id121f042023f4a176936c8b575613244ec46de7f Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/msm_hsusb.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 9a92888f097b..b1a0cfd6a8ce 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -267,6 +267,30 @@ static inline bool msm_usb_bam_enable(enum usb_ctrl ctrl, bool bam_enable)
return true;
}
#endif
+
+/* CONFIG_PM */
+#ifdef CONFIG_PM
+static inline int get_pm_runtime_counter(struct device *dev)
+{
+ return atomic_read(&dev->power.usage_count);
+}
+#else /* !CONFIG_PM */
+static inline int get_pm_runtime_counter(struct device *dev) { return -ENOSYS; }
+#endif
+
+#ifdef CONFIG_USB_CI13XXX_MSM
+void msm_hw_bam_disable(bool bam_disable);
+void msm_usb_irq_disable(bool disable);
+#else
+static inline void msm_hw_bam_disable(bool bam_disable)
+{
+}
+
+static inline void msm_usb_irq_disable(bool disable)
+{
+}
+#endif
+
#ifdef CONFIG_USB_DWC3_QCOM
int msm_ep_config(struct usb_ep *ep);
int msm_ep_unconfig(struct usb_ep *ep);