Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdGRHND (ORCPT ); Tue, 18 Jul 2017 03:13:03 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:33637 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751203AbdGRHNB (ORCPT ); Tue, 18 Jul 2017 03:13:01 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Baolin Wang Date: Tue, 18 Jul 2017 15:13:00 +0800 Message-ID: Subject: Re: [PATCH v2 0/3] Introduce USB charger support in USB phy To: Felipe Balbi , Greg KH , Sebastian Reichel Cc: Jun Li , Peter Chen , Mark Brown , John Stultz , NeilBrown , patches@opensource.wolfsonmicro.com, Baolin Wang , Linux PM list , USB , device-mainlining@lists.linuxfoundation.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 39 Hi, On 3 July 2017 at 14:07, Baolin Wang wrote: > 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 Any suggestion for the USB charger support in USB phy core? Thanks. > > 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 > -- Baolin.wang Best Regards