lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <8f9245d605cd5c679d1ec06180bc49be38b10da8.1404478227.git.d.kasatkin@samsung.com>
Date:	Fri, 04 Jul 2014 15:51:26 +0300
From:	Dmitry Kasatkin <d.kasatkin@...sung.com>
To:	cw00.choi@...sung.com
Cc:	linux-kernel@...r.kernel.org,
	Dmitry Kasatkin <d.kasatkin@...sung.com>,
	Jonghwa Lee <jonghwa3.lee@...sung.com>,
	MyungJoo Ham <myungjoo.ham@...sung.com>
Subject: [PATCH 3/3] extcon: max77693: Force using UART path for jig

When USB cable is connected to jig, device disables console.
This patch forces using UART when jig cable is connected.
It allows to charge the device, which also prevents it from sleeping.

Signed-off-by: Dmitry Kasatkin <d.kasatkin@...sung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@...sung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@...sung.com>
---
 drivers/extcon/extcon-max77693.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 1b194b3..862d68f 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -296,10 +296,18 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
 		return ret;
 	}
 
-	if (attached)
-		ctrl1 = val;
-	else
+	if (attached) {
+		if (info->prev_cable_type ==
+		    MAX77693_MUIC_ADC_FACTORY_MODE_UART_OFF) {
+			/* if cable_type is jig, then force UART */
+			dev_info(info->dev, "For jig force using UART path\n");
+			ctrl1 = CONTROL1_SW_UART;
+		} else {
+			ctrl1 = val;
+		}
+	} else {
 		ctrl1 = CONTROL1_SW_OPEN;
+	}
 
 	ret = max77693_update_reg(info->max77693->regmap_muic,
 			MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ