From: Heikki Krogerus <heikki.krogerus@linux.intel.com> To: Hans de Goede <hdegoede@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Guenter Roeck <linux@roeck-us.net>, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH v2 1/3] usb: roles: intel_xhci: Always allow user control Date: Thu, 24 May 2018 09:03:02 +0300 [thread overview] Message-ID: <20180524060302.GA29600@kuha.fi.intel.com> (raw) In-Reply-To: <0e4dd22d-8553-1d51-22a2-d6252e5c5dc5@redhat.com> On Wed, May 23, 2018 at 08:03:43PM +0200, Hans de Goede wrote: > Hi, > > On 23-05-18 16:37, Heikki Krogerus wrote: > > Trying to determine the USB port type with this mux is very > > difficult. To simplify the situation, always allowing user > > control, even if the port is USB Type-C port. > > > > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > > --- > > .../usb/roles/intel-xhci-usb-role-switch.c | 21 +------------------ > > 1 file changed, 1 insertion(+), 20 deletions(-) > > > > diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles/intel-xhci-usb-role-switch.c > > index 30b07ea3a3c6..3f14153d753f 100644 > > --- a/drivers/usb/roles/intel-xhci-usb-role-switch.c > > +++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c > > @@ -39,20 +39,6 @@ struct intel_xhci_usb_data { > > void __iomem *base; > > }; > > -struct intel_xhci_acpi_match { > > - const char *hid; > > - int hrv; > > -}; > > - > > -/* > > - * ACPI IDs for PMICs which do not support separate data and power role > > - * detection (USB ACA detection for micro USB OTG), we allow userspace to > > - * change the role manually on these. > > - */ > > -static const struct intel_xhci_acpi_match allow_userspace_ctrl_ids[] = { > > - { "INT33F4", 3 }, /* X-Powers AXP288 PMIC */ > > -}; > > - > > static int intel_xhci_usb_set_role(struct device *dev, enum usb_role role) > > { > > struct intel_xhci_usb_data *data = dev_get_drvdata(dev); > > @@ -139,6 +125,7 @@ static enum usb_role intel_xhci_usb_get_role(struct device *dev) > > static struct usb_role_switch_desc sw_desc = { > > .set = intel_xhci_usb_set_role, > > .get = intel_xhci_usb_get_role, > > + .allow_userspace_control = true, > > }; > > static int intel_xhci_usb_probe(struct platform_device *pdev) > > > I hate to be pedantic here, but the sw_desc can and should be made > const now, with that fixed the entire series is: Sure, I'll fix that. > Reviewed-by: Hans de Goede <hdegoede@redhat.com> Thanks Hans. I'll send the v3. I need to add one more fix to the series. I got a report where somebody hit the issue related to the runtime PM we talked about a while back: If xHCI is suspended, we fail to program the mux registers as they are part of xHCI MMIO, so I will add a patch to this series where I enable runtime PM here to fix that problem. Cheers, -- heikki
WARNING: multiple messages have this Message-ID (diff)
From: Heikki Krogerus <heikki.krogerus@linux.intel.com> To: Hans de Goede <hdegoede@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Guenter Roeck <linux@roeck-us.net>, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [v2,1/3] usb: roles: intel_xhci: Always allow user control Date: Thu, 24 May 2018 09:03:02 +0300 [thread overview] Message-ID: <20180524060302.GA29600@kuha.fi.intel.com> (raw) On Wed, May 23, 2018 at 08:03:43PM +0200, Hans de Goede wrote: > Hi, > > On 23-05-18 16:37, Heikki Krogerus wrote: > > Trying to determine the USB port type with this mux is very > > difficult. To simplify the situation, always allowing user > > control, even if the port is USB Type-C port. > > > > Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > > --- > > .../usb/roles/intel-xhci-usb-role-switch.c | 21 +------------------ > > 1 file changed, 1 insertion(+), 20 deletions(-) > > > > diff --git a/drivers/usb/roles/intel-xhci-usb-role-switch.c b/drivers/usb/roles/intel-xhci-usb-role-switch.c > > index 30b07ea3a3c6..3f14153d753f 100644 > > --- a/drivers/usb/roles/intel-xhci-usb-role-switch.c > > +++ b/drivers/usb/roles/intel-xhci-usb-role-switch.c > > @@ -39,20 +39,6 @@ struct intel_xhci_usb_data { > > void __iomem *base; > > }; > > -struct intel_xhci_acpi_match { > > - const char *hid; > > - int hrv; > > -}; > > - > > -/* > > - * ACPI IDs for PMICs which do not support separate data and power role > > - * detection (USB ACA detection for micro USB OTG), we allow userspace to > > - * change the role manually on these. > > - */ > > -static const struct intel_xhci_acpi_match allow_userspace_ctrl_ids[] = { > > - { "INT33F4", 3 }, /* X-Powers AXP288 PMIC */ > > -}; > > - > > static int intel_xhci_usb_set_role(struct device *dev, enum usb_role role) > > { > > struct intel_xhci_usb_data *data = dev_get_drvdata(dev); > > @@ -139,6 +125,7 @@ static enum usb_role intel_xhci_usb_get_role(struct device *dev) > > static struct usb_role_switch_desc sw_desc = { > > .set = intel_xhci_usb_set_role, > > .get = intel_xhci_usb_get_role, > > + .allow_userspace_control = true, > > }; > > static int intel_xhci_usb_probe(struct platform_device *pdev) > > > I hate to be pedantic here, but the sw_desc can and should be made > const now, with that fixed the entire series is: Sure, I'll fix that. > Reviewed-by: Hans de Goede <hdegoede@redhat.com> Thanks Hans. I'll send the v3. I need to add one more fix to the series. I got a report where somebody hit the issue related to the runtime PM we talked about a while back: If xHCI is suspended, we fail to program the mux registers as they are part of xHCI MMIO, so I will add a patch to this series where I enable runtime PM here to fix that problem. Cheers,
next prev parent reply other threads:[~2018-05-24 6:03 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-23 14:37 [PATCH v2 0/3] [PATCH 0/4] usb: typec: fixes for Cherry Trails Heikki Krogerus 2018-05-23 14:37 ` [PATCH v2 1/3] usb: roles: intel_xhci: Always allow user control Heikki Krogerus 2018-05-23 14:37 ` [v2,1/3] " Heikki Krogerus 2018-05-23 16:10 ` [PATCH v2 1/3] " Sergei Shtylyov 2018-05-23 16:10 ` [v2,1/3] " Sergei Shtylyov 2018-05-24 6:08 ` [PATCH v2 1/3] " Heikki Krogerus 2018-05-24 6:08 ` [v2,1/3] " Heikki Krogerus 2018-05-23 18:03 ` [PATCH v2 1/3] " Hans de Goede 2018-05-23 18:03 ` [v2,1/3] " Hans de Goede 2018-05-24 6:03 ` Heikki Krogerus [this message] 2018-05-24 6:03 ` Heikki Krogerus 2018-05-23 14:37 ` [PATCH v2 2/3] platform: x86: intel_cht_int33fe: Fix dependencies Heikki Krogerus 2018-05-23 14:37 ` [v2,2/3] " Heikki Krogerus 2018-05-28 13:22 ` [PATCH v2 2/3] " Andy Shevchenko 2018-05-28 13:22 ` [v2,2/3] " Andy Shevchenko 2018-05-23 14:37 ` [PATCH v2 3/3] usb: typec: fusb302: Fix debugfs issue Heikki Krogerus 2018-05-23 14:37 ` [v2,3/3] " Heikki Krogerus 2018-05-23 16:07 ` [PATCH v2 3/3] " Sergei Shtylyov 2018-05-23 16:07 ` [v2,3/3] " Sergei Shtylyov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180524060302.GA29600@kuha.fi.intel.com \ --to=heikki.krogerus@linux.intel.com \ --cc=andriy.shevchenko@linux.intel.com \ --cc=gregkh@linuxfoundation.org \ --cc=hdegoede@redhat.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=linux@roeck-us.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.