[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160829080551.GA7987@amd>
Date: Mon, 29 Aug 2016 10:05:52 +0200
From: Pavel Machek <pavel@....cz>
To: Jacek Anaszewski <j.anaszewski@...sung.com>
Cc: Rafał Miłecki <zajec5@...il.com>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Alan Stern <stern@...land.harvard.edu>,
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>
Subject: Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger
Hi!
> >2) Having "ports" subdir with RW files, one per each existing physical port
> >In this situation we don't need "new_port" or "remove_port". If we
> >want port to be observable we just do:
> >echo 1 > 1-1
> >Implementing this solution needs reading more details from USB subsystem.
>
> The situation here is clear IMO - the number of USB ports in the system
> can change dynamically. I'm not sure if this can be handled easily with
> sysfs, where we usually expose an interface for known set of settings.
> struct attribute arrays are usually defined statically at the compile
> time and filled with the variables, that are created with DEVICE_ATTR
> macro.
sysfs already exposes current view of all usb devices. Just use it.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Powered by blists - more mailing lists