linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>,
	Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: "Rafał Miłecki" <zajec5@gmail.com>,
	"Richard Purdie" <rpurdie@rpsys.net>,
	"Felipe Balbi" <balbi@kernel.org>,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Peter Chen" <hzpeterchen@gmail.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Ezequiel Garcia" <ezequiel@vanguardiasur.com.ar>,
	"Stephan Linz" <linz@li-pro.net>,
	"Matthias Brugger" <mbrugger@suse.com>,
	"Boris Brezillon" <boris.brezillon@free-electrons.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	"open list:LED SUBSYSTEM" <linux-leds@vger.kernel.org>,
	"Pavel Machek" <pavel@ucw.cz>
Subject: Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger
Date: Thu, 25 Aug 2016 20:48:04 +0200	[thread overview]
Message-ID: <57BF3D64.3090402@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1608251026010.1827-100000@iolanthe.rowland.org>

On 08/25/2016 04:30 PM, Alan Stern wrote:
> 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...

Right, I forgot to add a note here, that this follows space
separated list pattern similarly as in case of triggers attribute.
Of course other suggestions are welcome.

>>>> 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.

I've found only idProduct and idVendor files. They indeed uniquely
identify the device, but the numbers are not human readable.
Is there a way to retrieve the corresponding names in kernel?
Does the lsusb command do the mapping in the user space or maybe
it takes the names from kernel?

-- 
Best regards,
Jacek Anaszewski

  reply	other threads:[~2016-08-25 18:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 22:03 [PATCH V3] leds: trigger: Introduce an USB port trigger Rafał Miłecki
2016-08-24  9:21 ` Greg KH
     [not found]   ` <20160824092129.GA23180-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-08-24  9:26     ` Rafał Miłecki
2016-08-24 21:04       ` Greg KH
2016-08-24  9:22 ` Greg KH
2016-08-24  9:29   ` Rafał Miłecki
2016-08-24 21:04     ` Greg KH
2016-08-25  5:14       ` Rafał Miłecki
2016-08-25 12:53         ` Greg KH
2016-08-25 18:39           ` Bjørn Mork
2016-08-25 20:55             ` Greg KH
2016-08-24 10:49 ` Matthias Brugger
2016-08-24 11:02   ` Rafał Miłecki
2016-08-24 11:27     ` Matthias Brugger
2016-08-24 17:52 ` [PATCH RFC V3.5] " Rafał Miłecki
2016-08-24 18:48   ` Bjørn Mork
2016-08-24 20:42     ` Rafał Miłecki
2016-08-25  8:03   ` Jacek Anaszewski
2016-08-25  8:27     ` Matthias Brugger
2016-08-25  8:29     ` Rafał Miłecki
2016-08-25  9:04       ` Jacek Anaszewski
2016-08-25 14:30         ` Alan Stern
2016-08-25 18:48           ` Jacek Anaszewski [this message]
2016-08-25 19:35             ` Alan Stern
2016-08-25 20:08               ` Alan Stern
2016-08-26 15:58             ` Rafał Miłecki
2016-08-29  7:41               ` Jacek Anaszewski
2016-08-29  8:05                 ` Pavel Machek
2016-08-29  8:21                   ` Rafał Miłecki
2016-08-29  8:41                     ` Pavel Machek
2016-08-29  9:01                       ` Rafał Miłecki
2016-08-26 19:50             ` Pavel Machek
2016-08-29  8:29               ` Jacek Anaszewski
2016-08-26 19:48         ` Pavel Machek
2016-08-25  8:32     ` Rafał Miłecki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57BF3D64.3090402@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=balbi@kernel.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=corbet@lwn.net \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hzpeterchen@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linz@li-pro.net \
    --cc=mbrugger@suse.com \
    --cc=pavel@ucw.cz \
    --cc=rafal@milecki.pl \
    --cc=rpurdie@rpsys.net \
    --cc=stern@rowland.harvard.edu \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).