Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1581301ybb; Thu, 2 Apr 2020 03:39:30 -0700 (PDT) X-Google-Smtp-Source: APiQypLTWx5oxZTGNyKPaEP2ktPDGmxQoNUb5mTDhkaxYV8vNXaGm6ddux0DTJkKpgCMk9cOWvUl X-Received: by 2002:a05:6830:1003:: with SMTP id a3mr1923981otp.128.1585823970142; Thu, 02 Apr 2020 03:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585823970; cv=none; d=google.com; s=arc-20160816; b=LJzq3mhHIGXliTKoAFB9krpr6/SmAwF+7gWG8WzeWKJKLXHEcium/Mgy//emfZP6MR 6l6YsJpBn7ug4TRCB0dHiykfIUfEXVEehFJdePGdic3UvxGx0Z4OseXP7AdA1LRoJa2u ZeJvXTr+CV5F/AR7DhbpJB1ovWkeHHNuM1HdrqhwfhNh5CCxVi254dHeCtTiV1cjQ/z5 Sa2cmgQLstMZxsWapYA9VJsRQjRxk1KbHe5vj01JC8clEJp/t612dii8zZ11ZSAF0e22 JT/DVxoY7kL6yWjnxroopGOxsdWKR8fpuyn7y8ndIPCosTAnPSLABUfIg+IgflvFel/H rnwQ== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=L6Lll7LeV8nPCyvL7f4nDA3zgXRAvj5G/x6GbCl1++U=; b=i3akxs0mObIo5A47jJ6iNIZeYXQJv4OiYqmzTorkvcqfHG5K0yvwI1BNjOIN/I+yJz iahdFCG7Q01yxEx1hXLiLCPUTt+QKvpTVNCIMlrdu7+n6ASWe0XiDLs59bFtSOG4IE6B CIgkN0mY+8p1Gi1h87ktV9MuvxwLrKEmqxLYHr7uM3XF9oQvaVVwLMObUq8xHArFqiLH 6uC8krG8LGKHQ5tXCsXWVfwcXbUbN1jNNrvZIaHS2n+8lk4X0GlHm/zwkAfpnP0SPRtY 9Ml4VuK8nyKZkp91wCzaCXblUfzWx3nmFqm74K8vdOuK4JZYngKlfbKcopWd6CUsvzmB /8gQ== 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 i13si2582412otk.236.2020.04.02.03.39.18; Thu, 02 Apr 2020 03:39:30 -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 S2387958AbgDBKij (ORCPT + 99 others); Thu, 2 Apr 2020 06:38:39 -0400 Received: from kernel.crashing.org ([76.164.61.194]:37650 "EHLO kernel.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728612AbgDBKii (ORCPT ); Thu, 2 Apr 2020 06:38:38 -0400 Received: from localhost (gate.crashing.org [63.228.1.57]) (authenticated bits=0) by kernel.crashing.org (8.14.7/8.14.7) with ESMTP id 032Abb5C028468 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Apr 2020 05:37:40 -0500 Message-ID: Subject: Re: [PATCH v2 6/6] dt-bindings: usb: document aspeed vhub device ID/string properties From: Benjamin Herrenschmidt To: Rob Herring Cc: rentao.bupt@gmail.com, Felipe Balbi , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery , Chunfeng Yun , Colin Ian King , Stephen Boyd , Mark Rutland , Linux USB List , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , OpenBMC Maillist , Tao Ren Date: Thu, 02 Apr 2020 21:37:35 +1100 In-Reply-To: References: <20200315191632.12536-1-rentao.bupt@gmail.com> <20200315191632.12536-7-rentao.bupt@gmail.com> <20200330192347.GA6388@bogus> <4dc3ac910c79dcca398eb5161dde44e1cc50baca.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-03-31 at 10:21 -0600, Rob Herring wrote: > Surely the descriptor building code can be shared at a minimum. > > Regardless of whether gadget configfs fits, usually it is pretty clear > whether something belongs in DT or userspace. That should be decided > first. > > > Maybe we could expose the port as UDCs but not actually expose them on > > the bus until the hub is "activated" via a special configfs entry... > > If control of the hub is done by userspace, I'd think configuration > should be there too. It's not in the current driver. For now, I expose the hub when the driver loads/initializes, and it creates UDCs for each port, which are then controlled from userspace. That said, I did it this way because it was easy, not because there are fundamental reasons to do so... The main reason to want to change the hub descriptor is for the device to advertise a vendor/device ID rather than our generic linux one, which some vendors might want to do for ... reasons. I didn't implement that functionality initially as in openbmc case, we didn't care. But I know some vendors would like to, if anything because from a user perspective, it's actually nice to have the string tell you that it's your BMC rather than Linux Fundation Hub. Originally I suggested we allow that via the device-tree because it was the simplest way to get there and I love have to deal with less code .. :) However, if we want to support the whole language string set etc... it gets really clumsy. So if there's a strong will to get there all the way, then configfs is probably the way to go. In that case, some sugery will probably be needed to make the gadget descriptor building code a bit less dependent on the overall gadget stuff... either that, or pre-create a "hub" gadget at driver loading time that userspace can modify before "plugging". In that case, the discussion should move back to linux-usb... Cheers, Ben.