summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Huang <huangtao@rock-chips.com>2018-03-19 20:43:15 +0800
committerTao Huang <huangtao@rock-chips.com>2018-03-20 14:25:44 +0800
commite07667aa2dd8badc583b4ddf010328ca221efa5e (patch)
tree6e3e4bbe5bbb27ba92442578d473906b63b65cfc
parent91783f5900e0326f7a6cb2537c3d7d901d292554 (diff)
usb: bc: Fix compile error when !DWC_OTG_310
Change-Id: I726d459a5e9a7043bc6543fe58fee51b8cc5f034 Signed-off-by: Tao Huang <huangtao@rock-chips.com>
-rw-r--r--include/linux/power/rk_usbbc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/power/rk_usbbc.h b/include/linux/power/rk_usbbc.h
index 2372077f24e7..45f7128b3a69 100644
--- a/include/linux/power/rk_usbbc.h
+++ b/include/linux/power/rk_usbbc.h
@@ -21,9 +21,24 @@ enum bc_port_type{
* 2 : DCP - charger
* 3 : CDP - pc with big currect charge
************************************/
+#ifdef CONFIG_DWC_OTG_310
extern int dwc_otg_check_dpdm(bool wait);
extern int rk_bc_detect_notifier_register(struct notifier_block *nb,
enum bc_port_type *type);
extern int rk_bc_detect_notifier_unregister(struct notifier_block *nb);
+#else
+static inline int dwc_otg_check_dpdm(bool wait) { return USB_BC_TYPE_DISCNT; }
+
+static inline int rk_bc_detect_notifier_register(struct notifier_block *nb,
+ enum bc_port_type *type)
+{
+ return -EINVAL;
+}
+
+static inline int rk_bc_detect_notifier_unregister(struct notifier_block *nb)
+{
+ return -EINVAL;
+}
+#endif
#endif