[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1608251026010.1827-100000@iolanthe.rowland.org>
Date: Thu, 25 Aug 2016 10:30:45 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Jacek Anaszewski <j.anaszewski@...sung.com>
cc: Rafał Miłecki <zajec5@...il.com>,
Richard Purdie <rpurdie@...ys.net>,
Felipe Balbi <balbi@...nel.org>,
Greg KH <gregkh@...uxfoundation.org>,
Peter Chen <hzpeterchen@...il.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
Rafał Miłecki <rafal@...ecki.pl>,
Jonathan Corbet <corbet@....net>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
Stephan Linz <linz@...pro.net>,
Matthias Brugger <mbrugger@...e.com>,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
"open list:DOCUMENTATION" <linux-doc@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:LED SUBSYSTEM" <linux-leds@...r.kernel.org>,
Pavel Machek <pavel@....cz>
Subject: Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger
On Thu, 25 Aug 2016, Jacek Anaszewski wrote:
> I'd see it as follows:
>
> #cat available_ports
> #1-1 1-2 2-1
>
> #echo "1-1" > new_port
>
> #cat observed_ports
> #1-1
>
> #echo "2-1" > new_port
>
> #cat observed_ports
> #1-1 2-1
>
> We've already had few discussions about the sysfs designs trying
> to break the one-value-per-file rule for LED class device, and
> there was always strong resistance against.
This scheme has multiple values in both the available_ports and
observed_ports files. :-( Not that I have any better suggestions...
> >> Also a description of the device connected to the port would be a nice
> >> feature, however I am not certain about the feasibility thereof.
> >
> > What kind of description do you mean? Where should it be used / where
> > should it appear?
> >
>
> Product name/symbol. Actually it should be USB subsystem responsibility
> to provide the means for querying the product name by port id, if it
> is possible at all.
cat /sys/bus/usb/devices/PORT/product
cat /sys/bus/usb/devices/PORT/manufacturer
These will work if there is a device registered under PORT.
Alan Stern
Powered by blists - more mailing lists