From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757293AbcBRVpy (ORCPT ); Thu, 18 Feb 2016 16:45:54 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:35312 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753790AbcBRVpw convert rfc822-to-8bit (ORCPT ); Thu, 18 Feb 2016 16:45:52 -0500 Date: Fri, 19 Feb 2016 01:11:37 +0300 From: Antony Pavlov To: Sergei Shtylyov Cc: Alan Stern , Marek Vasut , linux-mips@linux-mips.org, Wills Wang , Daniel Schwierzeck , Alban Bedel , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC v5 07/15] usb: ehci: add vbus-gpio parameter Message-Id: <20160219011137.d8f85d72bbaa18c6e206dd09@gmail.com> In-Reply-To: <56C60DF8.1060809@cogentembedded.com> References: <1455005641-7079-8-git-send-email-antonynpavlov@gmail.com> <20160218210652.68ae464eed8ddbffd33e7a02@gmail.com> <56C60DF8.1060809@cogentembedded.com> X-Mailer: Sylpheed 3.5.0beta3 (GTK+ 2.24.25; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 18 Feb 2016 21:31:20 +0300 Sergei Shtylyov wrote: > On 02/18/2016 09:06 PM, Antony Pavlov wrote: [...] > > so I use regulator in the TL-MR3020 board dts file: > > > > reg_usb_vbus: reg_usb_vbus { > > compatible = "regulator-fixed"; > > regulator-name = "usb_vbus"; > > regulator-min-microvolt = <5000000>; > > Not 0? > > > regulator-max-microvolt = <5000000>; > > gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; > > Where's the switch if both voltages are equal? Here is a quote from linux/Documentation/devicetree/bindings/regulator/fixed-regulator.txt Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. However a fixed voltage regulator is expected to have the regulator-min-microvolt and regulator-max-microvolt to be the same. Moreover please see this of_get_fixed_voltage_config() code fragment (please see linux/drivers/regulator/fixed.c for details): if (init_data->constraints.min_uV == init_data->constraints.max_uV) { config->microvolts = init_data->constraints.min_uV; } else { dev_err(dev, "Fixed regulator specified with variable voltages\n"); return ERR_PTR(-EINVAL); } --  Best regards,   Antony Pavlov