On Thu, 6 Oct 2011, Matthew Garrett wrote: > On Thu, Oct 06, 2011 at 12:00:47PM -0400, Alan Stern wrote: > > On Thu, 6 Oct 2011, Matthew Garrett wrote: > > > > > Userspace may want to make policy decisions based on whether or not a > > > given USB port is externally visible. Add a per-device member and support > > > for exposing it in sysfs. Information sources to populate it will be > > > added later. > > > > Why do you refer to this as "visibility"? You're really talking about > > whether or not a sub-device of a compound device is removable -- or at > > least, that's the terminology used by the USB spec. (The spec refers > > to ports, but you are attaching the sysfs attribute to devices.) > > > > According to the way you'd do it, in a USB keyboard with a built-in > > hub, the keyboard would be hidden, not visible! > > Mm. Yes, the semantics here are a bit off - I started with the ACPI side > of things, which does use visibility. Removable is probably a better > bet. Any objections to it if that's changed? No particular objections. Why do you store that characteristic explicitly in the device structure, as opposed to determining it whenever the sysfs file is read? The usb_set_device_visibility() routine could be renamed to usb_device_is_removable() and made public so that show_removable() can call it. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html