Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1476227
| From | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V4] leds: trigger: Introduce an USB port trigger |
| Date | 2016-09-05 11:30 +0200 |
| Message-ID | <sdYo2-1OC-21@gated-at.bofh.it> (permalink) |
| References | <sdoDT-Pk-11@gated-at.bofh.it> <sdttT-3NN-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 4 September 2016 at 02:24, Alan Stern <stern@rowland.harvard.edu> wrote: > On Sat, 3 Sep 2016, Jacek Anaszewski wrote: > >> >> The remaining issue is the sysfs interface design for defining and >> >> presenting multiple USB ports. I'm still in favour of a single >> >> attribute with space separated list. This scheme is commonly used >> >> in existing interfaces. >> > >> > No such interface is needed if you do things the way I outlined above. >> > Each trigger would require the user to specify either one port, one >> > hub, or nothing at all. Multiple ports would not be used. >> >> The patch assumes that it is possible to register trigger for many >> ports. > > The patch could be changed to remove that assumption. I did this assumption for a reason. There are many devices with more than 1 USB port and these ports are handled by the same controllers, just different ports. Let me share USB details of my SmartRG SR400ac device with 2 physical USB ports: Physical USB 3.0 port is handled by following controllers and their root hub ports: 1) OHCI's port 1 2) EHCI's port 1 3) XHCI's port 1 Physical USB 2.0 port is handled by following controllers and their root hub ports: 1) OHCI's port 2 2) EHCI's port 2 This devices has 3 separated LEDs. I'll list them and tell which ports should be assigned to them: bcm53xx:green:usb3 should have assigned: 1) OHCI's port 1 2) EHCI's port 1 bcm53xx:white:usb3 should have assigned: 1) XHCI's port 1 bcm53xx:white:usb2 should have assigned: 1) OHCI's port 2 2) EHCI's port 2 As you can see, I need to specify ports precisely. Assigning a single port is not enough. Assigning whole hub is too much. So none of: > echo usb1-4.2 >/sys/class/led/foo/trigger > echo hub1-4 >/sys/class/led/foo/trigger > echo usb >/sys/class/led/foo/trigger would be sufficient here :( -- Rafał
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Greg KH <gregkh@linuxfoundation.org> - 2016-08-25 15:00 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-26 17:40 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Greg KH <gregkh@linuxfoundation.org> - 2016-08-30 14:10 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-30 22:30 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-08-30 23:00 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-30 23:20 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-08-31 20:30 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-08-31 21:20 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-09-01 07:30 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-01 09:30 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-09-01 16:40 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-02 09:00 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-09-02 16:40 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-09-03 17:20 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-09-03 17:20 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2016-09-03 21:20 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Alan Stern <stern@rowland.harvard.edu> - 2016-09-04 02:30 +0200
Re: [PATCH V4] leds: trigger: Introduce an USB port trigger Rafał Miłecki <zajec5@gmail.com> - 2016-09-05 11:30 +0200
csiph-web