From patchwork Tue Jul 25 07:59:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 108626 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp274667qge; Tue, 25 Jul 2017 01:00:47 -0700 (PDT) X-Received: by 10.84.177.129 with SMTP id x1mr11496978plb.440.1500969647128; Tue, 25 Jul 2017 01:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500969647; cv=none; d=google.com; s=arc-20160816; b=MbycpXyPswD5OYboZ1kj7WGKg3DOdjQgE/xozvgOPVYQhde0UCTMoxa95i6fxIR6JT fhDpSSuPuNIWxRxNPZBO3X3FkH2rrvodXD6pnLNJJTFLNi0fNjcXhoSw46hUtoymn+zD RxMsF4qXbrX3uf8tH84F73DG0sRxrRNeF3epZrBeYmTGYizr31NppfAWp49uYccbzSjq cx14TpHu7KuU689HWANtviRo1gyzKzw14Yh03zHGMiWJv8K4bWVA3JG3lvbgJI859d9K MxFlL79ZHYIXT+Duj5sVQcux+7ZOfk09RN1ShsC/gLTRRE3QpAzYWWPeTC3sqhKoE+7U RxYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Cyrd1Pw0U1GothDYjXzBVcIfPpt+6v1MfcjE2EaGQrc=; b=mkVADH2hcZMu1c5+fR7w3IxYk/RILiAUH1opIoErA3F1wrSg4wIN9A6ziY/IRE2ikC 8Tew5m/snn+O4JK1/YTndK6178okbOiZRQGGJl30Ni4WREgYJ0XU/ssJn96mX+Z8a66e qf3de/DKJ2mWxXX9Rqw0IqMzAuDDSl41vblS9HRVT3FXmM2kmkUETsz9tlqT1UUDfz1U PoPkZt9hB+xEkcc+7+p9LApJGWN3O5o+1xqgAfp1f6tVcBwuTnVVI+UG6JNa5Z5xe/HJ O4irZyIuyLWulzEZLP4AxgpVKcqfkeOnlvK5wAVLRTOjje+4BesmNlDuguNEpYHUzhwX fWrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=JCdLc2Q5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2si7751336pfa.28.2017.07.25.01.00.46; Tue, 25 Jul 2017 01:00:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.b=JCdLc2Q5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbdGYIAo (ORCPT + 26 others); Tue, 25 Jul 2017 04:00:44 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33964 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbdGYIAl (ORCPT ); Tue, 25 Jul 2017 04:00:41 -0400 Received: by mail-pf0-f179.google.com with SMTP id q85so55998444pfq.1 for ; Tue, 25 Jul 2017 01:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Cyrd1Pw0U1GothDYjXzBVcIfPpt+6v1MfcjE2EaGQrc=; b=JCdLc2Q50tnkqiQTddbEV+4OuzfwW+LcXFsyOxZEO4wAMZ9bk01Mc3xbpBJK5zYCXa mjVysHHaaMVJkuRPXnl+Z+cSJPAjmnNctkN3TJStqDyIDhtKYlm0i9L0nzFPZYCQdMuo YpW8fX8jxOsk9cSegSAAVqhooanjLxcEN/fUg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Cyrd1Pw0U1GothDYjXzBVcIfPpt+6v1MfcjE2EaGQrc=; b=b9MRhiFAuyJOV6DQs30ASs+wY+/UZSE17EXLMfmw+EMO5mCMu596ZD/O6t/Ie+qFJe YF6QXlfsEtpgo24NZ4G2WAs0TUgL9AecZKofgr3t7P8OrL36Ujvz8Bx99BTC/e04gHWF xu8rSh+Z7kyaWp5Crl1//szc3nn3FyUCeF5QtLwXGJ2FEFuWiIoiEVyu4/zTiLpmW6U0 xRTXQqBU2CKbIyxdyYRywoxq5xQ2srMcY1ueLWeAsrOwHfPCvFls5EGGkatjreyBtEP3 l+uXv8EKhi5A2uzNSnPFNZ9F6KviG73Z5rFAs2qKjwWa1kWlS4qCkNMUXRB+fkBN1YuR kleg== X-Gm-Message-State: AIVw111q9A3rFIfT84X7Jn1fi27E94L1VC8p1m1vc1esdhYFPxG/q8Bu Tsu7Z2KQ2F3B9LpH X-Received: by 10.98.220.22 with SMTP id t22mr18475940pfg.301.1500969640961; Tue, 25 Jul 2017 01:00:40 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id w66sm25242538pfi.63.2017.07.25.01.00.33 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Jul 2017 01:00:40 -0700 (PDT) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org, sre@kernel.org, lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com Cc: jun.li@nxp.com, peter.chen@freescale.com, broonie@kernel.org, john.stultz@linaro.org, neilb@suse.com, patches@opensource.wolfsonmicro.com, baolin.wang@linaro.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, device-mainlining@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v3 0/3] Introduce USB charger support in USB phy Date: Tue, 25 Jul 2017 15:59:58 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. In future we will also cnvert below power drivers: drivers/power/supply/axp288_charger.c drivers/power/supply/bq24190_charger.c drivers/power/supply/charger-manager.c drivers/power/supply/qcom_smbb.c Changes since v1: - Fix building errors. Changes since v2: - Add DT binding documentation for wm831x_power driver. - Change 'usb-phy' as one optional property for wm831x_power driver. 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 Documentation/devicetree/bindings/mfd/wm831x.txt | 1 + drivers/power/supply/wm831x_power.c | 58 +++++ drivers/usb/phy/phy.c | 272 ++++++++++++++++++++++ include/linux/usb/phy.h | 49 ++++ include/uapi/linux/usb/charger.h | 31 +++ 5 files changed, 411 insertions(+) create mode 100644 include/uapi/linux/usb/charger.h -- 1.7.9.5