Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7906359ybi; Mon, 22 Jul 2019 23:16:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2qTPrU0GLENAuz+mqgOLWe8GJ6ehSabirpwxd2SAAcNunOSNbTEy2rehGWtVd8gyqQ9tc X-Received: by 2002:a62:3283:: with SMTP id y125mr4173346pfy.83.1563862592432; Mon, 22 Jul 2019 23:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563862592; cv=none; d=google.com; s=arc-20160816; b=n8Xzw1IVJDe1rlDCyZUohcBie6UzHPqc8Feyfl5a/R+gF8P06uigF8Ese8H2CcniC3 oUt2jvRppfUCcQK8YgzCfakxzIiMSNdVjkEsi8rjEl7rxupuOfpBBvSLGVzWm8lqqDZy kmyLbluV3C0fBO2bd2kGcCL1Rps/UFe2kGPaR7xwFl4RUgLnHcwmsDu93qaY3RDjy2ag bjMOcA/hNrNsrk+tkHg/eQM8lWtaiIBKvgRkcKQdKGeJUPKQsovxqrDlIjBS/TDNkfEc zLFMAKNzvKwwjJiJcAaG8SkNLR5i6gx28AW4CoMLdRBSJcoj/PT/KoRU3PMxYDXSPZmC C2WA== 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:message-id:subject:cc :to:from:date; bh=WElZXlwiKmf7xMkHr2B67Paa6Y82s4iXfot1U5Kd7WA=; b=JOMopTjVvrllO0/ifJvxgGkBVOOKWEJ14ldlEdFbKuCkbDm1j53JqvMQmjJvjXl/Dg ZahcvaDEhrtMWi/M2bvssOxawjjPTPpPfUFkvj8l3hanXrqzSxhYH0J6R3fsZAnscyDm Lp+P8nSJ2zIgbVuxgLS//z4PcB5RRY2gPB/97gjvJcx7gVKk3PF+1vQkAj+GL+AURqiU hPFAEytAINzuYgChz8W1Te/haNEw5jBtUjRS+tXRu2lnbbJFcMnPYC/CThh0t1YGnD6o ltJgkXgHbs+FoIbGrrby2yVSfHZtnBwgU5XIzCSdxaKJr6TMzPezkBHMlaKUWM9qZVPa +6Bg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u17si11562140pgn.387.2019.07.22.23.16.17; Mon, 22 Jul 2019 23:16:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730542AbfGVVAZ (ORCPT + 99 others); Mon, 22 Jul 2019 17:00:25 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55991 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730284AbfGVVAY (ORCPT ); Mon, 22 Jul 2019 17:00:24 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id D5A94802EE; Mon, 22 Jul 2019 23:00:10 +0200 (CEST) Date: Mon, 22 Jul 2019 23:00:21 +0200 From: Pavel Machek To: Pavel Machek Cc: "gregkh@linuxfoundation.org" , Pawel Laszczak , "felipe.balbi@linux.intel.com" , "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 v10 0/6] Introduced new Cadence USBSS DRD Driver. Message-ID: <20190722210021.GA25235@amd> References: <1563733939-21214-1-git-send-email-pawell@cadence.com> <20190721190335.GA19831@xo-6d-61-c0.localdomain> <20190722114839.GA10515@kroah.com> <20190722115644.GA12069@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <20190722115644.GA12069@amd> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2019-07-22 13:56:44, Pavel Machek wrote: > Hi! >=20 > > > >> This patch introduce new Cadence USBSS DRD driver to linux kernel. > > > >> > > > >> The Cadence USBSS DRD Controller is a highly configurable IP Core = which > > > >> can be instantiated as Dual-Role Device (DRD), Peripheral Only and > > > >> Host Only (XHCI)configurations. > > > > > > > >I see you are using debugfs to select between DRD, peripheral-onlyh = and XHCI... > > > > > > > >Is that good idea? > > >=20 > > > Yes driver allows selecting dr_mode by debugfs. Controller also suppo= rt such functionality=20 > > > so I don't understand why would it not be a good idea.=20 > > >=20 > > > I personally use this for testing but it can be used to limit control= ler functionality without=20 > > > recompiling kernel.=20 > >=20 > > debugfs is ONLY for debugging, never rely on it being enabled, or > > mounted, on a system in order to have any normal operation happen. > >=20 > > So for testing, yes, this is fine. If this is going to be the normal > > api/interface for how to control this driver, no, that is not acceptable > > at all. >=20 > It makes a lot of sense for end-user to toggle this... for example > when he is lacking right cable for proper otg detection. As it is > third driver offering this functionality, I believe we should stop > treating it as debugging. At least renesas usb controller seems to have variables in sysfs: drivers/phy/renesas/phy-rcar-gen3-usb2.c : functions role_show and role_store. See also Documentation/ABI/testing/sysfs-platform-phy-rcar-gen3-usb2 . I believe this driver should do same. Thanks and best regards, Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl02I+UACgkQMOfwapXb+vLksgCcDVEb7y8BZQQVDtLc5uhbTm3O 4soAn0QMwPr/VfDUGwp4kC7STMJmZn30 =blsD -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--