Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-03 Thread Heikki Krogerus
On Wed, Oct 02, 2019 at 08:51:32PM -0700, Guenter Roeck wrote: > On 10/2/19 12:16 PM, Heikki Krogerus wrote: > > On Wed, Oct 02, 2019 at 07:06:55PM +0300, Heikki Krogerus wrote: > > > This is a bit off topic, but that attribute file is really horrible. > > > Right now there is no way to know the ac

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-03 Thread Heikki Krogerus
On Wed, Oct 02, 2019 at 08:45:28PM -0700, Guenter Roeck wrote: > On 10/2/19 11:29 AM, Heikki Krogerus wrote: > > On Wed, Oct 02, 2019 at 09:36:39AM -0700, Guenter Roeck wrote: > > > port->cap->type used to be the role provided by the low level driver. > > > That was static, and it was not possible

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-02 Thread Guenter Roeck
On 10/2/19 12:16 PM, Heikki Krogerus wrote: On Wed, Oct 02, 2019 at 07:06:55PM +0300, Heikki Krogerus wrote: This is a bit off topic, but that attribute file is really horrible. Right now there is no way to know the actual capability of the port in user space. If something changes a DRP port int

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-02 Thread Guenter Roeck
On 10/2/19 11:29 AM, Heikki Krogerus wrote: On Wed, Oct 02, 2019 at 09:36:39AM -0700, Guenter Roeck wrote: port->cap->type used to be the role provided by the low level driver. That was static, and it was not possible to override it. It did not resemble the current port type, or a configured por

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-02 Thread Heikki Krogerus
On Wed, Oct 02, 2019 at 07:06:55PM +0300, Heikki Krogerus wrote: > This is a bit off topic, but that attribute file is really horrible. > Right now there is no way to know the actual capability of the > port in user space. If something changes a DRP port into sink or > source, there is no way to kn

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-02 Thread Heikki Krogerus
On Wed, Oct 02, 2019 at 09:36:39AM -0700, Guenter Roeck wrote: > port->cap->type used to be the role provided by the low level driver. > That was static, and it was not possible to override it. It did not > resemble the current port type, or a configured port type, it resembled > port capabilities.

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-02 Thread Guenter Roeck
On Wed, Oct 02, 2019 at 07:06:52PM +0300, Heikki Krogerus wrote: > On Tue, Oct 01, 2019 at 06:08:17AM -0700, Guenter Roeck wrote: > > On 10/1/19 2:48 AM, Heikki Krogerus wrote: > > > Copying everything from struct typec_capability to struct > > > typec_port during port registration. > > > > > What

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-02 Thread Heikki Krogerus
On Tue, Oct 01, 2019 at 06:08:17AM -0700, Guenter Roeck wrote: > On 10/1/19 2:48 AM, Heikki Krogerus wrote: > > Copying everything from struct typec_capability to struct > > typec_port during port registration. > > > What is the purpose of this patch ? To reduce the number of indirections at > run

Re: [PATCH 1/7] usb: typec: Copy everything from struct typec_capability during registration

2019-10-01 Thread Guenter Roeck
On 10/1/19 2:48 AM, Heikki Krogerus wrote: Copying everything from struct typec_capability to struct typec_port during port registration. What is the purpose of this patch ? To reduce the number of indirections at runtime, or to avoid having to have cap around ? FWIW, it looks like the code do