From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752683AbcGMPGW (ORCPT ); Wed, 13 Jul 2016 11:06:22 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:34961 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbcGMPGM convert rfc822-to-8bit (ORCPT ); Wed, 13 Jul 2016 11:06:12 -0400 MIME-Version: 1.0 In-Reply-To: <578654A7.2020909@samsung.com> References: <1468326921-26485-1-git-send-email-zajec5@gmail.com> <1468413734-9569-1-git-send-email-zajec5@gmail.com> <1468413734-9569-3-git-send-email-zajec5@gmail.com> <578654A7.2020909@samsung.com> From: =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= Date: Wed, 13 Jul 2016 17:05:32 +0200 Message-ID: Subject: Re: [PATCH V2 PROOF OF CONCEPT 2/1] trigger: ledtrig-usbport: read initial state from DT To: Jacek Anaszewski Cc: Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "open list:LED SUBSYSTEM" , "devicetree@vger.kernel.org" , Richard Purdie , open list , Rob Herring , Mark Rutland , Felipe Balbi Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13 July 2016 at 16:48, Jacek Anaszewski wrote: > On 07/13/2016 02:42 PM, Rafał Miłecki wrote: >> >> This allows specifying USB ports that should be observed by a trigger >> right after activating it. Example: >> >> usb { >> gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; >> linux,default-trigger = "usbport"; >> usb-controllers = <&ohci>, <&ehci>, <&xhci USB_HCD_SHARED>; >> usb-ports = "1", "1", "1"; > > > Port is a numerical value, right? > Wouldn't it be better to define it as an array of integers? > > e.g.: usb-ports = <1>. <1>, <1>; Not always. Let me quote this part of "usbport" documentation: > This also allows handling devices with internal hubs (when root hub's port has > always a device (hub) connected). User can simply specify specify internal hub > ports then (e.g. 1-1.1, 1-1.2, etc.). In such case we'd need usb-ports = "1.1", "1.2"; Anyway, there is a discussion ongoing in: [PATCH V2 0/1] usb: add HCD providers so let's see if someone will have a better idea for referencing USB ports inside DT.