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

Commit 9dfd5b86 authored by yungwenpeng's avatar yungwenpeng
Browse files

Merge branch vanilla into r2.0_00018.0

* ssh://ch-git3.arimacomm.com.tw:29418/kernel/msm-4.9:
  System can't enter VDD minimization
  Qualcomm KBA-180725024109 to solve Far the Proximity and the screen will never light on sometimes

Change-Id: I78b5ba05b21a8ba5c6cca49c631fee8798086146
parents d29d050f 05c07c29
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1671,10 +1671,11 @@ static int smb5_init_vconn_regulator(struct smb5 *chip)
/***************************
 * HARDWARE INITIALIZATION *
 ***************************/
//<2018/11/27-JessicaTseng, Qualcomm's patch is to fix current consumption
static int smb5_configure_typec(struct smb_charger *chg)
{
	int rc;
	u8 val = 0;
	u8 val = 0, rid_int_src = 0;

	rc = smblib_read(chg, LEGACY_CABLE_STATUS_REG, &val);
	if (rc < 0) {
@@ -1740,6 +1741,16 @@ static int smb5_configure_typec(struct smb_charger *chg)
				rc);
			return rc;
		}
		
		/* Enable Water detection rid source interrupt */ 
		rid_int_src |= TYPEC_WATER_DETECTION_INT_EN_BIT;
	}
	
 	/* Disable rid source interrupts which are not required. */ 
	rc = smblib_write(chg, TYPE_C_INTERRUPT_EN_CFG_2_REG, rid_int_src); 
	if (rc < 0) { 
		dev_err(chg->dev, "Couldn't configure Type-C interrupts rc=%d\n", rc); 
		return rc;
	}	

	/* Disable TypeC and RID change source interrupts */
@@ -1752,6 +1763,7 @@ static int smb5_configure_typec(struct smb_charger *chg)

	return rc;
}
//>2018/11/27-JessicaTseng

static int smb5_configure_micro_usb(struct smb_charger *chg)
{
+6 −0
Original line number Diff line number Diff line
@@ -239,6 +239,12 @@ static int is_sensor_port(struct msm_ipc_router_remote_port *rport)

	if (rport && rport->server) {
		svcid = rport->server->name.service;
		//<2019/09/05,ShermanWei for Qualcomm KBA-180725024109 patch
		//to solve that far Proximity the screen can not light on sometimes.
		//// hold wakelock for thresh(proximity) algo sensor and OEM1(e.g: pick up gesture sensor)
		if (svcid == 277 || svcid == 287)
			return false;
		//>2019/09/05,ShermanWei
		if (svcid == 400 || (svcid >= 256 && svcid <= 320))
			return true;
	}