From patchwork Mon Jul 3 06:07:12 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: 106874 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp5397566qge; Sun, 2 Jul 2017 23:07:58 -0700 (PDT) X-Received: by 10.99.112.13 with SMTP id l13mr8585206pgc.199.1499062077952; Sun, 02 Jul 2017 23:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499062077; cv=none; d=google.com; s=arc-20160816; b=xkz6MOPshJHe/vUqzk9KHo65r/iQTpCM+BfJM7wTo6115SMv+RU2I3HeW9iuWgYZhw fhGqK6+fN7QqAyJgQmKLRvHw7rmoNkK4X2c36pavh0NiQ24D5XOvQexP2vNR75ZSbAvI n3ey9/JJfYatHpC172oXNLioiSG4PY7bapBdocqjQHePCWLsKzp91yvXAd69pazb9TjD yQ1oHksMqDJBPVaNbOYRjgHy9GO0x0CeZ4cEpO2P4LSSgKc8h88rhcosbrUCwp8HJ/wK NwuUgo482R/RQ2q+STbl++mSNK9mwcWcIHO7vjwhLcu2Mtsqp56m3n7g40twMWAhBXtd 94uQ== 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=cxbmB5SXHG55N4sGe7zAxRJdkHUdnPxJQLH9mxjq9TU=; b=nlLwxsjcF+Tpu6WL+tncFs7p9PoAIPsCs51EA9wDWVkwA7NH8EBg0YhlG/ZSs0QP2R zm/g1wOt3WpkLZQXUkaNuhE0n+H7enPdqHA3yOvPTT/uAHeUdTTxrCJsENGDJ17ElLSY jhG+KbXJ+ghRJUWfoSx7we0Z9x+FelXaURfNJbtLX2hCbwcDMTkiafvdxKkz5o/Y+QlQ 94jR40N1fInWGEPmatkXlIQSrlRIBlyopsq48xMsgpJBz7pcFREnm6xmNguT5mivEMHE K4ZvPQeRex5Jr3kpgHgpm6SOwKx9fG05KUMpbftLoO4R2gDFY6JdqwaZVHGZWJ4P0+Sn zzLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=OApC5SLo; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (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 g8si12531556plk.293.2017.07.02.23.07.57; Sun, 02 Jul 2017 23:07:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=OApC5SLo; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750858AbdGCGHz (ORCPT + 4 others); Mon, 3 Jul 2017 02:07:55 -0400 Received: from mail-pg0-f49.google.com ([74.125.83.49]:32804 "EHLO mail-pg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbdGCGHy (ORCPT ); Mon, 3 Jul 2017 02:07:54 -0400 Received: by mail-pg0-f49.google.com with SMTP id k14so14186829pgr.0 for ; Sun, 02 Jul 2017 23:07:54 -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=3CCha1mSmy8V0yXC6zbV1ApznQJzZpqG5SnBepr5jY4=; b=OApC5SLoC19g/2t6qe+uACX/M93fOTbnPGjz3AI9agy5I4NoPNuqKLEF9lk3zdCH+A 9JKKJL4ikhu93uf4uX7SaVfPCwPLjtJuBLDnJnS2DJ7rljr8AksFA3PXw2097FiLOJYv hZpa+p8ElvlmcvuLTvm7nNG9T2PGv7Y/w9Pbg= 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=3CCha1mSmy8V0yXC6zbV1ApznQJzZpqG5SnBepr5jY4=; b=VSNvJUGSlxVXM6cKuFg/qQjCpSOiKkC/XQ1aH2LSiS6XgidVZBIGAjvQ0h7MKiuBaq zFsm9JOpqXmfM9KHDs31zhGAXqhqVfyaxBJ9cRBYTpYN4c50PGWA3glo3rTIaJ2IajG9 AO64o/dJzlXjt8xNatdWehO5WHC9IRtFRMeSE22IdK7qO5yKpaCSq6ZtZCd7BJzP2Gbw k8CklZU3L65nG4FToEw6rUVgjx8CLy5oLVLd21RGoMT1P7oNlV4uqDhGifhXcmCrdjIp 9Tr5gEMtSyeJPBHTWyCeLXNLvv7aGH1TgdKVUySjanzQ9olF5/zH8UNTEDPwtu5rf36T kG+A== X-Gm-Message-State: AIVw113aS/4TROa+ZemSwhrP4aiVzt+pd6rMxdDPPIonGv0PWhaRkwWt /r9YhG0ZymhliHtC X-Received: by 10.98.112.137 with SMTP id l131mr8274502pfc.194.1499062073860; Sun, 02 Jul 2017 23:07:53 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id x64sm33177577pfk.20.2017.07.02.23.07.47 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Jul 2017 23:07:52 -0700 (PDT) From: Baolin Wang To: balbi@kernel.org, gregkh@linuxfoundation.org, sre@kernel.org 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 Subject: [PATCH v2 0/3] Introduce USB charger support in USB phy Date: Mon, 3 Jul 2017 14:07:12 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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. 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html