linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: Chanwoo Choi <cwchoi00@gmail.com>, <linux-kernel@vger.kernel.org>
Cc: <r.baldyga@samsung.com>, <peter.chen@freescale.com>,
	<kishon@ti.com>, <balbi@ti.com>, <iivanov@mm-sol.com>,
	<cw00.choi@samsung.com>, <myungjoo.ham@samsung.com>
Subject: Re: [PATCH v2 2/2] extcon: usb-gpio: Update the ID pin state of USB when cable state is changed
Date: Wed, 27 May 2015 17:40:56 +0300	[thread overview]
Message-ID: <5565D778.8000009@ti.com> (raw)
In-Reply-To: <1432728910-10761-3-git-send-email-cw00.choi@samsung.com>

On 27/05/15 15:15, Chanwoo Choi wrote:
> This patch updates the ID pin state of USB when cable state is changed
> by using the extcon_set_cable_line_state() function. The extcon consumer driver
> can receive the changed ID pin state through registered notifier chain of
> extcon consumer driver.
>
> Cc: Roger Quadros <rogerq@ti.com>
> Cc: Robert Baldyga <r.baldyga@samsung.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

> ---
>   drivers/extcon/extcon-usb-gpio.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c
> index 14da94c..9ff3171 100644
> --- a/drivers/extcon/extcon-usb-gpio.c
> +++ b/drivers/extcon/extcon-usb-gpio.c
> @@ -62,12 +62,18 @@ static void usb_extcon_detect_cable(struct work_struct *work)
>   		 */
>   		extcon_set_cable_state_(info->edev, EXTCON_USB_HOST, false);
>   		extcon_set_cable_state_(info->edev, EXTCON_USB, true);
> +
> +		extcon_set_cable_line_state(info->edev, EXTCON_USB,
> +						EXTCON_USB_ID_HIGH);
>   	} else {
>   		/*
>   		 * ID = 0 means USB HOST cable attached.
>   		 * As we don't have event for USB peripheral cable detached,
>   		 * we simulate USB peripheral detach here.
>   		 */
> +		extcon_set_cable_line_state(info->edev, EXTCON_USB,
> +						EXTCON_USB_ID_LOW);
> +
>   		extcon_set_cable_state_(info->edev, EXTCON_USB, false);
>   		extcon_set_cable_state_(info->edev, EXTCON_USB_HOST, true);
>   	}
>

  reply	other threads:[~2015-05-27 14:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 12:15 [PATCH v2 0/2] extcon: Inform the state of both ID and VBUS pin for USB Chanwoo Choi
2015-05-27 12:15 ` [PATCH v2 1/2] extcon: Add extcon_set_cable_line_state() to inform the additional state of external connectors Chanwoo Choi
2015-05-27 14:38   ` Roger Quadros
2015-05-27 15:06     ` Chanwoo Choi
2015-05-28  9:02       ` Ivan T. Ivanov
     [not found]         ` <CAGTfZH2rn7OfqaTmr0d5-MfWW3ZFdt05_7vtLKqbEQee53999w@mail.gmail.com>
2015-05-28  9:37           ` Ivan T. Ivanov
2015-05-29  7:58             ` Chanwoo Choi
2015-05-27 12:15 ` [PATCH v2 2/2] extcon: usb-gpio: Update the ID pin state of USB when cable state is changed Chanwoo Choi
2015-05-27 14:40   ` Roger Quadros [this message]
2015-05-27 14:09 ` [PATCH v2 0/2] extcon: Inform the state of both ID and VBUS pin for USB Roger Quadros
2015-05-27 14:19   ` Chanwoo Choi
2015-05-28  8:45 ` Ivan T. Ivanov
2015-05-28 14:23   ` Roger Quadros
2015-05-29  1:22     ` Peter Chen
2015-05-29 10:53       ` Chanwoo Choi
2015-05-29 12:15         ` Chanwoo Choi
2015-06-02  6:51           ` Roger Quadros
2015-05-29  7:35     ` Ivan T. Ivanov
2015-05-29  7:36     ` Ivan T. Ivanov
2015-05-29 10:39     ` Chanwoo Choi
2015-05-29 10:44   ` Chanwoo Choi
2015-05-29 14:32     ` Ivan T. Ivanov
2015-05-29 17:15       ` Chanwoo Choi
2015-05-29 17:39         ` Chanwoo Choi

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=5565D778.8000009@ti.com \
    --to=rogerq@ti.com \
    --cc=balbi@ti.com \
    --cc=cw00.choi@samsung.com \
    --cc=cwchoi00@gmail.com \
    --cc=iivanov@mm-sol.com \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=peter.chen@freescale.com \
    --cc=r.baldyga@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;
as well as URLs for NNTP newsgroup(s).