Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp969148img; Thu, 28 Feb 2019 10:44:33 -0800 (PST) X-Google-Smtp-Source: APXvYqyfh0/0uuCgPBrBkTX59OqSm/pb8ZIGnG7JQ8DVOUZbHFcmuj3QsWXoe1UC1hKe9KLRbpaR X-Received: by 2002:a17:902:bb90:: with SMTP id m16mr851850pls.49.1551379473781; Thu, 28 Feb 2019 10:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551379473; cv=none; d=google.com; s=arc-20160816; b=sWIhjyG2FqI09R86YR/AOympK7B95ek2Pn78aMo4N6ripuz3PL9s/oq/JkZK1wjE6w /lVUxOpWrBEv94gBXGFLJeBGMEy18xXwgqsGjdtJqajIeUiiHPLQd6YKxG2NgURQtfGq hJDVb20W/Ku297gdqwn6rGoixuVswopIVr4Ste6nUEUHk6EuXCXgJMxysZT+dRKhJZfV Z/dsfbL+urV+423bt0fh12B4ij7NygOQmnHNHcY+B67JVDcuG3r7yXmJGrx8ccNI9133 k8ykUpR7L6u4PBcI8WBwyhohKZc1r6YanZLJ2ICSN1+4ksnu9IOZsinPjuaKmLYymgVX urBg== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UdiU4TByCgPXjxVLwlQw6RhWV5zKDScn07zAdy1c89E=; b=gSE6naCds8TLw1nas7ZepDS+7B05t5l2IG9sx/mGo+quPI5h8032TMEM2fY/uEugNx iP3zgdWLLIYEbA8EsHePGvMeDSyRfZ6R59p6CkZDYm+hIcjqVX+jF41HN7cdKD5ZuufF 0sdDUrSidtyigUICrlgP1x4V/Ocs/cWlUWPacap7gXwOQCfua0WfW83KYnfzMCx9xsun ZPcgwyAKMEqd0l6ze6MVWngCHmp0gjND01GlFcT4quZviy80BxJnFGflkd/tgALRphc1 rhEae5RJs73gV1+155mr3jj77VuR9EvOfTDXLR0hiUqtIB34v/oCMapcjSwH9SHzgC5U KKnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=giUy9BNN; 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 n8si18365387pgh.258.2019.02.28.10.44.18; Thu, 28 Feb 2019 10:44:33 -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; dkim=pass header.i=@kernel.org header.s=default header.b=giUy9BNN; 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 S2388538AbfB1SGX (ORCPT + 99 others); Thu, 28 Feb 2019 13:06:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:56592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727499AbfB1SGW (ORCPT ); Thu, 28 Feb 2019 13:06:22 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62CBC20863; Thu, 28 Feb 2019 18:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1551377181; bh=8Uuxb/lFsJ0rC6cZGz3qtixJcwx5rjLc+xYmengBaV8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=giUy9BNN7disBe/HLmiU5gQoCF2ruLeTJUXPXtTA0graBp4+hjHPVUNqdbfgiYLnW D1Eie/tyLl/XXIjng3GC593lBbeOGsAith+SS7PkQ2bHc2JjYkJKMXPfDb+kV3Li9O oS+jkWEKxD5YeuhI3gjBAnuRSJCH7JJFrcapnX9w= Date: Thu, 28 Feb 2019 19:06:19 +0100 From: Greg Kroah-Hartman To: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= Cc: Rob Herring , Mark Rutland , linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property Message-ID: <20190228180619.GB30532@kroah.com> References: <20190228143344.16312-1-mans@mansr.com> <20190228151330.GA1360@kroah.com> <20190228155241.GC12050@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 28, 2019 at 05:34:25PM +0000, M?ns Rullg?rd wrote: > >> --- a/drivers/usb/core/hub.c > >> +++ b/drivers/usb/core/hub.c > >> @@ -2392,6 +2392,14 @@ static void set_usb_port_removable(struct usb_device *udev) > >> break; > >> } > >> > >> + /* > >> + * Otherwise, check whether DT indicates this device is non-removable. > >> + */ > >> + if (of_property_read_bool(udev->dev.of_node, "non-removable")) { > >> + udev->removable = USB_DEVICE_FIXED; > >> + return; > >> + } > > > > Shouldn't this be an attribute of the USB hub's port, not the device > > itself? That's the way it works with ACPI, and odds are any description > > of USB devices in DT is also going to look much like how ACPI describes > > the devices, let's not try to diverge when it is not necessary. > > Fine with me. That's why I asked. > > How about a non-removable-ports property in the hub node listing the > hardwired ports? Sounds reasonable to me as that should mirror what happens in ACPI, so you should be able to just mirror what drivers/usb/core/usb-acpi.c does for dt. thanks, greg k-h