From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932167AbcFJHEu (ORCPT ); Fri, 10 Jun 2016 03:04:50 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:39248 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752593AbcFJHEq (ORCPT ); Fri, 10 Jun 2016 03:04:46 -0400 Subject: Re: [PATCH v10 08/14] usb: otg: add OTG/dual-role core To: Sergei Shtylyov , References: <1465376626-30122-1-git-send-email-rogerq@ti.com> <1465376626-30122-9-git-send-email-rogerq@ti.com> <57592060.6060801@ti.com> <2522343c-422f-79e1-af40-eb953bde42f6@cogentembedded.com> CC: , , , , , , , , , , , , , , , From: Roger Quadros Message-ID: <575A667D.4090007@ti.com> Date: Fri, 10 Jun 2016 10:04:29 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <2522343c-422f-79e1-af40-eb953bde42f6@cogentembedded.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sergei, On 09/06/16 15:34, Sergei Shtylyov wrote: > On 6/9/2016 10:53 AM, Roger Quadros wrote: > >> It provides APIs for the following tasks >> >> - Registering an OTG/dual-role capable controller >> - Registering Host and Gadget controllers to OTG core >> - Providing inputs to and kicking the OTG state machine >> >> Provide a dual-role device (DRD) state machine. >> DRD mode is a reduced functionality OTG mode. In this mode >> we don't support SRP, HNP and dynamic role-swap. >> >> In DRD operation, the controller mode (Host or Peripheral) >> is decided based on the ID pin status. Once a cable plug (Type-A >> or Type-B) is attached the controller selects the state >> and doesn't change till the cable in unplugged and a different >> cable type is inserted. >> >> As we don't need most of the complex OTG states and OTG timers >> we implement a lean DRD state machine in usb-otg.c. >> The DRD state machine is only interested in 2 hardware inputs >> 'id' and 'b_sess_vld'. >> >> Signed-off-by: Roger Quadros > > [...] > >> diff --git a/drivers/usb/common/usb-otg.c b/drivers/usb/common/usb-otg.c >> new file mode 100644 >> index 0000000..baebe5c >> --- /dev/null >> +++ b/drivers/usb/common/usb-otg.c >> @@ -0,0 +1,833 @@ > [...] >> +/** >> + * Change USB protocol when there is a protocol change. >> + * fsm->lock must be held. >> + */ > > If you're using the kernel-doc comment, please follow the rules. > All your comments are valid and I'll fix the issues. > [...] > > Phew, that was a long patch... normally I don't review the patches that are such big. :-) Thanks for the patience and review :) -- cheers, -roger