Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754372AbbGTCcn (ORCPT ); Sun, 19 Jul 2015 22:32:43 -0400 Received: from mail-bl2on0135.outbound.protection.outlook.com ([65.55.169.135]:13691 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753530AbbGTCcl (ORCPT ); Sun, 19 Jul 2015 22:32:41 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none; Date: Mon, 20 Jul 2015 09:23:09 +0800 From: Peter Chen To: Roger Quadros CC: Li Jun , , , , , , , , , , , Subject: Re: [PATCH v3 10/11] usb: otg: Add dual-role device (DRD) support Message-ID: <20150720012308.GB4584@shlinux2> References: <1436350777-28056-1-git-send-email-rogerq@ti.com> <1436350777-28056-11-git-send-email-rogerq@ti.com> <20150717090212.GC4515@shlinux2> <55A8DD30.5030407@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <55A8DD30.5030407@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD045;1:CBymfnhXzOyYVM/hArNMxwTtgc8mMq/FNc8j5yirbiwXB8YSuT+BbaxtCl188RPK1CTX/hkpLJDGrkONI+HAG2hk5mU2Ev6xlpZJfGsnOHfCuCEiDrsVTEcFWjwCS6tr+35zpVxwGirh4iVdycvLPSqR3Rxm/rtr55FifZxb50SzF4k8fd28sUwgEULcdczyznyhDQkq4BgLbcYfXb5fHuPl89dgtVSWzcyyLCGr8ZGRXk4IzSHYaEAZgu5szwkeW9c23Z4hAWabT9C80TmAkyCG7VWL1mV58LvxVuEdQyp8iv/Q1E9g6AH+XZstVwrYPZgqA9eK36ZjbahaDPoG3rzd2gWNAv9jS4b6iRv+VYIuRVfftnQC0/lbCk9HTs9eJNlw95w/TxN9njLyE6oOPzFMOJ6vQmZ9hPb0Jf9ZkGVylDPoPyRmefYJKzxHRIZy X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(199003)(24454002)(189002)(50466002)(106466001)(47776003)(110136002)(189998001)(6806004)(105606002)(33716001)(5001960100002)(97756001)(4001350100001)(54356999)(76176999)(104016003)(5001920100001)(2950100001)(83506001)(92566002)(77096005)(50986999)(46102003)(93886004)(87936001)(33656002)(86362001)(23726002)(77156002)(62966003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0301MB1228;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:sfv;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;2:KDGRDuVc9RFirSJnswX6S9bJqdrRR3QzxqLX7lZ35BxBeoQGhaEc7GYR5ShBe+er;3:6oiW8dlHAJ4SS+JEfBh2PbXy9m10mHVsTuqkBJvD8wUIycdFwzUVEcr3Y+qlA2LgPiYB4qIfQt+tRh0pXZr4V3y3jCD26XbYSNkmRj159TQe0WI8uphK/tWEb6YihnaaD2HufxbSOQJOV1ccFnNyYWxlR8z4z7kC+dExyEc9AQIztc/ZTENCPm0nWuLnL2rpaG9KFfnNES1itoSFHCXX7JC7vM0BESR8kec/mfJ1VUc=;25:DjiVqjpu0OGL1rEa2g2NN2nneAtB7F7TPou/aNWc1eSWnfUB6c8VpIl7MLMrZDLz4L2LO0yhZ5fkH/fE4gRaQ3v9yStSHlVhUzqN+uO/Aqf/CxsWFBy1NfgRC04BdiakURV4SGPnxQ50gghBS+9ooaO7+MPYcQIN+vG69QfHw4hqhMGvJanwN7BTu5niuLl6HVl8JxpsdeUVFOu8ZQw7FrcWeQ8cSxarhSutMAfI3EgIIU8NTVW8mGi3GeuLcwlh;20:AuFMqFelloO2SMMhoPQ1i8XFRogQTOs9bKEyJ7ZuB5WVTMP2iPRMls5nI3vovjPBGzRhiOV5M332Pe2tqCjIuOJZT9X+2AORle4vUG4A12kVpdH/v7Az6mRYfpBPQ3KtaXtZrxu2QOkezQhYX3daCg8s7d30PCAgx9I9CO307JtRt7glsxMkcyw9VAZtbGb2frtTb97DXzC2kL+DYnuiT7hdbkcGBJxx80UcPH/V37y/cF+X3DGpoequgzWEP82rEBjtz+m0RK31lYY8fxUD6E2IuH8RJmhREdkqzNhE5WFpk4F6LSDu2dFJyoYCNYH67Q/ergMLZx/dh4emzf/g1C1X5kqikYd/GcZXkKn6MqE= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1228; CY1PR0301MB1228: X-MS-Exchange-Organization-RulesExecuted X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:CY1PR0301MB1228;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1228; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;4:VO/bPdRl2mrpn8DJBpQxtwKr8fdn1xMjsLCMo/+8AOuZ0x+1Z4/VyPteD9XWXaEFS967tW5+FkY0QFjg8NjVlFpf4Se5cJk8SWbqN8lIPE84ZXWUu8Eac5VcHdZH2YQlQkQ+5f1wte00XvZXsd4wi7ObGylphPvARLu31WlizYGqgOlTpq/zVCyMKfLAYhTtssI4yPv0vqtGKIXuzym3PEIRW07GgPBrWwDeDt253o7YhCPQtyqvz9V4WyeLqQ40sC1JJf6Z6pnupG6FkJAjfGYg1A5MAo06XV67HcVIReM= X-Forefront-PRVS: 0643BDA83C X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1228;23:KTCkChZY0Thx4c5BgH5EXEWi5S3nMhjMwGfG1ATy3EoN+Xk3UGmdoEuwhTnA5ZGO6StQgzyBfi1z+d3FQydoD87sDtChLw2QeBUQ9KqEh0ie1mh3A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+8tP47UFNfCj5yNDV9rHE=;20:i62SQZ9ETWsmfDlCEy5zWF9M3uygyawUTQzKj0q13j86C/YHy0msvDihwNT3aFk9IVprGutMjhMegEiud7uJKQ== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2015 02:32:37.4807 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1228 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1264 Lines: 47 On Fri, Jul 17, 2015 at 01:47:12PM +0300, Roger Quadros wrote: > >> + * DRD mode hardware Inputs > >> + * > >> + * @id: TRUE for B-device, FALSE for A-device. > >> + * @vbus: VBUS voltage in regulation. > >> + * > >> * OTG hardware Inputs > >> * > >> * Common inputs for A and B device > >> @@ -122,7 +127,8 @@ enum otg_fsm_timer { > >> */ > >> struct otg_fsm { > >> /* Input */ > >> - int id; > >> + int id; /* DRD + OTG */ > >> + int vbus; /* DRD only */ > > > > Existing b_sess_vld can be also used for drd only case, no need create > > a new flag. > > b_sess_vld is a bit confusing to people not familiar with OTG. > My suggestion is to use dedicated 'vbus' flag for DRD case > for simplicity. > Since OTG DRD is the subset in OTG FSM (FSM, data structure, APIs, etc), I agree with Jun to reuse existing variables, and we can add some comments for b_sess_vld if needed. > > > >> int adp_change; > >> int power_up; > >> int a_srp_det; > > cheers, > -roger -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/