Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752632AbcD0NYP (ORCPT ); Wed, 27 Apr 2016 09:24:15 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:48866 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751992AbcD0NYO (ORCPT ); Wed, 27 Apr 2016 09:24:14 -0400 Date: Wed, 27 Apr 2016 14:24:03 +0100 From: Mark Brown To: Jisheng Zhang Cc: Felipe Balbi , mathias.nyman@linux.intel.com, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, yendapally.reddy@broadcom.com Message-ID: <20160427132403.GN3217@sirena.org.uk> References: <1461675460-2295-1-git-send-email-jszhang@marvell.com> <1461675460-2295-8-git-send-email-jszhang@marvell.com> <87bn4vpq7j.fsf@intel.com> <20160427095738.GG3217@sirena.org.uk> <20160427182516.36bd5fb5@xhacker> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="01keHr1pb7QhFMnm" Content-Disposition: inline In-Reply-To: <20160427182516.36bd5fb5@xhacker> X-Cookie: Tomorrow, you can be anywhere. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RESEND PATCH v2 7/7] usb: xhci: plat: add vbus regulator control X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1589 Lines: 46 --01keHr1pb7QhFMnm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 27, 2016 at 06:25:16PM +0800, Jisheng Zhang wrote: > On Wed, 27 Apr 2016 10:57:39 +0100 Mark Brown wrote: > > On Wed, Apr 27, 2016 at 08:37:20AM +0300, Felipe Balbi wrote: > > > > + vbus =3D devm_regulator_get(&pdev->dev, "vbus"); =20 > > > devm_regulator_get_optional() ?? =20 > > Does USB work without a VBUS? Unless the answer is yes then I'd expect > > this to be just a normal regulator_get(). > Per spec no. But the vbus may be transparent to SW on some platforms, so I > think devm_regulator_get_optional() is better. Really, no. If it's physically there the software needs to be written as such. Please see the documentation and list archives for extensive discussion on this topic. > > This is all completely broken unless the supply is optional. > The supply is optional. To repeat a supply is only optional if it might be physically absent. --01keHr1pb7QhFMnm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXIL1xAAoJECTWi3JdVIfQCskH/1VoI07mVb+LrUsX1u+PVks9 L49ISh7nQFk56eyzQphTVwpCnSipd3fGRRhw0jltMQGrjSxxdRmfYLnBqlDQaOSm QRYdENvty96B24HsV4Gxc+L+9MHuOJ9CYWZroajjJ3DQm5xE+6kozT0t5CiJHvRv o50lDSYYDOZG0AlYzubfPjHcD5kQs6FmoINYPD3P79MUZLUs6NVAmd4louZE7Cib xPdWGf7DTLLIJhmLmCcuvzzI8nJJh6xGIbzGxu0VUSAdJgRoThTY6b/qCV7t3bzE EHNt0LAefmOSB1YtVPbjTApPwMR01OMmkldjVIYoeZPR6JPFr8abmgttTU3TXL8= =hnQa -----END PGP SIGNATURE----- --01keHr1pb7QhFMnm--