linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation
@ 2015-08-14  9:47 Baolin Wang
  2015-08-14  9:47 ` [PATCH v2 1/3] gadget: Support for the usb charger framework Baolin Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Baolin Wang @ 2015-08-14  9:47 UTC (permalink / raw)
  To: balbi
  Cc: broonie, linus.walleij, linux-kernel, baolin.wang, gregkh,
	peter.chen, sojka, stern, r.baldyga, yoshihiro.shimoda.uh,
	linux-usb, device-mainlining, sre, dbaryshkov, dwmw2, sameo,
	lee.jones, patches, linux-pm

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

^ permalink raw reply	[flat|nested] 39+ messages in thread
* [PATCH v2 0/3] Introduce USB charger support in USB phy
@ 2017-07-03  6:07 Baolin Wang
       [not found] ` <cover.1499061617.git.baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 39+ messages in thread
From: Baolin Wang @ 2017-07-03  6:07 UTC (permalink / raw)
  To: balbi-DgEjT+Ai2ygdnm+yROfE0A,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	sre-DgEjT+Ai2ygdnm+yROfE0A
  Cc: jun.li-3arQi8VN3Tc, peter.chen-KZfg59tc24xl57MIdRCFDg,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	john.stultz-QSEj5FYQhm4dnm+yROfE0A, neilb-IBi9RG/b67k,
	patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E,
	baolin.wang-QSEj5FYQhm4dnm+yROfE0A,
	linux-pm-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	device-mainlining-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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. Thus provide a standard USB charger support in USB phy core
for doing this in kernel.

Now introduce one user with wm831x_power to support and test the usb charger.

Changes since v1:
 - Fix building errors.

Baolin Wang (3):
  include: uapi: usb: Introduce USB charger type and state definition
  usb: phy: Add USB charger support
  power: wm831x_power: Support USB charger current limit management

 drivers/power/supply/wm831x_power.c |   61 ++++++++
 drivers/usb/phy/phy.c               |  265 +++++++++++++++++++++++++++++++++++
 include/linux/usb/phy.h             |   49 +++++++
 include/uapi/linux/usb/charger.h    |   31 ++++
 4 files changed, 406 insertions(+)
 create mode 100644 include/uapi/linux/usb/charger.h

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2017-07-04  7:27 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-14  9:47 [PATCH v2 0/3] Introduce usb charger framework to deal with the usb gadget power negotation Baolin Wang
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
  -- strict thread matches above, loose matches on Subject: below --
2017-07-03  6:07 [PATCH v2 0/3] Introduce USB charger support in USB phy Baolin Wang
     [not found] ` <cover.1499061617.git.baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-07-03  6:07   ` [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management Baolin Wang
2017-07-03  8:53     ` Charles Keepax
2017-07-04  7:27       ` Baolin Wang
2017-07-03 15:50     ` Sebastian Reichel
2017-07-04  7:20       ` Baolin Wang

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).