Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp531209ybx; Tue, 5 Nov 2019 01:19:42 -0800 (PST) X-Google-Smtp-Source: APXvYqxfmwNNSRR2Fm3+M/+maXxT4AYiWVX51zDelp8fiz4Td7zfgV/1V3oTuMTzSknV+hBkUyyJ X-Received: by 2002:a17:906:85c8:: with SMTP id i8mr5734963ejy.46.1572945582401; Tue, 05 Nov 2019 01:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572945582; cv=none; d=google.com; s=arc-20160816; b=p+/v4hUbbas8aecT414BPT3/1DCv/Kz5u8lXWVxtAbWWEfn3DHFgV+4xIAR/DE/67z ANV9ANKR3NxX+DGAhS9+V6Mt/rNkhPdnMWKBBIBFSAWJ53hpNjdWNPOU7phyPmdiwD2b V5KqkBHGmN08wh5E5Fh4v9npT6PmIQ6E5x8svHDI7YGC7NSUZuKK1k3ScO1k5osWasXN JwvTLMpsns2+3Au3YOWB58CpvXlO0RKJKk/Ru4OBZrrc0G6UtrWSG26E7pbZOiavdeJW 785N5Cr2o55WvjVhWtSupu4aFe1MHgzNVz7XVXZYdn/O6oj6JMP4UQ4rzLm+wGurNZqq Rehw== 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 :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=no3TrOXPIr0fb/tqGISxsTogfkVht99KnNkO4ofz60M=; b=0ldv0Hu8HGrvETSmwmzjGIGiaus2SOphtSgh5q+09r51zfTVgd37Tls7b5Zy5WcsTB M+/oXlEZVMNqJ53WAxjaH0tgkvu47F+h+dclu8PpSph8UdF/A3eCB+fO95iMQoJQ8pRU Av8QVxGCgkf+ha45LBocBg3PHumNcznBpUO71uAhmthLihBceaJncZxTl2xXLTgj4pcj QFZLyUkSNNFEoj4xAyyw0WyCRkFEVxyJHhhQgc7c05CUVrowQKHf+HimFGaDZ4DCRFvS djRvz62ADdYEon/jmPPtxAZl5K97iJJqQ85I5P7DoUi0EfsAT2j1RBEK6hSpEJZHVPNY 0MhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b="vq5W//hP"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k50si8005070ede.224.2019.11.05.01.19.18; Tue, 05 Nov 2019 01:19:42 -0800 (PST) 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=fail header.i=@crapouillou.net header.s=mail header.b="vq5W//hP"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730681AbfKEJQk (ORCPT + 99 others); Tue, 5 Nov 2019 04:16:40 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:58854 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730528AbfKEJQj (ORCPT ); Tue, 5 Nov 2019 04:16:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1572945397; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=no3TrOXPIr0fb/tqGISxsTogfkVht99KnNkO4ofz60M=; b=vq5W//hPFzbGEyBcqtgjAWIk3JU4FOQdB3QjM1LbXjuiaFJKNXYW0nYzdGurjRyoY2Qhvu N8T+SFiQmKA3tQvgWFgjwY3V+/Nb59Xu0mWKfNUhnSh8lhI0pVPG9S1lem3ba6E5+TtMWB Z6TXGP/IVLwclNA4ZfNytBlcpvtOoF4= Date: Tue, 05 Nov 2019 10:16:31 +0100 From: Paul Cercueil Subject: Re: [PATCH 1/2] dt-bindings: power/supply: Document generic USB charger To: Rob Herring Cc: Sebastian Reichel , Mark Rutland , "open list:THERMAL" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, od@zcrc.me Message-Id: <1572945391.3.1@crapouillou.net> In-Reply-To: References: <20191103220801.10666-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Le lun., nov. 4, 2019 at 07:52, Rob Herring a=20 =E9crit : > On Sun, Nov 3, 2019 at 4:08 PM Paul Cercueil =20 > wrote: >>=20 >> Add documentation about the devicetree bindings for the generic USB >> charger. >=20 > What makes it generic? It only uses the USB PHY subsystem, which already has some half-baked=20 support for chargers but not bound to the power-supply subsystem. >>=20 >> Signed-off-by: Paul Cercueil >> --- >> .../bindings/power/supply/usb-charger.txt | 24=20 >> +++++++++++++++++++ >> 1 file changed, 24 insertions(+) >> create mode 100644=20 >> Documentation/devicetree/bindings/power/supply/usb-charger.txt >>=20 >> diff --git=20 >> a/Documentation/devicetree/bindings/power/supply/usb-charger.txt=20 >> b/Documentation/devicetree/bindings/power/supply/usb-charger.txt >> new file mode 100644 >> index 000000000000..fd46734cb0e5 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/supply/usb-charger.txt >> @@ -0,0 +1,24 @@ >> +Generic USB charger bindings >> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> + >> +Required properties : >> + - compatible : should be "usb-charger" >> + - phys: phandle to the USB PHY >> + >> +Example: >> + >> +usb_con: extcon { >> + compatible =3D "linux,extcon-usb-gpio"; >> + vbus-gpios =3D <&gpb 5 GPIO_ACTIVE_HIGH>; >> +}; >> + >> +usb_phy: usb-phy@0 { >> + compatible =3D "usb-nop-xceiv"; >> + #phy-cells =3D <0>; >> + extcon =3D <&usb_con>; >=20 > extcon is deprecated in favor of usb-connector binding. See > .../bindings/connector/usb-connector.txt. There's also some pending > patches for adding GPIO based connector controls including Vbus sense > (GPIO input) and control (regulator via a GPIO). >=20 > Rob I understand that the usb-connector binding is better, but the current=20 code doesn't integrate at all with the USB PHY subsystem, which has its=20 own code to handle ID and VBUS GPIOs and supports notifiers. Is that=20 deprecated then? What's the big picture here? Thanks, -Paul =