Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1471647
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger |
| Date | 2016-08-29 10:50 +0200 |
| Message-ID | <sbqqt-538-3@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <sa7SV-4G3-3@gated-at.bofh.it> <sarHX-B0-5@gated-at.bofh.it> <sbpE6-4vC-19@gated-at.bofh.it> <sbpNM-4Om-41@gated-at.bofh.it> <sbq78-4Wv-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 2016-08-29 10:21:48, Rafał Miłecki wrote: > On 29 August 2016 at 10:05, Pavel Machek <pavel@ucw.cz> wrote: > >> >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. > > We're talking about USB ports not devices, but this is still true. You > can find them in > /sys/bus/usb/devices/*/*-port* > > I can't see how we could use them. How could I develop sysfs interface > in /sys/class/leds/*/ to allow userspace assigning USB ports to the > LED trigger? Create /sys/bus/usb/devices/*/*-port*/led_trigger file? (Do you plan one USB trigger, or multiple ones?) Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-08-25 16:50 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-08-25 20:50 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-08-25 21:40 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-08-25 22:10 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-26 18:00 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-08-29 10:00 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Pavel Machek <pavel@ucw.cz> - 2016-08-29 10:10 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-29 10:30 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Pavel Machek <pavel@ucw.cz> - 2016-08-29 10:50 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-29 11:10 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Pavel Machek <pavel@ucw.cz> - 2016-08-26 22:00 +0200
Re: [PATCH RFC V3.5] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-08-29 10:40 +0200
csiph-web