mbox series

[v4,00/10] usb: typec: A few more improvements for Intel CHT

Message ID 20180911101044.44004-1-heikki.krogerus@linux.intel.com (mailing list archive)
Headers show
Series usb: typec: A few more improvements for Intel CHT | expand

Message

Heikki Krogerus Sept. 11, 2018, 10:10 a.m. UTC
Hi,

This is fourth version of this series. There was one bug in patch 2/10
that Hans noticed. It should be fixed now.

The commit message from v3:

These patches will introduce a few improvements to the USB Type-C
support on Intel CHT platform. In this series I'm preparing Intel CHT
mux handling for DisplayPort Alt Mode support, but please note that,
after these patches the DisplayPort alternate mode will still not work
out of the box on CHT platform. Changes to the fusb302.c, and possibly
tcpm.c are still needed.

This version will only fix the issue Hans pointed out in v2. Instead
of replacing the connection that assigned the mux to the USB Type-C
port with a connection that assigns the mux to the alternate mode
device, we keep all the existing connections and add a new one for the
alternate mode device. That way USB3 devices continue to be enumerated
as USB3 devices instead of USB2 devices.

The origin thread can be read here:
https://www.spinics.net/lists/linux-usb/msg172033.html


Heikki Krogerus (10):
  usb: typec: Take care of driver module reference counting
  usb: roles: Handle driver reference counting
  platform: x86: intel_cht_int33fe: Add dependency on muxes
  drivers: base: Helpers for adding device connection descriptions
  platform: x86: intel_cht_int33fe: Register all connections at once
  platform: x86: intel_cht_int33fe: Add connection for the DP alt mode
  platform: x86: intel_cht_int33fe: Add connections for the USB Type-C
    port
  usb: typec: class: Don't use port parent for getting mux handles
  platform: x86: intel_cht_int33fe: Remove the old connections for the
    muxes
  usb: typec: fusb302: reorganizing the probe function a little

 drivers/platform/x86/Kconfig             |  2 ++
 drivers/platform/x86/intel_cht_int33fe.c | 27 ++++++++---------
 drivers/usb/common/roles.c               | 15 ++++++++--
 drivers/usb/typec/class.c                | 38 ++++++++++--------------
 drivers/usb/typec/fusb302/fusb302.c      | 25 ++++++----------
 drivers/usb/typec/mux.c                  | 17 ++++++++---
 include/linux/device.h                   | 24 +++++++++++++++
 7 files changed, 87 insertions(+), 61 deletions(-)

Comments

Hans de Goede Sept. 11, 2018, 5:36 p.m. UTC | #1
Hi,

On 11-09-18 12:10, Heikki Krogerus wrote:
> Hi,
> 
> This is fourth version of this series. There was one bug in patch 2/10
> that Hans noticed. It should be fixed now.
> 
> The commit message from v3:
> 
> These patches will introduce a few improvements to the USB Type-C
> support on Intel CHT platform. In this series I'm preparing Intel CHT
> mux handling for DisplayPort Alt Mode support, but please note that,
> after these patches the DisplayPort alternate mode will still not work
> out of the box on CHT platform. Changes to the fusb302.c, and possibly
> tcpm.c are still needed.
> 
> This version will only fix the issue Hans pointed out in v2. Instead
> of replacing the connection that assigned the mux to the USB Type-C
> port with a connection that assigns the mux to the alternate mode
> device, we keep all the existing connections and add a new one for the
> alternate mode device. That way USB3 devices continue to be enumerated
> as USB3 devices instead of USB2 devices.
> 
> The origin thread can be read here:
> https://www.spinics.net/lists/linux-usb/msg172033.html

Thanks, the entire series looks good to me and has been tested by
me on a GPD win with a fusb302 tcpm controller:

Acked-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>

Greg, the previous version of this series also was:

"
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>

for PDx86 bits on condition that Hans is fine with them.
"

With the intend that the entire series would be merged
through the USB tree with Andy's ack for the
"platform: x86: ..." patches.

Regards,

Hans






> 
> 
> Heikki Krogerus (10):
>    usb: typec: Take care of driver module reference counting
>    usb: roles: Handle driver reference counting
>    platform: x86: intel_cht_int33fe: Add dependency on muxes
>    drivers: base: Helpers for adding device connection descriptions
>    platform: x86: intel_cht_int33fe: Register all connections at once
>    platform: x86: intel_cht_int33fe: Add connection for the DP alt mode
>    platform: x86: intel_cht_int33fe: Add connections for the USB Type-C
>      port
>    usb: typec: class: Don't use port parent for getting mux handles
>    platform: x86: intel_cht_int33fe: Remove the old connections for the
>      muxes
>    usb: typec: fusb302: reorganizing the probe function a little
> 
>   drivers/platform/x86/Kconfig             |  2 ++
>   drivers/platform/x86/intel_cht_int33fe.c | 27 ++++++++---------
>   drivers/usb/common/roles.c               | 15 ++++++++--
>   drivers/usb/typec/class.c                | 38 ++++++++++--------------
>   drivers/usb/typec/fusb302/fusb302.c      | 25 ++++++----------
>   drivers/usb/typec/mux.c                  | 17 ++++++++---
>   include/linux/device.h                   | 24 +++++++++++++++
>   7 files changed, 87 insertions(+), 61 deletions(-)
>
Heikki Krogerus Sept. 12, 2018, 8 a.m. UTC | #2
Hi,

On Tue, Sep 11, 2018 at 07:36:34PM +0200, Hans de Goede wrote:
> On 11-09-18 12:10, Heikki Krogerus wrote:
> > This is fourth version of this series. There was one bug in patch 2/10
> > that Hans noticed. It should be fixed now.
> > 
> > The commit message from v3:
> > 
> > These patches will introduce a few improvements to the USB Type-C
> > support on Intel CHT platform. In this series I'm preparing Intel CHT
> > mux handling for DisplayPort Alt Mode support, but please note that,
> > after these patches the DisplayPort alternate mode will still not work
> > out of the box on CHT platform. Changes to the fusb302.c, and possibly
> > tcpm.c are still needed.
> > 
> > This version will only fix the issue Hans pointed out in v2. Instead
> > of replacing the connection that assigned the mux to the USB Type-C
> > port with a connection that assigns the mux to the alternate mode
> > device, we keep all the existing connections and add a new one for the
> > alternate mode device. That way USB3 devices continue to be enumerated
> > as USB3 devices instead of USB2 devices.
> > 
> > The origin thread can be read here:
> > https://www.spinics.net/lists/linux-usb/msg172033.html
> 
> Thanks, the entire series looks good to me and has been tested by
> me on a GPD win with a fusb302 tcpm controller:
> 
> Acked-by: Hans de Goede <hdegoede@redhat.com>
> Tested-by: Hans de Goede <hdegoede@redhat.com>
> 
> Greg, the previous version of this series also was:
> 
> "
> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> 
> for PDx86 bits on condition that Hans is fine with them.
> "
> 
> With the intend that the entire series would be merged
> through the USB tree with Andy's ack for the
> "platform: x86: ..." patches.

Thanks Hans!

I've now applied these to my tree:
https://github.com/krohei/linux/commits/typec-next

I will resend them together with the other Type-C patches I've
collected next week after v4.19-rc4 unless Greg takes the patches
himself before that. The idea is to take care of a conflict for Greg.


Thanks,
Greg KH Sept. 20, 2018, 11:13 a.m. UTC | #3
On Wed, Sep 12, 2018 at 11:00:55AM +0300, Heikki Krogerus wrote:
> Hi,
> 
> On Tue, Sep 11, 2018 at 07:36:34PM +0200, Hans de Goede wrote:
> > On 11-09-18 12:10, Heikki Krogerus wrote:
> > > This is fourth version of this series. There was one bug in patch 2/10
> > > that Hans noticed. It should be fixed now.
> > > 
> > > The commit message from v3:
> > > 
> > > These patches will introduce a few improvements to the USB Type-C
> > > support on Intel CHT platform. In this series I'm preparing Intel CHT
> > > mux handling for DisplayPort Alt Mode support, but please note that,
> > > after these patches the DisplayPort alternate mode will still not work
> > > out of the box on CHT platform. Changes to the fusb302.c, and possibly
> > > tcpm.c are still needed.
> > > 
> > > This version will only fix the issue Hans pointed out in v2. Instead
> > > of replacing the connection that assigned the mux to the USB Type-C
> > > port with a connection that assigns the mux to the alternate mode
> > > device, we keep all the existing connections and add a new one for the
> > > alternate mode device. That way USB3 devices continue to be enumerated
> > > as USB3 devices instead of USB2 devices.
> > > 
> > > The origin thread can be read here:
> > > https://www.spinics.net/lists/linux-usb/msg172033.html
> > 
> > Thanks, the entire series looks good to me and has been tested by
> > me on a GPD win with a fusb302 tcpm controller:
> > 
> > Acked-by: Hans de Goede <hdegoede@redhat.com>
> > Tested-by: Hans de Goede <hdegoede@redhat.com>
> > 
> > Greg, the previous version of this series also was:
> > 
> > "
> > Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> > 
> > for PDx86 bits on condition that Hans is fine with them.
> > "
> > 
> > With the intend that the entire series would be merged
> > through the USB tree with Andy's ack for the
> > "platform: x86: ..." patches.
> 
> Thanks Hans!
> 
> I've now applied these to my tree:
> https://github.com/krohei/linux/commits/typec-next
> 
> I will resend them together with the other Type-C patches I've
> collected next week after v4.19-rc4 unless Greg takes the patches
> himself before that. The idea is to take care of a conflict for Greg.

That would be great if you could do that.

thanks,

greg k-h