Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6abc793 authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVijayavardhan Vennapusa <quic_vvreddy@quicinc.com>
parent 0f715024
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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);
	}