From c6246e5ef93a064e87c514fb1e62f308ac1d5d01 Mon Sep 17 00:00:00 2001 From: Mayank Rana Date: Tue, 8 Mar 2016 20:46:35 -0800 Subject: 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 --- include/linux/usb/msm_hsusb.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/linux') 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); -- cgit v1.2.3