Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752439AbdDCKJJ (ORCPT ); Mon, 3 Apr 2017 06:09:09 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:41729 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933AbdDCKJH (ORCPT ); Mon, 3 Apr 2017 06:09:07 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 X-AuditID: b6c32a39-f790c6d000000e85-4f-58e21f2f6492 Content-transfer-encoding: 8BIT Message-id: <58E21F2F.4060001@samsung.com> Date: Mon, 03 Apr 2017 19:08:47 +0900 From: Chanwoo Choi Organization: Samsung Electronics User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Andi Shyti Cc: MyungJoo Ham , Jaewon Kim , Seung-Woo Kim , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Andi Shyti Subject: Re: [PATCH v2 2/2] extcon: max77843: support USB accessories as external USB hosts In-reply-to: <20170403094135.26fz3ge67p265m37@gangnam.samsung> X-Brightmail-Tracker: H4sIAAAAAAAAA02SWUwTYRDH83Xb7aJWPyvgiFHKqlExlG453CrggZgm8oDRkIoxuMIKSLdt ukXFp6JR8EaRYDhUFIOgBqyg9TaVoA+KxAsVU1RUhBiNN8F4tF2vt983859vZv4ZilDvIsOo PIuDt1s4M00Ok5+5Nl0XFR3+3KTb3h3Dnm17pWCPDPbJWLezTcHevt2sZO+erybZ7qJjJLu/ rJ+cqzR21X0gjK7GraRxV0sjMn50TUyTZ/AJuTyXzds1vCXLmp1nyUmkFy3JTM6Mi9cxUYyB nUlrLJzAJ9ILUtOiFuaZfRPQmrWcucAXSuNEkY5OSrBbCxy8JtcqOhLp5Qyj1zK6mVq9Xq+N jVkxSx/nk6zkc3fe6yJttfT6n6eSnegnbENBFOBY6C3dJJM4FDq9TeQ2NIxSYzeCt0+7kfQo loGzoZX8W1FXLZcS9Q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i+0QlSFgEaOaSvVvBZjILPGGUmDV1BdgcYYFY iZvnVrNALOtgkvi27hhYglPATuL5xwvMExgFZyG5dRbCrbOQ3LqAkXkVo0RqQXJBcVJ6rmFe arlecWJucWleul5yfu4mRnC8PZPawXhwl/shRgEORiUeXg3nhxFCrIllxZW5hxglOJiVRHhd JR9FCPGmJFZWpRblxxeV5qQWH2I0BXp2IrOUaHI+MBXklcQbmpibmBsbWJhbWpoYKYnzNs5+ Fi4kkJ5YkpqdmlqQWgTTx8TBKdXAeDl1DqOlxIG/2lMnq0SEPkt71+E66cgSnxXL79+K2n/R 79cfFyO9KOMvfbpFGwVnHF6yYV1mwZ3Tjcue6SlnF/zseGconrPn8+1N3GWGfPmPvVhvGaw8 s/SG0nHJI3ri7dqTd679pb6jcUNE7EfpFS8i3mt9Oi7rcybOxdl+ppGu3NolLy/9P6jEUpyR aKjFXFScCAAItq7CzQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170403100847epcas1p153f625ded391ee0d9ed685fbbd747456 X-Msg-Generator: CA X-Sender-IP: 203.254.230.26 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170402053626epcas4p28872c873de3f935bc174ff74d0069e76 X-RootMTR: 20170402053626epcas4p28872c873de3f935bc174ff74d0069e76 References: <20170402053542.29570-1-andi@etezian.org> <20170402053542.29570-3-andi@etezian.org> <58E2078A.9070103@samsung.com> <20170403094135.26fz3ge67p265m37@gangnam.samsung> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4281 Lines: 104 On 2017년 04월 03일 18:41, Andi Shyti wrote: > Hi Chanwoo, > >>> @@ -403,6 +417,11 @@ static int max77843_muic_adc_handler(struct max77843_muic_info *info) >>> >>> switch (cable_type) { >>> case MAX77843_MUIC_ADC_GROUND: >>> + case MAX77843_MUIC_ADC_RESERVED_ACC_1: >>> + case MAX77843_MUIC_ADC_RESERVED_ACC_2: >>> + case MAX77843_MUIC_ADC_RESERVED_ACC_3: >>> + case MAX77843_MUIC_ADC_RESERVED_ACC_4: >>> + case MAX77843_MUIC_ADC_RESERVED_ACC_5: >>> ret = max77843_muic_adc_gnd_handler(info); >>> if (ret < 0) >>> return ret; >>> @@ -427,11 +446,6 @@ static int max77843_muic_adc_handler(struct max77843_muic_info *info) >>> case MAX77843_MUIC_ADC_REMOTE_S10_BUTTON: >>> case MAX77843_MUIC_ADC_REMOTE_S11_BUTTON: >>> case MAX77843_MUIC_ADC_REMOTE_S12_BUTTON: >>> - case MAX77843_MUIC_ADC_RESERVED_ACC_1: >>> - case MAX77843_MUIC_ADC_RESERVED_ACC_2: >>> - case MAX77843_MUIC_ADC_RESERVED_ACC_3: >>> - case MAX77843_MUIC_ADC_RESERVED_ACC_4: >>> - case MAX77843_MUIC_ADC_RESERVED_ACC_5: >>> case MAX77843_MUIC_ADC_AUDIO_DEVICE_TYPE2: >>> case MAX77843_MUIC_ADC_PHONE_POWERED_DEV: >>> case MAX77843_MUIC_ADC_TTY_CONVERTER: >>> >> >> The extcon-max77843.c driver was implemented with real use-case >> by testing the various kind of external connectors. >> >> I want to apply the part for real use-case of this patch. >> As I knew, you tested this patch with only MAX77843_MUIC_ADC_RESERVED_ACC_4. >> So, I prefer to apply following patch only for MAX77843_MUIC_ADC_RESERVED_ACC_4. > > OK, I will do as you say, although I don't agree (as we > discussed on review.tizen.org). I'm not sure that other MAX77843_MUIC_ADC_RESERVED_ACC_1/2/3/5 are always same with MAX77843_MUIC_ADC_RESERVED_ACC_4. Also, we don't have the any test case for MAX77843_MUIC_ADC_RESERVED_ACC_1/2/3/5. > > I will drop patch 1 and change only ACC_4. > >> -- >> drivers/extcon/extcon-max77843.c | 12 +++++++++++- >> 1 file changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c >> index fcdabc4b4025..45367d74bc01 100644 >> --- a/drivers/extcon/extcon-max77843.c >> +++ b/drivers/extcon/extcon-max77843.c >> @@ -271,6 +271,16 @@ static int max77843_muic_get_cable_type(struct max77843_muic_info *info, >> } else { >> *attached = true; >> switch (adc) { >> + case MAX77843_MUIC_ADC_RESERVED_ACC_4: >> + /* >> + * The MAX77843_MUIC_ADC_RESERVED_ACC_* type are >> + * external accessories and as such they don't >> + * need any charging action. In this case just >> + * return MAX77843_MUIC_CHG_NONE so that >> + * charging type interrupts are ignored. >> + */ >> + info->prev_chg_type = MAX77843_MUIC_CHG_NONE; >> + break; >> case MAX77843_MUIC_ADC_GROUND: >> info->prev_chg_type = MAX77843_MUIC_CHG_GND; >> break; >> @@ -403,6 +413,7 @@ static int max77843_muic_adc_handler(struct max77843_muic_info *info) >> >> switch (cable_type) { >> case MAX77843_MUIC_ADC_GROUND: >> + case MAX77843_MUIC_ADC_RESERVED_ACC_4: >> ret = max77843_muic_adc_gnd_handler(info); >> if (ret < 0) >> return ret; >> @@ -430,7 +441,6 @@ static int max77843_muic_adc_handler(struct max77843_muic_info *info) >> case MAX77843_MUIC_ADC_RESERVED_ACC_1: >> case MAX77843_MUIC_ADC_RESERVED_ACC_2: >> case MAX77843_MUIC_ADC_RESERVED_ACC_3: >> - case MAX77843_MUIC_ADC_RESERVED_ACC_4: >> case MAX77843_MUIC_ADC_RESERVED_ACC_5: >> case MAX77843_MUIC_ADC_AUDIO_DEVICE_TYPE2: >> case MAX77843_MUIC_ADC_PHONE_POWERED_DEV: > > This patch, of course, doesn't make sense because it's based on > top of the previous that you asked me to drop. I will send the > correct one. > > Thanks, > Andi > > > . > -- Best Regards, Chanwoo Choi Samsung Electronics