Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp711111img; Fri, 22 Mar 2019 07:05:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaoJ5To9Y3aRk5WlK1e0qORic+MK+83WahbhHuJtureDZfFqDH/HUa0thh1YmQ7KtivwjK X-Received: by 2002:a63:2ad4:: with SMTP id q203mr9319987pgq.43.1553263512265; Fri, 22 Mar 2019 07:05:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553263512; cv=none; d=google.com; s=arc-20160816; b=KFvVtatJil38dAPlSY7UBmZ1Oj7fDlSjRUNEkIvskkl3juk0TIB71+6+uYcEf2cKI0 m5hx+n9H/ASvVxfVDEwgxNoNgF5uPi31MuYf+D9lE8qj4iR4NoKiumxuxcOx/NX3rDJI hcwMdggfq0mFOUJ8MHQ0XUGtOkCLTa11SadvZ9quKkkMJgjtbzGpgTSYMD+CBh6eek0h GgxpI57EIA9QqAogdyo71T+6uQMddxrIEdpVSPijG+7e4Lp1pENbYD5tIm9Mo01u5mmv O9UGKNrdNikJfFdUaQCcE0v7P1WFr9nyhWMoGsaGQpjGZmQ7Vu6xvdh27sG7gXJAciB7 cppA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=ut3ejAwdnl3Z9KXHbgo43PzWaKiBK/c6CzyK3VBCv8s=; b=cmUZkFfqJDBOgHKBn+/HuyjTmBGm0lp+auik3OxeH+kGdCrz/0gYzv18S/VK2zCuax j5xLzsau+sdrxLNlYTeUL4Qqi7lL7ZA3i5qcFNnHtkMOOfOp3v6Kr624PMEJA+eUdWKm EfkFTwlRdYedU+e3p505KQGJedvKLZObf8fcYVFmzoGDUW7qH7eFyByfMJ96gMoSdy5/ xX/LKZXqhjyYRI/BeER4G9Ysgtw/Vvjg98qZyoeg4WhSHaWL0WCaXaB5AYYNbpaQxtmb CJQUuBrMtzjrUDWllDcJmNKHjpp6lhUVv0IWPn8QTXEokTWuLkprwOkoPxcM1aGk5Dtl 5vKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HOsjRto2; 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 n3si11881plb.58.2019.03.22.07.04.56; Fri, 22 Mar 2019 07:05:12 -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=HOsjRto2; 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 S1727961AbfCVOEN (ORCPT + 99 others); Fri, 22 Mar 2019 10:04:13 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43136 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbfCVOEN (ORCPT ); Fri, 22 Mar 2019 10:04:13 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2ME45e2027885; Fri, 22 Mar 2019 09:04:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553263445; bh=ut3ejAwdnl3Z9KXHbgo43PzWaKiBK/c6CzyK3VBCv8s=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=HOsjRto2zAqjrMiUJU0N9rq3zCTVSacxqxdJbA60kRTD1Pq7wdGpeKhz8oNXzuvC7 387AMk66mi8SSnuKorYPDoOCqmUigJZSaK/GTjea2bUgRIFwnueysq3pEZ0UJ6+nWs zNcL+CsZWBcUbaFe2c/eVXlNhMKScTUlgDeq0SI4= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2ME45xQ037397 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 22 Mar 2019 09:04:05 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 22 Mar 2019 09:04:04 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Fri, 22 Mar 2019 09:04:04 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2ME44Bi026371; Fri, 22 Mar 2019 09:04:04 -0500 Date: Fri, 22 Mar 2019 09:04:04 -0500 From: Bin Liu To: Maxime Ripard CC: Greg Kroah-Hartman , Paul Kocialkowski , Paul Kocialkowski , , , Chen-Yu Tsai Subject: Re: [PATCH] usb: musb: Support gadget mode when the port is set to dual role Message-ID: <20190322140404.GH25852@uda0271908> Mail-Followup-To: Bin Liu , Maxime Ripard , Greg Kroah-Hartman , Paul Kocialkowski , Paul Kocialkowski , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Chen-Yu Tsai References: <1522324644.1746.19.camel@bootlin.com> <20180420142524.GB29011@uda0271908> <2db056d6f65ecbcdc4f31a37fe2e1b1ddfb93c87.camel@paulk.fr> <20180421143426.GA10632@LTA0271908.dhcp.ti.com> <20190321130133.zllt5pqbrhiecoch@flea> <20190321164138.GB11121@kroah.com> <20190322124622.GB25852@uda0271908> <20190322130953.kb4llrtz2nriyfbu@flea> <20190322132846.GD25852@uda0271908> <20190322134630.c4cauwj5smxvj77y@flea> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20190322134630.c4cauwj5smxvj77y@flea> User-Agent: Mutt/1.5.21 (2010-09-15) 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 Hi all, On Fri, Mar 22, 2019 at 02:46:30PM +0100, Maxime Ripard wrote: > > > > Again, think about an embedded product, > > That's all I'm thinking about. > > > if dr_mode is 'otg' which indicates the peripheral mode will be used > > at some point > > No, it indicates that it *might* be used at some point, based on a > number of external factors, including: > - Whether or not the user has plugged something in the connected USB > connector > - If they did so, how the ID pin has been wired (and therefore, is > a device or a host on the other end) > - And how the system designer decided to configure their kernel and > userspace. > > > when and how to load the gadget driver if it is not loaded > > automatically when Linux boots up? the end user doesn't have access > > to the console. > > An application could load it. And really, we start seeing SoCs in more > and more pc-like devices, including with mUSB, so I don't think we > should be making assumptions here. > > How do you think Fedora, Ubuntu or Debian would behave here? > > > > Because no other controller requires it and therefore it's not > > > standard and violates the principle of least surprise? > > > > I know no other controller does this, but this doesn't mean it is not > > standard. > > I'm pretty sure that would be the definition of "standard", or of a > norm at least. > > > > And even without taking this into account, there's also the fact that > > > while the *hardware* can do dual role, the software might decide > > > otherwise. If I don't want to have support for any gadget (at all) in > > > the end system, then why should I be forced to compile and load > > > something I don't even want to use in the first place? > > > > then dr_mode should be set to 'host' instead, you don't have to load a > > gadget if peripheral mode will never be used. > > No. The hardware is perfectly capable of using OTG. The software has > been configured not to. I don't think the argument will lead to anywhere. Let's stop arguing here, so that you can spend time to fix the driver if you want to. Regards, -Bin.