dwc3: msm: Add module parameter to disable dp pulse

Add module parameter to disable sending pulse on D+ for CDP
charger, which can be enabled while running BC1.2 compliance.
Else could see CDP test failure, as compliance tester see pullup
on D+ line and starts enumeration.

Change-Id: I25dbad69ca4e6dcdf7555617ccd6eb9b34b08d40
Signed-off-by: Vijayavardhan Vennapusa <quic_vvreddy@quicinc.com>
This commit is contained in:
Vijayavardhan Vennapusa authored and Gerrit - the friendly Code Review server committed 2022-11-29 07:22:03 -08:00
1 parent 0f715024db
commit b6abc79373
1 file changed
+6 -1
+6 -1
View File
@@ -47,6 +47,10 @@
#include "debug.h"
#include "xhci.h"
static bool bc12_compliance;
module_param(bc12_compliance, bool, 0644);
MODULE_PARM_DESC(bc12_compliance, "Disable sending dp pulse for CDP");
#define SDP_CONNETION_CHECK_TIME 10000 /* in ms */
#define EXTCON_SYNC_EVENT_TIMEOUT_MS 1500 /* in ms */
@@ -3379,7 +3383,8 @@ static int dwc3_msm_vbus_notifier(struct notifier_block *nb,
* and only when the vbus connect event is a valid one.
*/
if (get_psy_type(mdwc) == POWER_SUPPLY_TYPE_USB_CDP &&
mdwc->vbus_active && !mdwc->check_eud_state) {
mdwc->vbus_active &&
!mdwc->check_eud_state && !bc12_compliance) {
dev_dbg(mdwc->dev, "Connected to CDP, pull DP up\n");
usb_phy_drive_dp_pulse(mdwc->hs_phy, DP_PULSE_WIDTH_MSEC);
}