Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5525222ybi; Tue, 30 Jul 2019 22:44:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbm1qKeueATnrYL5KvMyk5atU9vFkxn8Vk+Qh+dBxuzQfTcLVQ3qXgCym8OnIGFCGMDt5C X-Received: by 2002:a17:902:b696:: with SMTP id c22mr22380934pls.305.1564551865480; Tue, 30 Jul 2019 22:44:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564551865; cv=pass; d=google.com; s=arc-20160816; b=W/fSViH9Q8wdTnK/K/aXsvgdRdq055LT188WHwbqbymabYI+Rhj9NcMfhzfY5zVKpE 7cLgy0J/HNNosi1K69c5E4nRBYcNNda2TrYnn4Vw0B3ochEgECOXNp9S6RpJGnKmJzlW z4t/4G/Bs7hR9nOj/TyEqCc/hwEZ19ogrr13aEYUncdLCdVxzU8MA21JE2D8MiXAuyFZ om8MFC02X42EhtDw+26i2zC8ezgDrt0ZWNAGWwS+b9Minkkp1mMqv0tUFrb92NaWBb1Y Ctyxj7hLye50XMpVflgqbq8gBmUB3V9yKkAVGAdFq3UDljaaUNyIeTNWLFj20Iz4qsqA PIsg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=GSz3ZHW+GB/O7fBi+i82MWdJ9DfCJR08+VxXrj7Il0M=; b=OIcjW4SybQ1bAZMm9PSWt4uNxfHKIkTZ2P61L8ZE1PiYqiIFpz4gB5Ris1Yyq465S8 3atOWPmaN5UDCmntKu0PAuHGNR5Kr2tmL0B96gcSxzLM4kdIonedqfnbuAW5bqc3jFNB nTGBsM88Nd2+9RxwrkklXb6kuHcJ7D3GvG807U2wCAOLQDIyR/DYG3e88gn1SaBpzOUq beAZR0UbVlQyFiG8/UNcV/uNbIgpYq62mOmksvRPZQUSTVYz2c1dMe4Hu+WIaiTifgda 2B3YaewKLOVmnNk8ngzi3bUwQ/b8at1YM0Nm6d2wjHGImQQNxp0eTxikYQrYpE3eBlku 1LQw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cadence.com header.s=proofpoint header.b="VfoU/IfI"; dkim=pass header.i=@cadence.com header.s=selector1 header.b="c/OHnVAQ"; arc=pass (i=1 spf=pass spfdomain=cadence.com dkim=pass dkdomain=cadence.com dmarc=pass fromdomain=cadence.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cadence.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p22si32234574pli.255.2019.07.30.22.44.10; Tue, 30 Jul 2019 22:44:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cadence.com header.s=proofpoint header.b="VfoU/IfI"; dkim=pass header.i=@cadence.com header.s=selector1 header.b="c/OHnVAQ"; arc=pass (i=1 spf=pass spfdomain=cadence.com dkim=pass dkdomain=cadence.com dmarc=pass fromdomain=cadence.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cadence.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728690AbfGaDtq (ORCPT + 99 others); Tue, 30 Jul 2019 23:49:46 -0400 Received: from mx0b-0014ca01.pphosted.com ([208.86.201.193]:57554 "EHLO mx0a-0014ca01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725851AbfGaDtq (ORCPT ); Tue, 30 Jul 2019 23:49:46 -0400 Received: from pps.filterd (m0042333.ppops.net [127.0.0.1]) by mx0b-0014ca01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6V3nItM031522; Tue, 30 Jul 2019 20:49:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=proofpoint; bh=GSz3ZHW+GB/O7fBi+i82MWdJ9DfCJR08+VxXrj7Il0M=; b=VfoU/IfIsMGgaicnp4Jgekxtk166A9ITtELidCq/RnGd/M061uyLUpK9NE7tCqoBcZHI 7augVa32jOQ8VBlkCEVQhJKr+TdpRpG7W3Ty5i+Yql+5quWIBzPbOvDtqRJCLosFKwNO PfdjkpHTpNzaACGWvXS2NeD01chh7RYBFFvatt1vLmddFrNLKzkcTsifpkoFFy24jB4D 0SC1RCy1endd9RKWvmSMxm92pMhpbup3Dni1FmAJoYHXLkGxJfPJ4HDyYnupU+3tDTji mDPZsVX5RkRYdGAXHnItefi1FVAuOMR156qFRyez8b0pCrbubc7vvoetZ44AhFJeIbD6 7w== Authentication-Results: cadence.com; spf=pass smtp.mailfrom=pawell@cadence.com Received: from nam02-bl2-obe.outbound.protection.outlook.com (mail-bl2nam02lp2055.outbound.protection.outlook.com [104.47.38.55]) by mx0b-0014ca01.pphosted.com with ESMTP id 2u0j711d74-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 30 Jul 2019 20:49:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k/JQGQmbXYa1omN6oKVamJSVC1cHdDuzh/6w6tNOI0jGooeDLyq8n22zsYWNsjNvlflavAJvjeCiD+XgIw9jU5XxZX0jugUW6TLVhC/j7AXVb9Dul8Fi+d6L2tHQSHZ03EMyGA486RJWP/QLC2EOBe3AaR5Sl5v+gkDM7U/aa2ettzgA+W0oxk7tpW8PnG9aN0m6vU2wmv+p1YXAlboDaYQbsztPwAn/2LdcUWCiYZcXg5cHW3d2Ei/+MT5A7PqeU4DZ1aVYkN3tsjk4OsRFJ0nxAqyiNEV32XiynNn5aWXG8SpHUaVa4SiQHZNeFHR1ce3QJfP5/nmeebWs8ekjkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GSz3ZHW+GB/O7fBi+i82MWdJ9DfCJR08+VxXrj7Il0M=; b=MFmKcB3EkvmCHtqq+CHbNQ0kYGSznd8JuSrJ9XigSiReqc10t1lnEbZtbLbmOVU6SAgZ3DM/slt7oipNMwQoxf+BmQqet65oKn6nYtpif6KXITEF0QGbNuyaDmEcywY99C9cPQ/xhx4XarwVHeTN0eVyJrsk+zNxkBqd/6KjqEw8jWTuiw/t2jwZc6X0YurrPliccRRH3PsMZrbvmf8j6Qpn1G4QJJdNXa6BoVqoADRTX2HYWPPj7je2OLLrZUptO4dkQV52U7XGJQzmJRfax1NQqB+YOM4woUi+nAGznzQv6k+vNilYejDUKCT9WIe8jbJxTABv349fUpSOQUCk7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=cadence.com;dmarc=pass action=none header.from=cadence.com;dkim=pass header.d=cadence.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GSz3ZHW+GB/O7fBi+i82MWdJ9DfCJR08+VxXrj7Il0M=; b=c/OHnVAQVWP34KWkbn08IkXKniPQ/jB8//noXWImkDRnbJBuKAkIz2OA5zorfXa8ispSPEzweUolDUrTvbrsEtKV9xqSSjMJJPXR/PP1TtiRqibYrJDdaoCxotXBSlgVBK8y+lGdckJdiEin6voorRXXuVP963UURpUCTA4BOvk= Received: from BYAPR07MB4709.namprd07.prod.outlook.com (52.135.204.159) by BYAPR07MB6088.namprd07.prod.outlook.com (20.179.94.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.14; Wed, 31 Jul 2019 03:49:39 +0000 Received: from BYAPR07MB4709.namprd07.prod.outlook.com ([fe80::41f8:6c26:5cc9:743d]) by BYAPR07MB4709.namprd07.prod.outlook.com ([fe80::41f8:6c26:5cc9:743d%3]) with mapi id 15.20.2115.005; Wed, 31 Jul 2019 03:49:39 +0000 From: Pawel Laszczak To: Felipe Balbi CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "rogerq@ti.com" , "linux-kernel@vger.kernel.org" , "jbergsagel@ti.com" , "nsekhar@ti.com" , "nm@ti.com" , Suresh Punnoose , Jayshri Dajiram Pawar , Rahul Kumar , Anil Joy Varughese Subject: RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string. Thread-Topic: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string. Thread-Index: AQHVNZIWpYuDGK3vWkS+CQXY8vq54abBz0qAgAAB1ECAAAMegIAAAK9ggBNmXgCADvxqMA== Date: Wed, 31 Jul 2019 03:49:39 +0000 Message-ID: References: <1562592924-17528-1-git-send-email-pawell@cadence.com> <87y31768k0.fsf@linux.intel.com> <87sgrf67qi.fsf@linux.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [185.217.253.59] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 69bfb076-b00c-43d5-b3e5-08d7156a1cff x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:BYAPR07MB6088; x-ms-traffictypediagnostic: BYAPR07MB6088: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 011579F31F x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(39860400002)(396003)(376002)(136003)(366004)(189003)(51444003)(199004)(36092001)(107886003)(102836004)(186003)(5660300002)(2906002)(11346002)(25786009)(66066001)(4326008)(54906003)(26005)(6506007)(316002)(9686003)(55016002)(8676002)(6116002)(52536014)(486006)(81166006)(76176011)(256004)(478600001)(53936002)(3846002)(99286004)(7696005)(66476007)(76116006)(6916009)(7736002)(68736007)(64756008)(86362001)(33656002)(8936002)(66946007)(66556008)(66446008)(74316002)(305945005)(81156014)(476003)(71190400001)(6436002)(71200400001)(446003)(14454004)(229853002)(6246003);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB6088;H:BYAPR07MB4709.namprd07.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: cadence.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: glNjAPqQPV4Vsyl1jjIw+nZBYFdE9gk2pUzwiWPvPgqLtA5HNN6/fKt8/FSQzBcyKedr5oxEcgVfXWj5PrS+37PXPALMcwE/2nXOvJZmTYQXAsSMsDgudUKa7diNBSZVACsQ5qgnSfnjwOza6+Me7azwwNM9KGIf705/4TJYBjq62ZBZekIRUhGr7qx4MJWfNv2GFzNIdlxzGKkS7xIzU2Xt60nlH7yxegYBN7N48h//flLFedOMrh1djdUm1bXxfg5XskdsrslMKjJpiapvOgWAZt6FFfW2JBzYNRGKWyfDpiNFfwkR+Rh3HKkkGE6RAKWrCsbWQ1Ufg6H0NGHY2Rr7eX3yJSXjTjvj9+XIZeRHIErQKgiJ5VSf5Zab19KVyXa6EU5t1SnEs0fZ6HlfShf14qKOYCslusNXv5f4+j8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69bfb076-b00c-43d5-b3e5-08d7156a1cff X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2019 03:49:39.1122 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: pawell@global.cadence.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB6088 X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 include:spf.smktg.jp include:_spf.salesforce.com include:mktomail.com include:spf-0014ca01.pphosted.com include:spf.protection.outlook.com include:auth.msgapp.com include:spf.mandrillapp.com ~all X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-07-31_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_check_notspam policy=outbound_check score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907310038 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Felipe, What about this patch. I just noticed that prefix is incorrect "1/3". Can i= t stay or should I send it again ? Cheers, Pawel=20 >>>Pawel Laszczak writes: >>>>>> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h >>>>>> index 69f1b6328532..c156817672c4 100644 >>>>>> --- a/include/linux/usb/otg.h >>>>>> +++ b/include/linux/usb/otg.h >>>>>> @@ -129,4 +129,20 @@ enum usb_dr_mode { >>>>>> */ >>>>>> extern enum usb_dr_mode usb_get_dr_mode(struct device *dev); >>>>>> >>>>>> +/** >>>>>> + * usb_get_dr_mode_from_string - Convert string to dual role mode. >>>>>> + * @str: Pointer to the given string >>>>>> + * >>>>>> + * The function gets string and returns the correspondig enum usb_d= r_mode. >>>>>> + */ >>>>>> +extern enum usb_dr_mode usb_get_dr_mode_from_string(const char *str= ); >>>>>> + >>>>>> +/** >>>>>> + * usb_dr_mode_to_string - Convert dual role mode to string. >>>>>> + * @dr_mode: Pointer to the given dual role mode >>>>>> + * >>>>>> + * The function gets enum usb_dr_mode, and returns the correspondig= string. >>>>>> + */ >>>>>> +extern const char *usb_dr_mode_to_string(const enum usb_dr_mode dr_= mode); >>>>>> + >>>>>> #endif /* __LINUX_USB_OTG_H */ >>>>> >>>>>Still missing the stubs I mentioned. Did you try compiling with and >>>>>without common enabled? >>>>> >>>> Sorry, I thought that I send answer yesterday but it's look like I pre= pared the answer but >>>> I forgot to send. >>>> >>>> In /drivers/usb/Kconfig we have: >>>> >>>> config USB >>>> tristate "Support for Host-side USB" >>>> depends on USB_ARCH_HAS_HCD >>>> select USB_COMMON >>>> >>>> and in /drivers/usb/gadget/Kconfig we have: >>>> >>>> menuconfig USB_GADGET >>>> tristate "USB Gadget Support" >>>> select USB_COMMON >>>> >>>> I think that it should cover all cases. >>>> >>>> Am I right ? >>> >>>Run a few tens of randconfig builds and see if you ever catch any >>>problem. I think randconfig can produce a defconfig where USB=3Dn >>>USB_GADGET=3Dn and USB_COMMON=3Dy. >> >>Ok, I will test it, but I think that it should work. >>The same situation we have for example with: usb_otg_state_string or usb_= ep_type_string. >> > >I've been testing it with USB=3Dn USB_GADGET=3Dn and USB_COMMON=3Dy and al= so only with CONFIG_USB_COMMON=3Dy. >Also I've tested this patch with different default configuration together = with CDNS3 driver which use these functions. >I've test It mainly with x86 and arm architecture. >So far I've not found any issue. >