Re: [PATCH] usb: typec: Add sysfs node to show cc orientation

2019-10-22 Thread Puma Hsu
Hi Heikki, It’s not necessary to know the cable orientation for a normal user, but we can have statistical analysis at Application layer. For example, it may help investigating user behavior in the future if we can have the count of plugging direction. Besides, we also want to make the unified wa

Re: [PATCH] usb: typec: Add sysfs node to show cc orientation

2019-10-16 Thread Heikki Krogerus
On Wed, Oct 16, 2019 at 03:58:50PM +0300, Heikki Krogerus wrote: > On Wed, Oct 16, 2019 at 11:43:14AM +0800, pumahsu wrote: > > Export the Type-C cc orientation so that user space can > > get this information. > > For what do you need this information in user space? I'm guessing you > have somethi

Re: [PATCH] usb: typec: Add sysfs node to show cc orientation

2019-10-16 Thread Heikki Krogerus
On Wed, Oct 16, 2019 at 11:43:14AM +0800, pumahsu wrote: > Export the Type-C cc orientation so that user space can > get this information. For what do you need this information in user space? I'm guessing you have something else in mind besides exposing this as just generic information, or debuggi

Re: [PATCH] usb: typec: Add sysfs node to show cc orientation

2019-10-16 Thread Greg KH
On Wed, Oct 16, 2019 at 11:43:14AM +0800, pumahsu wrote: > Export the Type-C cc orientation so that user space can > get this information. > > Signed-off-by: pumahsu > --- > Documentation/ABI/testing/sysfs-class-typec | 7 +++ > drivers/usb/typec/class.c | 11 +++ >

Re: [PATCH] usb: typec: Add sysfs node to show cc orientation

2019-10-16 Thread Puma Hsu
Hi Randy, According to include/linux/usb/typec.h, The value of /sys/class/typec//cc_orientation is usually “1”, “2”, or “0” corresponding to “configured in NORMAL side”, “configured in REVERSE side”, or “nothing configured”. Refer to the usage in tcpm.c, it claims CC1 is NORMAL and CC2 is REVERSE.

Re: [PATCH] usb: typec: Add sysfs node to show cc orientation

2019-10-15 Thread Randy Dunlap
On 10/15/19 8:43 PM, pumahsu wrote: > Export the Type-C cc orientation so that user space can > get this information. > > Signed-off-by: pumahsu Hi, what the * is cc orientation? > --- > Documentation/ABI/testing/sysfs-class-typec | 7 +++ > drivers/usb/typec/class.c | 1