Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp731419img; Thu, 28 Feb 2019 07:02:54 -0800 (PST) X-Google-Smtp-Source: AHgI3IaVnxbe15evtEHE+eOOyk5oG/v1eod+4BynQOGSQ4Hy7P3+/++1WThT3eSwT3VZYgTJZbL3 X-Received: by 2002:a17:902:2e03:: with SMTP id q3mr8643387plb.330.1551366174028; Thu, 28 Feb 2019 07:02:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551366174; cv=none; d=google.com; s=arc-20160816; b=MJLclcpS+srbKQKV0xW0FEVFcTeU0xntHiUnXoBI8iAb8Cvm5txZZLgMZ+S5F7IsMm xMVVYsui/3XljfoCtOfcMWujFX0IMhemINdlnxE5SKPtZqJJMkPp9De+c5/02ejuxjHc v/M0siI6Yn9fKIqDZIW7vZb19SeJ3sGz4DXv0r86fpawODfe0KvHDNPf14JzMnJEEUZt F2GfLbfjEIkTaLSRapUlrItL9YOL1vDFtAfxP23eB9BR+kKDhx8oFwy/MA/2RWfU4Nec FEONxg+LH6ocpLj4hYvgX8NxXQYSUeHylw3+06ecCZfkS10rAcCHr4MLSFC7sTHGvKbq lyJA== 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 :message-id:date:subject:cc:to:from; bh=7+sB7OJOjX2PW2CMjYc4IpkqZOp10ZRlEN201/mbxVE=; b=MoHsk5nDWN1LFJT5CYuCi1OJkt4VggdBTG+5DP5m7T4GV/QVV8c0tGR4rfXAQCh21w 1WYJXxwkYyPHMBgtI3KJTwJwkNQFNfBV7HJd1a1bXS29di1ci6hZ49FmdHj07azgBbGG 0082Sl9ixljch0bIpd4zDbeaLZsQiN5UKgCfmeR7jbnncrSm66g1H46i1wUiMadHNGx8 qu2pnW1acRSvcmE+ReLrytgR4hX8htupvcqsdwIYKZvHi4J64BLm10oi+0GzdPSkJk1+ mcypkzBNmVjUzds4uA/SP648sknop7tKIctg7meCUFR2Z4u7fyiGxL5D8ipbtGdTM5Y5 L71g== 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 a74si1224012pfj.20.2019.02.28.07.02.37; Thu, 28 Feb 2019 07:02:54 -0800 (PST) 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 S1732835AbfB1Od6 (ORCPT + 99 others); Thu, 28 Feb 2019 09:33:58 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:47880 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725918AbfB1Od6 (ORCPT ); Thu, 28 Feb 2019 09:33:58 -0500 Received: by unicorn.mansr.com (Postfix, from userid 51770) id 3232015632; Thu, 28 Feb 2019 14:33:56 +0000 (GMT) From: Mans Rullgard To: Rob Herring , Mark Rutland Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC][PATCH] dt-bindings: usb: add non-removable device property Date: Thu, 28 Feb 2019 14:33:44 +0000 Message-Id: <20190228143344.16312-1-mans@mansr.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a boolean property indicating that a device is hardwired to the upstream port. Although hubs can provide this information, they are not always configured correctly. An alternate means of indicating this for built-in USB devices is thus useful. Signed-off-by: Mans Rullgard --- I have a situation where userspace would like to know which USB devices are built-in, but the on-board hub doesn't have the right setting. Also, the hub itself can't be indicated as fixed in any other way that I'm aware of. In a way, adding this property seems a bit silly since dt can only sensibly be used for hardwired devices in the first place. Thus the mere presence of a dt node could be taken to indicate the same thing. On the other hand, it's conceivable that someone might dynamically generate a devicetree based on what happens to be connected on boot or something. For that reason, and explicit property seems safer. --- Documentation/devicetree/bindings/usb/usb-device.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/usb-device.txt b/Documentation/devicetree/bindings/usb/usb-device.txt index 036be172b1ae..903d39b7e415 100644 --- a/Documentation/devicetree/bindings/usb/usb-device.txt +++ b/Documentation/devicetree/bindings/usb/usb-device.txt @@ -26,6 +26,10 @@ Required properties for device nodes: - reg: the number of the USB hub port or the USB host-controller port to which this device is attached. The range is 1-255. +Optional properties for device nodes: +- non-removable: boolean, if present the device is hardwired to the + upstream port. + Required properties for device nodes with interface nodes: - #address-cells: shall be 2 @@ -55,6 +59,10 @@ Required properties for combined nodes: - reg: the number of the USB hub port or the USB host-controller port to which this device is attached. The range is 1-255. +Optional properties for combined nodes: +- non-removable: boolean, if present the device is hardwired to the + upstream port. + Required properties for hub nodes with device nodes: - #address-cells: shall be 1 -- 2.20.1