linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
To: balbi@ti.com
Cc: broonie@kernel.org, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org, baolin.wang@linaro.org,
	gregkh@linuxfoundation.org, peter.chen@freescale.com,
	sojka@merica.cz, stern@rowland.harvard.edu,
	r.baldyga@samsung.com, yoshihiro.shimoda.uh@renesas.com,
	linux-usb@vger.kernel.org,
	device-mainlining@lists.linuxfoundation.org, sre@kernel.org,
	dbaryshkov@gmail.com, dwmw2@infradead.org, sameo@linux.intel.com,
	lee.jones@linaro.org, patches@opensource.wolfsonmicro.com,
	linux-pm@vger.kernel.org
Subject: [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation
Date: Fri, 14 Aug 2015 17:47:43 +0800	[thread overview]
Message-ID: <cover.1439519412.git.baolin.wang@linaro.org> (raw)

Currently the Linux kernel does not provide any standard integration of this
feature that integrates the USB subsystem with the system power regulation
provided by PMICs meaning that either vendors must add this in their kernels
or USB gadget devices based on Linux (such as mobile phones) may not behave
as they should.

Providing a standard framework for doing this in the kernel.

Now introduce one user with wm831x_power to support and test the usb charger,
which is pending testing. Moreover there may be other potential users will use
it in future.

Changes since v1:
 - Rebase my branch and re-create the patch series.
 - Remove the extcon wrappers and gadget wrappers for registering a notifier.
 - Remove the user count in usb charger.
 - Use idr instead of my own logic.
 - Replace the spinlock with mutex.
 - Use the list of driver core to manage the usb charger device.
 - Add the Kconfig and Makefile changes.
 - Add some attribute files to show or store the current limitation.
 - Introduce one user of usb charger by Mark Brown.
 - Other modifications.

Baolin Wang (3):
  gadget: Support for the usb charger framework
  gadget: Introduce the usb charger framework
  power: wm831x_power: Support USB charger current limit management

 drivers/power/wm831x_power.c      |   69 +++++
 drivers/usb/gadget/Kconfig        |    7 +
 drivers/usb/gadget/Makefile       |    1 +
 drivers/usb/gadget/charger.c      |  561 +++++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/udc/udc-core.c |   38 +++
 include/linux/mfd/wm831x/pdata.h  |    3 +
 include/linux/usb/gadget.h        |   20 ++
 include/linux/usb/usb_charger.h   |  145 ++++++++++
 8 files changed, 844 insertions(+)
 create mode 100644 drivers/usb/gadget/charger.c
 create mode 100644 include/linux/usb/usb_charger.h

-- 
1.7.9.5

             reply	other threads:[~2015-08-14  9:47 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14  9:47 Baolin Wang [this message]
2015-08-14  9:47 ` [PATCH v2 1/3] gadget: Support for the usb charger framework Baolin Wang
     [not found]   ` <33e56f632418b8e42162d5b64decb6ffc8de3e01.1439519412.git.baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-08-17  0:40     ` Peter Chen
2015-08-17  2:08       ` Baolin Wang
2015-08-14  9:47 ` [PATCH v2 2/3] gadget: Introduce " Baolin Wang
2015-08-14 15:27   ` Greg KH
2015-08-17  3:03     ` Baolin Wang
2015-08-17 15:25       ` [Device-mainlining] " Tim Bird
     [not found]         ` <55D1FCDF.6060709-/MT0OVThwyLZJqsBc5GL+g@public.gmane.org>
2015-08-18  1:43           ` Baolin Wang
2015-10-08 15:50         ` Pavel Machek
2015-10-08 16:23           ` Greg KH
     [not found]             ` <20151008162316.GA5833-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-10-08 17:04               ` Pavel Machek
2015-10-08 17:16                 ` Greg KH
2015-08-17 17:24       ` Mark Brown
2015-08-18  1:44         ` Baolin Wang
     [not found] ` <cover.1439519412.git.baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-08-14  8:55   ` [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation Li Jun
2015-08-14 11:04     ` Baolin Wang
     [not found]       ` <CAMz4kuK7f=rGOO-YdB0AB8PzpTbnWZtasuQK8gOXLuM9zyn3gw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-17  1:15         ` Li Jun
2015-08-17  6:02           ` Baolin Wang
     [not found]             ` <CAMz4kuJGR1ZQPbBNpp7EABJn=Rag8jSrb-2ztcefUf4R7pk4AQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-17  8:20               ` Li Jun
2015-08-17 11:51                 ` Baolin Wang
2015-08-14  9:47   ` [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management Baolin Wang
2015-08-14 10:42     ` Lee Jones
2015-08-17  1:07     ` Peter Chen
2015-08-17 17:26       ` Mark Brown
     [not found]         ` <20150817172623.GO10748-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-08-17 23:58           ` Felipe Balbi
2015-08-18  5:04             ` Mark Brown
2015-08-18 14:07               ` Felipe Balbi
2015-08-18  5:20           ` Peter Chen
2015-08-18 16:12             ` Mark Brown
     [not found]               ` <20150818161200.GK10748-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-08-19  0:02                 ` Peter Chen
2015-08-19 16:36                   ` Mark Brown
     [not found]     ` <f3bfd04bc157e97e2d0632b7ed2452f366f66488.1439519413.git.baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-08-20  9:02       ` David Laight
2015-08-21  2:28         ` Baolin Wang

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=cover.1439519412.git.baolin.wang@linaro.org \
    --to=baolin.wang@linaro.org \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=dbaryshkov@gmail.com \
    --cc=device-mainlining@lists.linuxfoundation.org \
    --cc=dwmw2@infradead.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=peter.chen@freescale.com \
    --cc=r.baldyga@samsung.com \
    --cc=sameo@linux.intel.com \
    --cc=sojka@merica.cz \
    --cc=sre@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=yoshihiro.shimoda.uh@renesas.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).