Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp724703ybn; Wed, 2 Oct 2019 05:18:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAGvYzYtEb1vNbzs/g9+ql6j4Ra5ilQx1HodblYrq13pr4f0Bi+bP67uYkcQkoXlwZkTo6 X-Received: by 2002:a17:906:4990:: with SMTP id p16mr2794745eju.9.1570018713627; Wed, 02 Oct 2019 05:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570018713; cv=none; d=google.com; s=arc-20160816; b=Y39sNvYAxehD0G0WVYEN+DTS3MCP6DN0HwiEaru1xSyXLti1jm7uN9HbOD3myVoMih ba06Kzg73QvMC7uzYLnNlPSQ0IOQgP4wTPnl+9Bsu5IH4cGRTL1bH/cYxv6YX4dP98bQ VQdGm9qZ0Uruwnsf1prO/LUrz2yenyJUrt1N2qwcmsOj5fJFLWMHn2OXvDn76utpIBzn NoORGfPx0YSokk1q2R/Y8CubKbcCM4RKtFLuBIhGyLYJTgzKJ8QnCJkK3uyMsmDLRsrX Jht6jrM6Vu+Rp9CNyPyr8tJI4ntpUKB6Md4fkJxCUkkePgvEtOHPFukklzQTjJV8nwPb ubvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=EqKumUA7AOBDgMN52sgO7Mpb6aGOYHgbMoR4SWhQEuY=; b=SYKuIgRqqQa8Gst9iP6ZTcfyJeC5Vh68vZNJTdaOfAaJuhY5iY35hy3fTJ82FY7iJ3 LhpUIkAd9fgGX1Ld2iR/j6QXdzVWxTZOSWPiQEK47VPMjs1tfAlXl5gmLWYplrXpJCM+ YHF5MW6nBdd96WyY/ifVfeRN8pP7F7FxkJJS3ESm6Z4KxKHxp/BX/6sK2BKr/lPuIk/Y Q0CTOO1MgVw0Ktd5RsSd0gluJzzQPa8Oy2xHFzfAk/NGnmMcTEfdUuReLGEkeE3eEnW2 bj4CsivwERPQ3F47nSrO3Okf8Wj3mx8Vkvr+DWlj5eq0Okv1tUh7BZJviJmDMI3DSIL1 BDFQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bo22si10286999ejb.369.2019.10.02.05.18.10; Wed, 02 Oct 2019 05:18:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728167AbfJBL0n (ORCPT + 99 others); Wed, 2 Oct 2019 07:26:43 -0400 Received: from hermes.aosc.io ([199.195.250.187]:42418 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfJBL0n (ORCPT ); Wed, 2 Oct 2019 07:26:43 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 0750482CE0; Wed, 2 Oct 2019 11:26:39 +0000 (UTC) From: Icenowy Zheng To: Sebastian Reichel , Chen-Yu Tsai Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Icenowy Zheng Subject: [PATCH 0/2] Enable USB BC detection to raise AXP813 Vbus current Date: Wed, 2 Oct 2019 19:25:43 +0800 Message-Id: <20191002112545.58481-1-icenowy@aosc.io> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Unlike previous AXP PMICs, the AXP813 PMIC (and AXP803) supports port detection defined in USB Battery Charging Specification 1.2, and sets the real Vbus current based on a pre-defined value (which is the original Vbus current limitation field) and the port status. However, the detection needs manual activision. If it's not active, the PMIC will assume a SDP and limit the Vbus current to 500mA. This patchset contains two patches, one enables the USB BC 1.2 detection, the other exports the real applied Vbus limitation. Icenowy Zheng (2): power: supply: axp20x_usb_power: enable USB BC detection on AXP813 power: supply: axp20x_usb_power: add applied max Vbus support for AXP813 drivers/power/supply/axp20x_usb_power.c | 140 +++++++++++++++++++++++- 1 file changed, 137 insertions(+), 3 deletions(-) -- 2.21.0