public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Andi Shyti <andi.shyti@samsung.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Jaewon Kim <jaewon02.kim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-kernel@vger.kernel.org, Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH v2 2/2] extcon: max77843: support USB accessories as external USB hosts
Date: Mon, 03 Apr 2017 19:08:47 +0900	[thread overview]
Message-ID: <58E21F2F.4060001@samsung.com> (raw)
In-Reply-To: <20170403094135.26fz3ge67p265m37@gangnam.samsung>

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

      reply	other threads:[~2017-04-03 10:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02  5:35 [PATCH v2 0/2] Add support for USB accessories in the max77843 extcon Andi Shyti
2017-04-02  5:35 ` [PATCH v2 1/2] extcon: max77843: improve the code and minimize duplicated lines Andi Shyti
2017-04-03  7:53   ` Chanwoo Choi
2017-04-02  5:35 ` [PATCH v2 2/2] extcon: max77843: support USB accessories as external USB hosts Andi Shyti
2017-04-03  8:27   ` Chanwoo Choi
2017-04-03  9:41     ` Andi Shyti
2017-04-03 10:08       ` Chanwoo Choi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58E21F2F.4060001@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=andi.shyti@samsung.com \
    --cc=andi@etezian.org \
    --cc=jaewon02.kim@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox