* [PATCH 0/3] extcon: max77693: fixes
@ 2014-07-04 12:51 Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 1/3] extcon: max77693: Fix bug related to MAX77693 irq when set ADC debounce time Dmitry Kasatkin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dmitry Kasatkin @ 2014-07-04 12:51 UTC (permalink / raw)
To: cw00.choi; +Cc: linux-kernel, Dmitry Kasatkin
Hi,
I found out that this commits are missing from upstream kernel.
Please take care to apply.
Thanks,
Dmitry
Dmitry Kasatkin (2):
extcon: max77693: Differentiate info message for easier debugging
extcon: max77693: Force using UART path for jig
Jonghwa Lee (1):
extcon: max77693: Fix bug related to MAX77693 irq when set ADC
debounce time
drivers/extcon/extcon-max77693.c | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] extcon: max77693: Fix bug related to MAX77693 irq when set ADC debounce time
2014-07-04 12:51 [PATCH 0/3] extcon: max77693: fixes Dmitry Kasatkin
@ 2014-07-04 12:51 ` Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 2/3] extcon: max77693: Differentiate info message for easier debugging Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 3/3] extcon: max77693: Force using UART path for jig Dmitry Kasatkin
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Kasatkin @ 2014-07-04 12:51 UTC (permalink / raw)
To: cw00.choi; +Cc: linux-kernel, Jonghwa Lee
From: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/extcon/extcon-max77693.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 2c7c3e1..0e9f734 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -288,6 +288,14 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
int ret = 0;
u8 ctrl1, ctrl2 = 0;
+ /* Set open state to path before changing hw path */
+ ret = max77693_update_reg(info->max77693->regmap_muic,
+ MAX77693_MUIC_REG_CTRL1, CONTROL1_SW_OPEN, COMP_SW_MASK);
+ if (ret < 0) {
+ dev_err(info->dev, "failed to update MUIC register\n");
+ return ret;
+ }
+
if (attached)
ctrl1 = val;
else
@@ -1259,7 +1267,7 @@ static int max77693_muic_probe(struct platform_device *pdev)
}
/* Set initial path for UART */
- max77693_muic_set_path(info, info->path_uart, true);
+ max77693_muic_set_path(info, info->path_uart, true);
/* Check revision number of MUIC device*/
ret = max77693_read_reg(info->max77693->regmap_muic,
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] extcon: max77693: Differentiate info message for easier debugging
2014-07-04 12:51 [PATCH 0/3] extcon: max77693: fixes Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 1/3] extcon: max77693: Fix bug related to MAX77693 irq when set ADC debounce time Dmitry Kasatkin
@ 2014-07-04 12:51 ` Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 3/3] extcon: max77693: Force using UART path for jig Dmitry Kasatkin
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Kasatkin @ 2014-07-04 12:51 UTC (permalink / raw)
To: cw00.choi; +Cc: linux-kernel, Dmitry Kasatkin, Jonghwa Lee, MyungJoo Ham
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
---
drivers/extcon/extcon-max77693.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 0e9f734..1b194b3 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -491,7 +491,7 @@ static int max77693_muic_dock_handler(struct max77693_muic_info *info,
char dock_name[CABLE_NAME_MAX];
dev_info(info->dev,
- "external connector is %s (adc:0x%02x)\n",
+ "external connector (doc) is %s (adc:0x%02x)\n",
attached ? "attached" : "detached", cable_type);
switch (cable_type) {
@@ -654,7 +654,7 @@ static int max77693_muic_jig_handler(struct max77693_muic_info *info,
u8 path = CONTROL1_SW_OPEN;
dev_info(info->dev,
- "external connector is %s (adc:0x%02x)\n",
+ "external connector (jig) is %s (adc:0x%02x)\n",
attached ? "attached" : "detached", cable_type);
switch (cable_type) {
@@ -700,7 +700,7 @@ static int max77693_muic_adc_handler(struct max77693_muic_info *info)
MAX77693_CABLE_GROUP_ADC, &attached);
dev_info(info->dev,
- "external connector is %s (adc:0x%02x, prev_adc:0x%x)\n",
+ "external connector (adc) is %s (adc:0x%02x, prev_adc:0x%x)\n",
attached ? "attached" : "detached", cable_type,
info->prev_cable_type);
@@ -809,7 +809,7 @@ static int max77693_muic_chg_handler(struct max77693_muic_info *info)
MAX77693_CABLE_GROUP_CHG, &attached);
dev_info(info->dev,
- "external connector is %s(chg_type:0x%x, prev_chg_type:0x%x)\n",
+ "external connector (chg) is %s(chg_type:0x%x, prev_chg_type:0x%x)\n",
attached ? "attached" : "detached",
chg_type, info->prev_chg_type);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] extcon: max77693: Force using UART path for jig
2014-07-04 12:51 [PATCH 0/3] extcon: max77693: fixes Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 1/3] extcon: max77693: Fix bug related to MAX77693 irq when set ADC debounce time Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 2/3] extcon: max77693: Differentiate info message for easier debugging Dmitry Kasatkin
@ 2014-07-04 12:51 ` Dmitry Kasatkin
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Kasatkin @ 2014-07-04 12:51 UTC (permalink / raw)
To: cw00.choi; +Cc: linux-kernel, Dmitry Kasatkin, Jonghwa Lee, MyungJoo Ham
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@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-04 12:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04 12:51 [PATCH 0/3] extcon: max77693: fixes Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 1/3] extcon: max77693: Fix bug related to MAX77693 irq when set ADC debounce time Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 2/3] extcon: max77693: Differentiate info message for easier debugging Dmitry Kasatkin
2014-07-04 12:51 ` [PATCH 3/3] extcon: max77693: Force using UART path for jig Dmitry Kasatkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).