Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1384993ybx; Tue, 5 Nov 2019 15:20:42 -0800 (PST) X-Google-Smtp-Source: APXvYqw1Ic23N4//us3n3W3EPdkLAEWnvh/dkSPIOHs/dPH0svcd8fqUbsxYDQWi38nxQzId5cv9 X-Received: by 2002:a17:906:4f14:: with SMTP id t20mr30908392eju.239.1572996042498; Tue, 05 Nov 2019 15:20:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572996042; cv=none; d=google.com; s=arc-20160816; b=JO248EcWaaWti0mEroEBZAsFpYi33fHAB8kWUzc5v+OFGwH2qHwVngM/hMuh8OEh2Z hJXKw7IawA+t/5mU6ZRq2QK/SWBhnjmptnzEo3+7Rej+BgUBn/S5/fcnw7Kd4xABwbeo B0rFV+zLdA8r1H8Z30aPS5sSYPLF/TJbHFqfgETRRZ1FouLOahQxbXvqW8AszJVpg/xF +hTk+RyYSBU3qkWfKhCNCFPZaUEE/DJ22A/DVlv33G67M9lOlpOdrgmD92/IgP7/vQml RKyATPh+9gwFVb5rO4D/ZM6Oimky/Dz9saRlvJIMDdz+djm0YkUb+BaiZOHAy5sgLIku HSpw== 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=eDsiJOXarrFhke1fkCycy1O3NiGTme3bfHAiHJkXB/8=; b=g641fFtKcDFRZvnIMBnhkMD2rNfPFkB7nXB4CepPNvYLDtKTSPk1mY21/H6FkGIDsq ea6RhL1a/EVAqPz/V5/vFli+tDHZ+2Jg0ed6VC3YBUxGxUQnAjtNkV+TT421aMsFePb9 yjtOjFcn7pD/a8xM4DVp9C+6KoPGkUiyMtkSE+/tRrfE63LYlhJMvIfirv6wcohJai9b QHS8WeIKSYatRnK+7S80CPvnjnB70IAomh2pleBBXmHkhtYlKI8uGE6ZPPDjfVy4WRXJ gx3zu/0CV21+VRkTlkZP0IyvxthJosek5TUuo5YUZu8eXHc2e7w6yZQinQ6pF2SU5OiX IhcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=tKXqfuTr; 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 r20si10358547edm.17.2019.11.05.15.19.50; Tue, 05 Nov 2019 15:20: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=tKXqfuTr; 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 S1729372AbfKEXQ0 (ORCPT + 99 others); Tue, 5 Nov 2019 18:16:26 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:33224 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727046AbfKEXQZ (ORCPT ); Tue, 5 Nov 2019 18:16:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1572995783; 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=eDsiJOXarrFhke1fkCycy1O3NiGTme3bfHAiHJkXB/8=; b=tKXqfuTr2nlPjgFFl0fNG+qcFIc/NLt830kfPzztWEd44nARkG01pVjsPw1FGfhHOg1D9y AQBEjji+3O7H2S9vFSCBXnAnpz7G6kCNxKGYzDRIH0nNoTfSLL+6P6bYRH3blL6xzG3Y5f 30XL3GuyitI6hQmD6SJ2+Wu3zgX7QZM= Date: Wed, 06 Nov 2019 00:16:17 +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: <1572995777.3.4@crapouillou.net> In-Reply-To: References: <20191103220801.10666-1-paul@crapouillou.net> <1572945391.3.1@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 Le mar., nov. 5, 2019 at 07:48, Rob Herring a=20 =E9crit : > On Tue, Nov 5, 2019 at 3:16 AM Paul Cercueil =20 > wrote: >>=20 >> Hi Rob, >>=20 >>=20 >> Le lun., nov. 4, 2019 at 07:52, Rob Herring a >> =E9crit : >> > On Sun, Nov 3, 2019 at 4:08 PM Paul Cercueil=20 >> >> > wrote: >> >> >> >> Add documentation about the devicetree bindings for the generic=20 >> USB >> >> charger. >> > >> > What makes it generic? >>=20 >> It only uses the USB PHY subsystem, which already has some=20 >> half-baked >> support for chargers but not bound to the power-supply subsystem. >>=20 >>=20 >> >> >> >> Signed-off-by: Paul Cercueil >> >> --- >> >> .../bindings/power/supply/usb-charger.txt | 24 >> >> +++++++++++++++++++ >> >> 1 file changed, 24 insertions(+) >> >> create mode 100644 >> >> Documentation/devicetree/bindings/power/supply/usb-charger.txt >> >> >> >> diff --git >> >> a/Documentation/devicetree/bindings/power/supply/usb-charger.txt >> >> b/Documentation/devicetree/bindings/power/supply/usb-charger.txt >> >> new file mode 100644 >> >> index 000000000000..fd46734cb0e5 >> >> --- /dev/null >> >> +++=20 >> 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>; >> > >> > extcon is deprecated in favor of usb-connector binding. See >> > .../bindings/connector/usb-connector.txt. There's also some=20 >> pending >> > patches for adding GPIO based connector controls including Vbus=20 >> sense >> > (GPIO input) and control (regulator via a GPIO). >> > >> > Rob >>=20 >> I understand that the usb-connector binding is better, but the=20 >> current >> code doesn't integrate at all with the USB PHY subsystem, which has=20 >> its >> own code to handle ID and VBUS GPIOs and supports notifiers. Is that >> deprecated then? >>=20 >> What's the big picture here? >=20 > Does this series work for you?: >=20 > https://patchwork.kernel.org/cover/11120707/ I had to do some changes to my musb and PHY drivers but it works, yes. The good thing is that I didn't have to change this driver, so I'll=20 wait for feedback on patch 2/2 then post a v2 with a fixed devicetree=20 example. Thanks, -Paul =