添加宏控代码 驱动代码

+++ b/idh.code/kernel4.14/drivers/usb/phy/Makefile

+ifeq ($(CONFIG_UBS_HOST_101P),y)
+CFLAGS_phy-sprd-usb3.o.o += -DUBS_HOST_101P_TEST
+#endif
+
+
 obj-$(CONFIG_AB8500_USB)               += phy-ab8500-usb.o
 obj-$(CONFIG_FSL_USB2_OTG)             += phy-fsl-usb.o
 obj-$(CONFIG_ISP1301_OMAP)             += phy-isp1301-omap.o
diff --git a/idh.code/kernel4.14/drivers/usb/phy/phy-sprd-usb3.c b/idh.code/kernel4.14/drivers/usb/phy/phy-sprd-usb3.c
old mode 100644
new mode 100755
index 70412ab6bc..cdf2b904e1
--- a/idh.code/kernel4.14/drivers/usb/phy/phy-sprd-usb3.c
+++ b/idh.code/kernel4.14/drivers/usb/phy/phy-sprd-usb3.c
@@ -478,13 +478,21 @@ static struct attribute *usb_ssphy_attrs[] = {
 };
 ATTRIBUTE_GROUPS(usb_ssphy);

+#ifdef UBS_HOST_101P_TEST
+extern char usb_charging_en;
+#endif
+
 static int sprd_ssphy_vbus_notify(struct notifier_block *nb,
                                unsigned long event, void *data)
 {
        struct usb_phy *usb_phy = container_of(nb, struct usb_phy, vbus_nb);
        struct sprd_ssphy *phy = container_of(usb_phy, struct sprd_ssphy, phy);

+#ifdef UBS_HOST_101P_TEST
+       if (phy->is_host && (usb_charging_en == 0)) {
+#else
        if (phy->is_host) {
+#endif
                dev_info(usb_phy->dev, "USB PHY is host mode\n");
                return 0;
        }
diff --git a/idh.code/kernel4.14/sprd-diffconfig/roc1/arm64/ud710_2h10_zp5_101P_QP_diff_config b/idh.code/kernel4.14/sprd-diffconfig/roc1/arm64/ud710_2h10_zp5_101P_QP_diff_config
old mode 100644
new mode 100755
index 8ecaa276e9..96bb64042f
--- a/idh.code/kernel4.14/sprd-diffconfig/roc1/arm64/ud710_2h10_zp5_101P_QP_diff_config
+++ b/idh.code/kernel4.14/sprd-diffconfig/roc1/arm64/ud710_2h10_zp5_101P_QP_diff_config
@@ -38,3 +38,4 @@ ADD:CONFIG_SPRD_SFP_SUPPORT
 ADD:CONFIG_SPRD_IPA_SUPPORT
 ADD:CONFIG_SPRD_SFP_TEST
 ADD:CONFIG_SPRD_PCIE_AER
+DEL:CONFIG_UBS_HOST_101P
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值