Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175AbdDCJlk (ORCPT ); Mon, 3 Apr 2017 05:41:40 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:45914 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdDCJlj (ORCPT ); Mon, 3 Apr 2017 05:41:39 -0400 X-AuditID: b6c32a58-f79586d000001c40-73-58e218d0191a Date: Mon, 03 Apr 2017 18:41:35 +0900 From: Andi Shyti To: Chanwoo Choi Cc: MyungJoo Ham , Jaewon Kim , Seung-Woo Kim , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, Andi Shyti , Andi Shyti Subject: Re: [PATCH v2 2/2] extcon: max77843: support USB accessories as external USB hosts Message-id: <20170403094135.26fz3ge67p265m37@gangnam.samsung> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-disposition: inline In-reply-to: <58E2078A.9070103@samsung.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupik+LIzCtJLcpLzFFi42LZdlhTS/eCxKMIg9bNphbbjzxjtVj84zmT xfUvz1ktdjQcYbU4f34Du8XlXXPYLG43rmCzmDH5JZsDh8f1JZ+YPTat6mTz6NuyitHj8ya5 AJaoVJuM1MSU1CKF1Lzk/JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoDOU FMoSc0qBQgGJxcVK+nY2RfmlJakKGfnFJbZK0YaGRnqGBuZ6RkZGeibGsVZGpkAlCakZn6/v Yi3olq9YfKudpYFxjlgXIyeHhICJxOMpF9ghbDGJC/fWs3UxcnEICSxllPj75TIzhNPOJLH7 wg0WmI6Ff0+yQCSWM0r8/LwYquojo8TkRVuYQapYBFQlvj1/CzaXTUBToun2DzYQW0RAQ2Lm 3yuMIA3MAp1MEts2/ARrEBaIlbh5bjXYCl4BW4l7m2ewQtiCEj8m3wOLMwvoSJw9to4RwpaW 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LTPQtI+C0n7AkbmVYwSqQXJBcVJ6blGeanlesWJ ucWleel6yfm5mxjBcfZMegfj4V3uhxgFOBiVeHg1nB9GCLEmlhVX5h5ilOBgVhLh3Sz0KEKI NyWxsiq1KD++qDQntfgQoykwSCYyS4km5wNTQF5JvKGJuYm5sYGFuaWliZGSOG/j7GfhQgLp iSWp2ampBalFMH1MHJxSDYzpQVZRNy2v3P7ebvesIWAtfyHH9cAjGozNLxeWpZjkyrSd/BYr Jf9cdqJSuH3Aq9CTL5eZ5KsYvrf/t7qt7stSJRujl8cmd39wfXZ+/d6qX5+OLKp9W2Y+y/HX v+TFbyN+VrSJzqkSmFmSvDjvSsceOQf2c6qSPnvbPm25f+CFV9bjY0sebBZXYinOSDTUYi4q TgQA+IY3yskCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170403094136epcas5p206eaa3ce33a7bda1020361a782cb51dc X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?7JWI65SUG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLzthLAp?= =?UTF-8?B?G+yCvOyEseyghOyekBtTZW5pb3IgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?QW5kaSBTaHl0aRtUaXplbiBQbGF0Zm9ybSBMYWIuG1NhbXN1?= =?UTF-8?B?bmcgRWxlY3Ryb25pY3MbU2VuaW9yIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 105P 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> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3891 Lines: 88 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 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