All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] extcon: max8997: Fix lack of path setting in USB device mode
Date: Wed, 14 Nov 2018 09:07:35 +0900	[thread overview]
Message-ID: <5BEB6747.7080604@samsung.com> (raw)
In-Reply-To: <20181113153847.14732-1-m.szyprowski@samsung.com>

On 2018년 11월 14일 00:38, Marek Szyprowski wrote:
> MAX8997 driver disables automatic path selection from MicroUSB connector
> and manually sets path to either UART or USB lines. However the code for
> setting USB path worked only for USB host mode (when ID pin is set
> to ground). When standard USB cable (USB device mode) is connected, path
> registers are not touched. This means that once the non-USB accessory is
> connected to MAX8997-operated micro USB port, the path is no longer set
> to USB and USB device mode doesn't work. This patch fixes it by setting
> USB path both for USB and USB host modes.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/extcon/extcon-max8997.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
> index 632192d027bf..172e116ac1ce 100644
> --- a/drivers/extcon/extcon-max8997.c
> +++ b/drivers/extcon/extcon-max8997.c
> @@ -311,12 +311,10 @@ static int max8997_muic_handle_usb(struct max8997_muic_info *info,
>  {
>  	int ret = 0;
>  
> -	if (usb_type == MAX8997_USB_HOST) {
> -		ret = max8997_muic_set_path(info, info->path_usb, attached);
> -		if (ret < 0) {
> -			dev_err(info->dev, "failed to update muic register\n");
> -			return ret;
> -		}
> +	ret = max8997_muic_set_path(info, info->path_usb, attached);
> +	if (ret < 0) {
> +		dev_err(info->dev, "failed to update muic register\n");
> +		return ret;
>  	}
>  
>  	switch (usb_type) {
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

      reply	other threads:[~2018-11-14  0:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181113153859eucas1p1dfc17519a7e960096d2888e47ab18dd8@eucas1p1.samsung.com>
2018-11-13 15:38 ` [PATCH] extcon: max8997: Fix lack of path setting in USB device mode Marek Szyprowski
2018-11-14  0:07   ` 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=5BEB6747.7080604@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.