diff options
author | Dmitry Kasatkin <d.kasatkin@samsung.com> | 2014-01-10 20:13:40 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:46:10 +0900 |
commit | 1d111d37bd39949d3f560e3e3ef79f6c3e1af21c (patch) | |
tree | 29ae630bae0c4086d89f826f059599735047b723 /drivers/extcon | |
parent | ff65a95e079bce678eeadb7d7f8f305e6d38b6e7 (diff) | |
download | linux-3.10-1d111d37bd39949d3f560e3e3ef79f6c3e1af21c.tar.gz linux-3.10-1d111d37bd39949d3f560e3e3ef79f6c3e1af21c.tar.bz2 linux-3.10-1d111d37bd39949d3f560e3e3ef79f6c3e1af21c.zip |
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.
Change-Id: Ie0c8c29f40cdbed5cdad608950a6c5c428cd0fab
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
[Author information corrected and style fixed.]
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index b69e336ece2..3955391a4d3 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c @@ -293,10 +293,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); |