All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Riegel <damien.riegel@savoirfairelinux.com>
To: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	kernel@savoirfairelinux.com
Subject: Re: [RFC][PATCH 0/3] add EXTCON_CHG_USB_* cables to MSM USB phy
Date: Wed, 17 May 2017 09:12:42 -0400	[thread overview]
Message-ID: <20170517131242.xjj2f2o3tswoq4we@workotop.localdomain> (raw)
In-Reply-To: <20170414184330.22296-1-damien.riegel@savoirfairelinux.com>

Hi,

On Fri, Apr 14, 2017 at 02:43:27PM -0400, Damien Riegel wrote:
> This patchset adds a way for the MSM USB phy to notify a power supply
> when the charging state changes. It achieves that using the extcon
> subsystem.
> 
> The first patch makes sure msm_otg_notify_charger is called after the
> charger attributes have been set.
> The second one makes sure that function is called when unplugging a
> "in-the-wall" charger.
> The last one adds EXTCON_CHG_USB_* cables to the phy.
> 
> 
> I send this patchset as RFC because it seems a bit peculiar to have
> different drivers that generate the EXTCON_USB_* and EXTCON_CHG_USB_*
> events, so I want to make sure to get things right.
> 
> As far as I can tell, all the drivers in the kernel that have USB
> charger events also have the EXTCON_USB one. In this case, this patchset
> would make things a bit different for the MSM phy:
> 
>        +----------+      +--------------+
>        |   gpio   |      |     PMIC     |<-+
>        +----------+      +--------------+  |
>            |                    |          |
>            `--------------------+          |  EXTCON_CHG_USB_*
>                                 |          |       events
>                     EXTCON_USB  |          |
>                       events    |          |
>                                \|/         |
>                          +--------------+  |
>                          |   USB PHY    |--+
>                          +--------------+
>        
> Text version: EXTCON_USB comes from a GPIO or a PMIC, that triggers a
> notifier in the USB phy. That notifier will determine the new
> EXTCON_CHG_USB_XXX state and the PMIC will be notified about it and
> determine how much current it can use to charge a battery.
> 
> Please let me know if this is the correct way to go.

I wanted to know if someone has any comment to make on this patchset?
I'm currently working on the PMIC driver and it uses the EXTCON
notifications, so I just want to make sure it makes sense to do that.

Thanks,
-- 
Damien

  parent reply	other threads:[~2017-05-17 13:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14 18:43 [RFC][PATCH 0/3] add EXTCON_CHG_USB_* cables to MSM USB phy Damien Riegel
2017-04-14 18:43 ` [RFC][PATCH 1/3] usb: phy: msm: notify charger after setting charger info Damien Riegel
2017-04-14 18:43 ` [RFC][PATCH 2/3] usb: phy: msm: notify charger when power supply is unplugged Damien Riegel
2017-04-14 18:43 ` [RFC][PATCH 3/3] usb: phy: msm: use extcon to notify charger Damien Riegel
2017-05-17 13:12 ` Damien Riegel [this message]
2017-05-23 10:16   ` [RFC][PATCH 0/3] add EXTCON_CHG_USB_* cables to MSM USB phy 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=20170517131242.xjj2f2o3tswoq4we@workotop.localdomain \
    --to=damien.riegel@savoirfairelinux.com \
    --cc=balbi@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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.