From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751625AbcFUKwQ (ORCPT ); Tue, 21 Jun 2016 06:52:16 -0400 Received: from muru.com ([72.249.23.125]:56840 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbcFUKwM convert rfc822-to-8bit (ORCPT ); Tue, 21 Jun 2016 06:52:12 -0400 Date: Tue, 21 Jun 2016 03:43:23 -0700 From: Tony Lindgren To: Felipe Balbi Cc: Peter Chen , Roger Quadros , peter.chen@freescale.com, gregkh@linuxfoundation.org, dan.j.williams@intel.com, mathias.nyman@linux.intel.com, Joao.Pinto@synopsys.com, sergei.shtylyov@cogentembedded.com, jun.li@freescale.com, grygorii.strashko@ti.com, yoshihiro.shimoda.uh@renesas.com, robh@kernel.org, nsekhar@ti.com, b-liu@ti.com, joe@perches.com, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v11 08/14] usb: otg: add OTG/dual-role core Message-ID: <20160621104321.GJ22406@atomide.com> References: <1465564043-27163-1-git-send-email-rogerq@ti.com> <1465564043-27163-9-git-send-email-rogerq@ti.com> <575E672E.5070603@ti.com> <87h9coxq04.fsf@linux.intel.com> <20160620114904.GC26936@shlinux2> <8737o8qd00.fsf@linux.intel.com> <20160621060517.GA5108@shlinux2> <877fdjovef.fsf@linux.intel.com> <20160621090738.GD5108@shlinux2> <87h9cmoo4s.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <87h9cmoo4s.fsf@linux.intel.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Felipe Balbi [160621 03:06]: > 8<---------------------------------------------------------------------- > vbus = read(VBUS_STATE); /* could be a gpio_get_value() */ > id = read(ID_STATE); /* could be a gpio_get_value() */ > > set_role(id); > set_vbus(vbus); We should use regulator framework API for set_vbus() because of the delays involved bringing it up. And we already have separate PHY and charger chips where VBUS is provided by the charger chip. Regards, Tony