Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3764878ybl; Mon, 12 Aug 2019 06:06:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjz57VVWnxg5XniKiGNuUkbftoRgY509zPkOVesVDsADvXxvi/fTsk4EfGPvInKAfuMINF X-Received: by 2002:a17:902:2987:: with SMTP id h7mr32470287plb.37.1565615191556; Mon, 12 Aug 2019 06:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565615191; cv=none; d=google.com; s=arc-20160816; b=1CGs+rD7Ha5J+yClfwynYDU0/Z1eXXJ4OrnVgKDcIhnzPlHqX6jf45Ezm4ATw8Mrwd s/H3ugL0sJId9/EiGZ5CCxkTr7EldPhHVYU3l1JzuCEJCCtn/4Rka3tx0k+d+CSqM7r7 KzTtILSEjxKHtJEAHOGTSGB8WLXEYtdGl0EHuLaqLx+cQM3XHJEGu+EusfBpdMjC8pG+ 7b8Hr1qY3+xHCf1P8XFTh/D0/jvI/OoL0kCO3B9nHLinpCtSHAFsiyp4kHsNQYRIjZQk g8pyTcqYh0XIMEIaUXSKovzv1h6zv9ZM65ZtX3Zm8L5IhcMx585w6woaPV5TIYTiICuZ VGxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+0J8/dXNY2I0HxagR2J8izHTeBMCABSonsYQvwNG014=; b=hZL2pHYq6A68gYDrDRXA7vmIlGYoq0koT3BLqqXFtJesKe0GbbvmIt0wWm7AqOE2bi /llNapV2cWjkBnn6M4QrOB+w0MuZN/xnwPlzMQoIUrBPdS0mYs/nJhZDuWAHQrlwGC53 MCaTuyUTZeMGvK0nwarZU1GYDpisrIoAdLK9xRuQ1AOulK8pr2tzDgLNEuNRxD/dtOQt aksz6hm1+jI52WWgpL+K5d8lhyCqNzsugwdD2mb2nSvELJigemcnfJUyRVuBFfuDWIAM 759bs4GF/BxtCcSmCidF/KCd7u5yq8dAikDEKuQ34AVyVsS29ZGV4Zaie0LyqoOLk5pA f1rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pS3+xUTB; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v40si1936695pjb.7.2019.08.12.06.06.14; Mon, 12 Aug 2019 06:06:31 -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=@ti.com header.s=ti-com-17Q1 header.b=pS3+xUTB; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728693AbfHLNFB (ORCPT + 99 others); Mon, 12 Aug 2019 09:05:01 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58122 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbfHLNFB (ORCPT ); Mon, 12 Aug 2019 09:05:01 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x7CD4u6D069046; Mon, 12 Aug 2019 08:04:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1565615096; bh=+0J8/dXNY2I0HxagR2J8izHTeBMCABSonsYQvwNG014=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=pS3+xUTBTGRFVf8qelsL4jJSeeBrtWlEoPtzu2q8tGCzdlZC58FqK/jYyitJy2o47 Kt2YTFPzWNnwXKc+x++l5XN+G9zNWE8EpXU/5lPiiJ3QhEHDbkcZKN+gSE66BxVWnf Sqjs23IL2LEBCzevVTFeoqDI7PPgtr5e011vexA4= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x7CD4umB067487 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 12 Aug 2019 08:04:56 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 12 Aug 2019 08:04:55 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 12 Aug 2019 08:04:55 -0500 Received: from [192.168.2.14] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x7CD4qFS074187; Mon, 12 Aug 2019 08:04:53 -0500 Subject: Re: [PATCH v10 5/6] usb:cdns3 Add Cadence USB3 DRD Driver To: Felipe Balbi , Heikki Krogerus , Pawel Laszczak CC: "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "jbergsagel@ti.com" , "nsekhar@ti.com" , "nm@ti.com" , Suresh Punnoose , Jayshri Dajiram Pawar , Rahul Kumar , Anil Joy Varughese References: <1563733939-21214-1-git-send-email-pawell@cadence.com> <1563733939-21214-6-git-send-email-pawell@cadence.com> <88742d5b-ee10-cf4e-6724-58e7bdd19cb9@ti.com> <1e557bcf-2d50-f600-0e81-1f9fba5499a1@ti.com> <20190812103147.GA4691@kuha.fi.intel.com> <874l2mtuu6.fsf@gmail.com> From: Roger Quadros Message-ID: <679b82bc-9f33-91ad-4acf-bf6a29e51bc1@ti.com> Date: Mon, 12 Aug 2019 16:04:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <874l2mtuu6.fsf@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/08/2019 15:46, Felipe Balbi wrote: > > Hi, > > Roger Quadros writes: >>> The sysfs file we expose from the class for the role switches is >>> primarily meant for supporting proprietary protocols that require us >>> to basically override the connector USB data role. The default role >>> should always be selected in the drivers. >> >> OK. Let's take this example >> - Port is dual-role port micro AB. >> - microAB to type-A adapter is connected which pulls ID low. port transitions >> to "host" role by the controller driver. >> - proprietary protocol want to switch role to device role so writes "device" to >> mode switch sysfs. port transitions to "device" role. >> >> Now, how does controller driver know to fall back to HW based role switching? > > Use a 'disconnect' or 'suspend' event to go reset it? But that should, > probably, be done at kernel space, no? > Yes that could be one option. So after a disconnect, sysfs role should reflect actual hardware role. correct? cheers, -roger -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki