Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-11 Thread Heikki Krogerus
Hi Felipe, > >> 4. partner_alt_modes - Lists partner's Alternate Modes when connected > > partner_alternate_modes ? (it's a file name, we can spell it out) > > >> 5. partner_type - Can be USB, Charger, Alt Mode or Accessory > >> 6. data_role - The current data role, host or device > >> 7.

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-11 Thread Heikki Krogerus
On Thu, Feb 11, 2016 at 10:08:14AM +0100, Oliver Neukum wrote: > I would think that user space should be able to preselect > that we always want to be upstream or downstream or flexible. Agreed. > And it should be able to preemptively disallow power delivery > even if no cable is present. By

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-11 Thread Heikki Krogerus
On Wed, Feb 10, 2016 at 09:26:19AM -0800, Greg KH wrote: > On Wed, Feb 10, 2016 at 12:38:40PM +0200, Heikki Krogerus wrote: > > > And what is userspace going to do with these files? Why does it care? > > > > The OS policy regarding USB Type-C ports needs to come from u

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-11 Thread Heikki Krogerus
On Wed, Feb 10, 2016 at 02:04:07PM +0100, Oliver Neukum wrote: > On Tue, 2016-02-09 at 19:01 +0200, Heikki Krogerus wrote: > > +#define UCSI_CONSTAT_BC_NOT_CHARGING 0 > > +#define UCSI_CONSTAT_BC_NOMINAL_CHARGING 1 > > +#define UCSI_CONSTAT_BC_SLOW_CHARGING

Re: Fwd: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-11 Thread Heikki Krogerus
On Thu, Feb 11, 2016 at 10:13:11AM +0200, Andy Shevchenko wrote: > -- Forwarded message -- > From: Andy Shevchenko > Date: Thu, Feb 11, 2016 at 10:10 AM > Subject: Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System > Software Interface > To: Oliver

Re: [PATCH 3/3] usb: type-c: UCSI ACPI driver

2016-02-10 Thread Heikki Krogerus
On Tue, Feb 09, 2016 at 10:22:46AM -0800, Greg KH wrote: > On Tue, Feb 09, 2016 at 07:01:23PM +0200, Heikki Krogerus wrote: > > Driver for ACPI enumerated UCSI devices. > > What does this mean? > > What does the driver do? Why would we care? > > > >

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-10 Thread Heikki Krogerus
On Tue, Feb 09, 2016 at 10:20:45AM -0800, Greg KH wrote: > On Tue, Feb 09, 2016 at 07:01:21PM +0200, Heikki Krogerus wrote: > > The purpose of this class is to provide unified interface > > for user space to get the status and basic information about > > USB Type-C Con

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-10 Thread Heikki Krogerus
Hi Oliver, > > +static ssize_t alternate_mode_store(struct device *dev, > > + struct device_attribute *attr, > > + const char *buf, size_t size) > > +{ > > + struct typec_port *port = to_typec_port(dev); > > + struct typec_alt_mode

Re: [PATCH 1/3] usb: USB Type-C Connector Class

2016-02-10 Thread Heikki Krogerus
On Wed, Feb 10, 2016 at 01:05:27PM +0200, Andy Shevchenko wrote: > On Wed, Feb 10, 2016 at 12:49 PM, Oliver Neukum <oneu...@suse.com> wrote: > > On Tue, 2016-02-09 at 19:01 +0200, Heikki Krogerus wrote: > >> The purpose of this class is to provide unified interface &g

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-10 Thread Heikki Krogerus
On Tue, Feb 09, 2016 at 10:21:55AM -0800, Greg KH wrote: > On Tue, Feb 09, 2016 at 07:01:22PM +0200, Heikki Krogerus wrote: > > USB Type-C Connector System Software Interface (UCSI) is a > > specification that defines registers and data structures > > used to interfac

Re: [PATCHv2 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-02-10 Thread Heikki Krogerus
Hi John, > Hi Heikki, > > The properties are now set using your patch. > > However I get a use-after-free error when I unload the driver: OK. I need to prepare proper fixes for the fwnode handling, but I think these patches are in any case OK. Though they now depend on those fixes of course.

Re: ULPI Driver help

2016-02-10 Thread Heikki Krogerus
Hi Sudhakar, On Mon, Feb 08, 2016 at 11:20:44PM -0800, Sudhakar Krishnan wrote: > Hi Heikki, > > First of all I would like to apologize for sending you random email. I > found your name from ULPI driver change list > > I am hobbyist developer using baytrail tablet (atom Z3537) and trying to >

Re: [PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-10 Thread Heikki Krogerus
On Wed, Feb 10, 2016 at 12:19:53PM +0100, Oliver Neukum wrote: > > > +static int ucsi_run_cmd(struct ucsi *ucsi, void *data, size_t size) > > +{ > > + int status; > > + int ret; > > + > > + dev_vdbg(ucsi->dev, "%s control 0x%llx\n", __func__, > > +ucsi->ppm->data->control); > >

Re: [PATCHv2 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-02-09 Thread Heikki Krogerus
> > diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c > > index d064ba8..22cd49b 100644 > > --- a/drivers/usb/dwc3/dwc3-pci.c > > +++ b/drivers/usb/dwc3/dwc3-pci.c > > @@ -47,6 +47,14 @@ static const struct acpi_gpio_mapping > > acpi_dwc3_byt_gpios[] = { > > > > static int

Re: [PATCHv2 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-02-09 Thread Heikki Krogerus
Hi, > I can reproduce this now when the device does not have primary fwnode > (of_node or ACPI). Everything seems to work fine if there is the > primary fwnode and when the build-in properties are used as the > secondary fwnode (fallback). > > This is a regression in drivers/base/property.c.

[PATCH 3/3] usb: type-c: UCSI ACPI driver

2016-02-09 Thread Heikki Krogerus
Driver for ACPI enumerated UCSI devices. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/type-c/Kconfig | 10 drivers/usb/type-c/Makefile| 1 + drivers/usb/type-c/ucsi_acpi.c | 133 + 3 files change

[PATCH 2/3] usb: type-c: USB Type-C Connector System Software Interface

2016-02-09 Thread Heikki Krogerus
-ucsi-spec.html Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/type-c/Kconfig | 8 + drivers/usb/type-c/Makefile | 1 + drivers/usb/type-c/ucsi.c | 450 drivers/usb/type-c/ucsi.h | 219 ++

[PATCH 0/3] usb: USB Type-C Class and driver for UCSI

2016-02-09 Thread Heikki Krogerus
the interface to the user space is kept as simple as I dared to make it. NOTE: In case there is somebody wondering, this is not adding USB PD support to Linux kernel. This is just about USB Type-C. Heikki Krogerus (3): usb: USB Type-C Connector Class usb: type-c: USB Type-C Connector System Software

[PATCH 1/3] usb: USB Type-C Connector Class

2016-02-09 Thread Heikki Krogerus
and can be used for executing role swapping and entering modes. When USB PD is not supported by the connector or partner, power_role will reflect the value of the data_role, and is not swappable independently. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/K

Re: [PATCHv2 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-02-08 Thread Heikki Krogerus
Hi John, > > @@ -114,16 +117,14 @@ static int dwc3_pci_quirks(struct pci_dev *pdev) > > (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 || > > pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI || > > pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) { > > - > > -

[PATCHv2 2/2] usb: dwc3: remove handling of platform data

2016-02-03 Thread Heikki Krogerus
No more users for it. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/core.c | 35 -- drivers/usb/dwc3/platform_data.h | 53 2 files changed, 88 deletions(-) delete mode

[PATCHv2 1/2] usb: dwc3: pci: use build-in properties instead of platform data

2016-02-03 Thread Heikki Krogerus
This should allow the core driver to drop handling of platform data and expect the platform specific details to always come from properties. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Cc: Huang Rui <ray.hu...@amd.com> CC: John Youn <john.y...@synopsys.com>

[PATCHv2 0/2] usb: dwc3: get rid of platform data

2016-02-03 Thread Heikki Krogerus
- Dropped the first patch that was proposing use of PCI_VDEVICE macro. Heikki Krogerus (2): usb: dwc3: pci: use build-in properties instead of platform data usb: dwc3: remove handling of platform data drivers/usb/dwc3/core.c | 35 - drivers/usb/dwc3/dwc3-pci.c | 81

Re: [PATCH 2/3] usb: dwc3: host: use build-in property instead of platform data

2016-01-26 Thread Heikki Krogerus
> > @@ -47,14 +54,12 @@ int dwc3_host_init(struct dwc3 *dwc) > > goto err1; > > } > > > > - memset(, 0, sizeof(pdata)); > > - > > - pdata.usb3_lpm_capable = dwc->usb3_lpm_capable; > > - > > - ret = platform_device_add_data(xhci, , sizeof(pdata)); > > - if (ret) { > > -

Re: [PATCH 1/3] usb: dwc3: pci: use PCI_VDEVICE macro

2016-01-26 Thread Heikki Krogerus
On Mon, Jan 25, 2016 at 07:28:59PM +0200, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus <heikki.kroge...@linux.intel.com> writes: > > The ID table becomes a bit more uniform that way. Also > > sorting the IDs alphabetically. > > > > Si

Re: [PATCH 2/3] usb: dwc3: pci: use build-in properties instead of platform data

2016-01-26 Thread Heikki Krogerus
On Mon, Jan 25, 2016 at 07:32:16PM +0200, Felipe Balbi wrote: > > Hi, > > Heikki Krogerus <heikki.kroge...@linux.intel.com> writes: > > This should allow the core driver to drop handling of > > platform data and expect the platform specific details to &

[PATCH 3/3] usb: dwc3: remove handling of platform data

2016-01-25 Thread Heikki Krogerus
No more users for it. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/core.c | 35 -- drivers/usb/dwc3/platform_data.h | 53 2 files changed, 88 deletions(-) delete mode

[PATCH 0/3] usb: dwc3: pci: cleanups

2016-01-25 Thread Heikki Krogerus
Hi, Now that we can use the build-in properties as fallback when the primary firmware (DT or ACPI) does not provide the requested property, it should be always safe to add them. I.e, by adding them to a device, nothing will be overwritten. Heikki Krogerus (3): usb: dwc3: pci: use PCI_VDEVICE

[PATCH 2/3] usb: dwc3: pci: use build-in properties instead of platform data

2016-01-25 Thread Heikki Krogerus
This should allow the core driver to drop handling of platform data and expect the platform specific details to always come from properties. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Cc: Huang Rui <ray.hu...@amd.com> CC: John Youn <john.y...@synopsys.com>

[PATCH 1/3] usb: dwc3: pci: use PCI_VDEVICE macro

2016-01-25 Thread Heikki Krogerus
The ID table becomes a bit more uniform that way. Also sorting the IDs alphabetically. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/dwc3-pci.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/d

[PATCH 0/3] xhci: get rid of platform data

2016-01-25 Thread Heikki Krogerus
We really need to favour build-in properties over platform data in general, but especially with individual flags like "usb3-lpm-capable". Heikki Krogerus (3): xhci: plat: adapt to unified device properties interface usb: dwc3: host: use build-in property instead of platform data

[PATCH 2/3] usb: dwc3: host: use build-in property instead of platform data

2016-01-25 Thread Heikki Krogerus
This should allow xhci to remove handling of platform data. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> Cc: Felipe Balbi <ba...@ti.com> --- drivers/usb/dwc3/host.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a

[PATCH 1/3] xhci: plat: adapt to unified device properties interface

2016-01-25 Thread Heikki Krogerus
Requesting the only property that the driver needs using the unified device properties interface so it will be available for all types of platforms, not just the ones using DT. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/host/xhci-plat.c | 5 ++---

[PATCH 3/3] xhci: get rid of platform data

2016-01-25 Thread Heikki Krogerus
No more users for it. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/host/xhci-plat.c | 5 + include/linux/usb/xhci_pdriver.h | 27 --- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 include/lin

Re: [PATCHv2 1/2] extcon: add driver for Intel USB mux

2015-12-08 Thread Heikki Krogerus
Hi, On Tue, Dec 08, 2015 at 10:17:47AM +0900, Chanwoo Choi wrote: > I can't agree to add specific function for only one device driver. > As I commented, it is not appropriate way. OK, I'll prepare something else for this. Thanks, -- heikki -- To unsubscribe from this list: send the line

Re: [PATCHv2 1/2] extcon: add driver for Intel USB mux

2015-12-07 Thread Heikki Krogerus
Hi, On Mon, Dec 07, 2015 at 10:24:22AM +0900, Chanwoo Choi wrote: > Hi, > > On 2015년 12월 04일 17:51, Heikki Krogerus wrote: > > Hi, > > > >> I do never want to add some specific funtcion for only this driver. > >> I think is not appropria

Re: [PATCHv2 1/2] extcon: add driver for Intel USB mux

2015-12-04 Thread Heikki Krogerus
Hi, > I do never want to add some specific funtcion for only this driver. > I think is not appropriate way. > - intel_usb_mux_unregister > - intel_usb_mux_register > > The client driver using extcon driver should use the standard extcon API > for code consistency. Also, I'll do the more detailed

[PATCHv2 2/2] usb: pci-quirks: register USB mux found on Cherrytrail SOC

2015-12-03 Thread Heikki Krogerus
for the mux is an "extcon" driver. With this we only register the mux if it's detected. Suggested-by: Lu Baolu <baolu...@linux.intel.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/host/pci-quirks.c | 26 +- 1 file change

[PATCHv2 0/2] extcon: driver for Intel USB MUX

2015-12-03 Thread Heikki Krogerus
. The mux control registers are defined in Cherrytrail datasheets [1] page 2230-2234. I think these should go via extcon tree, but it's up to you guys of course. [1] http://www.intel.es/content/www/es/es/processors/atom/atom-z8000-datasheet-vol-2.html Heikki Krogerus (2): extcon: add driver

[PATCHv2 1/2] extcon: add driver for Intel USB mux

2015-12-03 Thread Heikki Krogerus
(C) 2015 Intel Corporation + * Author: Heikki Krogerus <heikki.kroge...@linux.intel.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +

Re: [PATCH 2/2] usb: pci-quirks: register USB mux found on Cherrytrail SOC

2015-12-02 Thread Heikki Krogerus
Hi Felipe, > IMHO, this should be creating a child device instead of calling > intel_usb_mux_register() directly. That way, your mux driver could > actually _be_ a driver. Seems like all you need to do from this point is > a register a simple platform_device which is a child of xhci, see >

Re: [PATCH 2/2] usb: pci-quirks: register USB mux found on Cherrytrail SOC

2015-12-02 Thread Heikki Krogerus
Hi, > > @@ -1029,9 +1030,36 @@ static void quirk_usb_handoff_xhci(struct pci_dev > > *pdev) > > writel(val, base + ext_cap_offset + XHCI_LEGACY_CONTROL_OFFSET); > > > > hc_init: > > - if (pdev->vendor == PCI_VENDOR_ID_INTEL) > > + if (pdev->vendor == PCI_VENDOR_ID_INTEL) { > >

Re: [PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-02 Thread Heikki Krogerus
Hi David, > > +void intel_usb_mux_unregister(struct intel_usb_mux *mux) > > +{ > > There are still 2 pending comments for this unregister function: > > 1) How about a protection against unbalanced unregistering? In case an > user mistakenly unregisters twice or unregisters without a previous

[PATCH 0/2] extcon: driver for Intel USB MUX

2015-12-01 Thread Heikki Krogerus
guys of course. [1] http://www.intel.es/content/www/es/es/processors/atom/atom-z8000-datasheet-vol-2.html Heikki Krogerus (2): extcon: add driver for Intel USB mux usb: pci-quirks: register USB mux found on Cherrytrail SOC drivers/extcon/Kconfig | 5 ++ drivers/extcon

[PATCH 1/2] extcon: add driver for Intel USB mux

2015-12-01 Thread Heikki Krogerus
(C) 2015 Intel Corporation + * Author: Heikki Krogerus <heikki.kroge...@linux.intel.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +

[PATCH 2/2] usb: pci-quirks: register USB mux found on Cherrytrail SOC

2015-12-01 Thread Heikki Krogerus
for the mux is an "extcon" driver. With this we only register the mux if it's detected. Suggested-by: Lu Baolu <baolu...@linux.intel.com> Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/host/pci-quirks.c | 30 +- 1 file

Re: [PATCH] Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs"

2015-11-06 Thread Heikki Krogerus
On Mon, Oct 12, 2015 at 01:37:40PM -0500, Felipe Balbi wrote: > > Hi, > > Felipe Balbi writes: > > On Wed, Sep 02, 2015 at 05:09:39PM +0900, Masakazu Mokuno wrote: > >> Hi, > >> > >> On Mon, 31 Aug 2015 11:54:13 -0500 > >> Felipe Balbi wrote: > >> > >> > On Mon,

Re: [PATCH] Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs"

2015-11-06 Thread Heikki Krogerus
On Fri, Nov 06, 2015 at 02:48:00PM +0200, Heikki Krogerus wrote: > On Mon, Oct 12, 2015 at 01:37:40PM -0500, Felipe Balbi wrote: > > > > Hi, > > > > Felipe Balbi <ba...@ti.com> writes: > > > On Wed, Sep 02, 2015 at 05:09:39PM +0900, Masakazu Mokuno wrote

[PATCH] usb: dwc3: pci: add support for Intel Broxton SOC

2015-10-21 Thread Heikki Krogerus
PCI IDs for Broxton based platforms. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/dwc3-pci.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index f626179..5e3b6fc 100644 --- a/drive

Re: [PATCH] usb: dwc3: pci: add support for Intel Broxton SOC

2015-10-21 Thread Heikki Krogerus
On Wed, Oct 21, 2015 at 12:48:52PM +0300, Heikki Krogerus wrote: > PCI IDs for Broxton based platforms. This does not apply cleanly on top of your testing/next branch anymore. Sorry about that. Resending... -- heikki -- To unsubscribe from this list: send the line "unsubscribe l

[PATCHv2] usb: dwc3: pci: add support for Intel Broxton SOC

2015-10-21 Thread Heikki Krogerus
PCI IDs for Broxton based platforms. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/dwc3-pci.c | 4 1 file changed, 4 insertions(+) Changes since v1: - Rebased on top of Felipe's testing/next branch diff --git a/drivers/usb/dwc3/dwc3-pci.c b/d

Re: [PATCH v4] usb: of: add an api to get dr_mode by the phy node

2015-10-06 Thread Heikki Krogerus
Hi, > How about add a new function as follows to convert dr_mode from string to > enum, then both Keikki's and my function will be shorter by calling it? > > static enum usb_dr_mode of_usb_get_dr_mode_from_string(char *string) > { > for (i = 0; i < ARRAY_SIZE(usb_dr_modes); i++) >

Re: [PATCH 1/5] usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed

2015-09-21 Thread Heikki Krogerus
On Fri, Sep 18, 2015 at 02:42:15PM -0500, Felipe Balbi wrote: > On Tue, Aug 25, 2015 at 02:04:31PM +0300, Heikki Krogerus wrote: > > By using the unified device property interface, the function > > can be made available for all platforms and not just the > > ones using DT

[PATCHv2 1/5] usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed

2015-09-21 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c

[PATCHv2 4/5] usb: dwc3: core: convert to unified device property interface

2015-09-21 Thread Heikki Krogerus
No functional affect on existing platforms, but the driver is now ready to extract the properties also from ACPI tables as well as from DT. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/core.c | 50 -

[PATCHv2 2/5] usb: dwc3: st: prepare the driver for generic usb_get_dr_mode function

2015-09-21 Thread Heikki Krogerus
-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> CC: Giuseppe Cavallaro <peppe.cavall...@st.com> CC: Peter Griffin <peter.grif...@linaro.org> --- drivers/usb/dwc3/dwc3-st.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/us

[PATCHv2 3/5] usb: common: of_usb_get_dr_mode to usb_get_dr_mode

2015-09-21 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c

[PATCHv2 0/5] usb: common and dwc3: converting to unified device property

2015-09-21 Thread Heikki Krogerus
the platform device has been populated. I changed it so that the dr_mode property is requested after the platform device is populated in a separate patch. Changes since v1: - Rebased on top of Felipe's testing/next branch Heikki Krogerus (5): usb: common: of_usb_get_maximum_speed

[PATCHv2 5/5] usb: dwc3: pci: passing forward the ACPI companion

2015-09-21 Thread Heikki Krogerus
Sharing the ACPI companion with dwc3 core so it has access to the properties defined for DWC3 in ACPI tables. Signed-off-by: Heikki Krogerus <heikki.kroge...@linux.intel.com> --- drivers/usb/dwc3/dwc3-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/d

Re: [PATCH] Revert "usb: dwc3: gadget: drop unnecessary loop when cleaning up TRBs"

2015-09-07 Thread Heikki Krogerus
Hi, On Tue, Sep 01, 2015 at 06:37:54PM +0300, Ville Syrjälä wrote: > On Tue, Sep 01, 2015 at 10:17:59AM -0500, Felipe Balbi wrote: > > Hi, > > > > On Tue, Sep 01, 2015 at 05:39:28PM +0300, Ville Syrjälä wrote: > > > On Tue, Sep 01, 2015 at 08:59:02AM -0500, Felipe Balbi wrote: > > > > Hi, > > >

Re: [PATCH 0/5] usb: common and dwc3: converting to unified device property

2015-08-26 Thread Heikki Krogerus
Hi Peter, On Wed, Aug 26, 2015 at 12:53:20PM +0800, Peter Chen wrote: On Tue, Aug 25, 2015 at 02:04:30PM +0300, Heikki Krogerus wrote: Hi, While converting dwc3 to the unified device property interface, I noticed that there is really nothing preventing of_usb_get_dr_mode

[PATCH 1/5] usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed

2015-08-25 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c | 44

[PATCH 0/5] usb: common and dwc3: converting to unified device property

2015-08-25 Thread Heikki Krogerus
the platform device has been populated. I changed it so that the dr_mode property is requested after the platform device is populated in a separate patch. Heikki Krogerus (5): usb: common: of_usb_get_maximum_speed to usb_get_maximum_speed usb: dwc3: st: prepare the driver for generic usb_get_dr_mode

[PATCH 3/5] usb: common: of_usb_get_dr_mode to usb_get_dr_mode

2015-08-25 Thread Heikki Krogerus
By using the unified device property interface, the function can be made available for all platforms and not just the ones using DT. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/chipidea/core.c | 2 +- drivers/usb/common/common.c | 15

[PATCH 4/5] usb: dwc3: core: convert to unified device property interface

2015-08-25 Thread Heikki Krogerus
No functional affect on existing platforms, but the driver is now ready to extract the properties also from ACPI tables as well as from DT. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/dwc3/core.c | 45 ++--- 1 file

[PATCH 5/5] usb: dwc3: pci: passing forward the ACPI companion

2015-08-25 Thread Heikki Krogerus
Sharing the ACPI companion with dwc3 core so it has access to the properties defined for DWC3 in ACPI tables. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/dwc3/dwc3-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers

[PATCH 2/5] usb: dwc3: st: prepare the driver for generic usb_get_dr_mode function

2015-08-25 Thread Heikki Krogerus
-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com CC: Giuseppe Cavallaro peppe.cavall...@st.com CC: Peter Griffin peter.grif...@linaro.org --- drivers/usb/dwc3/dwc3-st.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb

Re: [PATCH] usb: dwc3: pci: passing forward the ACPI companion

2015-08-18 Thread Heikki Krogerus
On Mon, Aug 17, 2015 at 12:59:52PM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 10:26:53AM -0700, David Cohen wrote: On Mon, Aug 17, 2015 at 08:41:19AM -0500, Felipe Balbi wrote: On Mon, Aug 17, 2015 at 02:32:06PM +0300, Heikki Krogerus wrote: Sharing the APCI companion

[PATCH] usb: dwc3: pci: passing forward the ACPI companion

2015-08-17 Thread Heikki Krogerus
Sharing the APCI companion with the core platforms device so it has access to all DWC3's resources. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/dwc3/dwc3-pci.c | 1 + 1 file changed, 1 insertion(+) Hi, This depends on being able to prevent execution of ACPI

Re: [PATCH v2] usb: dwc3: pci: make better use of gpiod API

2015-06-24 Thread Heikki Krogerus
argument to gpiod_get*() mandatory. Signed-off-by: Uwe Kleine-König u.kleine-koe...@pengutronix.de Tested-by: Heikki Krogerus heikki.kroge...@linux.intel.com Thanks, -- heikki -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord

Re: [PATCH] usb: dwc3: pci: make better use of gpiod API

2015-06-23 Thread Heikki Krogerus
On Fri, Jun 12, 2015 at 09:10:19AM +0200, Uwe Kleine-König wrote: Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output.

Re: [PATCH] usb: ulpi: call put_device if device_register fails

2015-06-23 Thread Heikki Krogerus
On Fri, Jun 19, 2015 at 01:12:36AM +0800, ChengYi He wrote: put_device is required to release the last reference to the device. Signed-off-by: ChengYi He chengyihetai...@gmail.com --- drivers/usb/common/ulpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v4 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-06-04 Thread Heikki Krogerus
Hi Baolu, On Thu, May 28, 2015 at 08:50:12AM +0800, Lu, Baolu wrote: On 05/28/2015 12:53 AM, David Cohen wrote: Hi, On Tue, May 26, 2015 at 07:37:02PM -0700, Greg Kroah-Hartman wrote: On Wed, May 27, 2015 at 09:45:37AM +0800, Lu Baolu wrote: Phy drivers and the ulpi interface providers

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-28 Thread Heikki Krogerus
On Thu, May 28, 2015 at 08:36:46AM -0400, Sasha Levin wrote: On 05/28/2015 01:39 AM, Sudip Mukherjee wrote: diff --git a/drivers/base/driver.c b/drivers/base/driver.c index 4eabfe2..1acae5b 100644 --- a/drivers/base/driver.c +++ b/drivers/base/driver.c @@ -150,6 +150,11 @@ int

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-27 Thread Heikki Krogerus
Hi Greg, But couldn't we add a helper function to drivers/base/bus.c that the bus drivers can use to at least check was the bus already loaded or not? It looks like there are a couple of bus drivers that use the struct bus member p to check that. Greg, what do you think? I think

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-25 Thread Heikki Krogerus
Hi, Why do we even need that? If you take patch that makes ulpi_init a subsys_initcall you won't have this problem, and no additional weird hacks and errors will be needed Using subsys_initcall will work around the problem for now, but I would not make the assumption that there will never be

Re: [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-25 Thread Heikki Krogerus
by putting ulpi_init in subsys_initcall(). Reported-by: Zhuo Qiuxu qiuxu.z...@intel.com Signed-off-by: Lu Baolu baolu...@linux.intel.com Adding Felipe. FWIW, my ACK in any case: Acked-by: Heikki Krogerus heikki.kroge...@linux.intel.com Thanks, -- heikki -- To unsubscribe from this list

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-22 Thread Heikki Krogerus
diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c index 0e6f968..0b0a5e7 100644 --- a/drivers/usb/common/ulpi.c +++ b/drivers/usb/common/ulpi.c @@ -132,6 +132,10 @@ int ulpi_register_driver(struct ulpi_driver *drv) if (!drv-probe) return

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-22 Thread Heikki Krogerus
On Fri, May 22, 2015 at 01:16:38PM +0300, Heikki Krogerus wrote: diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c index 0e6f968..0b0a5e7 100644 --- a/drivers/usb/common/ulpi.c +++ b/drivers/usb/common/ulpi.c @@ -132,6 +132,10 @@ int ulpi_register_driver(struct

Re: [PATCH v2 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall

2015-05-22 Thread Heikki Krogerus
Many drivers and modules depend on ULPI bus registeration to register ULPI interfaces and drivers. It's more appropriate to register ULPI bus in subsys_initcall instead of module_init. Kernel panic has been reported with some kind of kernel config. Even though I agree subsys_initcall is

Re: [PATCH] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-21 Thread Heikki Krogerus
ULPI registers it's bus at module_init so if the bus fails to register, the A minor comment: s/it's/its/ module will fail to load and all will be well in the world. However, if the ULPI code is built-in rather than a module, the bus initialization may fail but we'd still try to register

Re: [PATCH 1/1] usb: ulpi: ulpi_init should be used in subsys_initcall

2015-05-21 Thread Heikki Krogerus
On Thu, May 21, 2015 at 01:40:43PM +0800, Lu Baolu wrote: The intention of this change is to fix below kernel panic when USB_ULPI_BUS was configured as buildin. That is actually incorrect. Having the bus build-in does not cause this panic.. [0.746856] kernel BUG at drivers/base/driver.c:153!

Re: [PATCH 1/1] usb: ulpi: don't register drivers if bus doesn't exist

2015-05-21 Thread Heikki Krogerus
On Thu, May 21, 2015 at 06:07:25PM +0800, Lu, Baolu wrote: Hi Heikki, Sasha and others, Please ignore this patch. I should not squash these two patches into one and sign it off behalf of other people. I apologize for this and I'm sorry if this lets you feel affronted. No worries. So we'll

Re: [PATCHv3 10/12] usb: dwc3: add ULPI interface support

2015-04-30 Thread Heikki Krogerus
Hi Felipe, + case DWC3_GHWPARAMS3_HSPHY_IFC_ULPI: + /* Soft reset here to sync the clocks */ + ret = dwc3_soft_reset(dwc); you just lost all DWC3_GUSB3PIPECTL(0) and DWC3_GUSB2PHYCFG(0) configurations which happened right before this switch. Essentially breaking

Re: [PATCHv3 01/11] usb: add bus type for USB ULPI

2015-04-30 Thread Heikki Krogerus
+struct bus_type ulpi_bus = { non-static and undeclared anywhere, adds a sparse error. I'm dropping the series for now :-) drivers/usb/common/ulpi.c:77:17: warning: symbol 'ulpi_bus' was not declared. Should it be static? Need to fix that. I'll wait for your comment's to 10/12

Re: [PATCHv3 00/12] usb: ulpi bus

2015-04-29 Thread Heikki Krogerus
On Tue, Apr 28, 2015 at 12:17:34PM -0500, Felipe Balbi wrote: Hi, On Tue, Apr 28, 2015 at 04:24:35PM +0300, Heikki Krogerus wrote: Hi, I took the liberty of adding David's ACK to everything except 9/12, including to the 1/12 (removing the module handling has no functional affect

[PATCHv3 11/12] phy: helpers for USB ULPI PHY registering

2015-04-29 Thread Heikki Krogerus
ULPI PHYs need to be bound to their controllers with a lookup. This adds helpers that the ULPI drivers can use to do both, the registration of the PHY and the lookup, at the same time. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Acked-by: David Cohen david.a.co

[PATCHv3 09/12] usb: dwc3: pci: add quirk for Baytrails

2015-04-29 Thread Heikki Krogerus
On some BYT platforms the USB2 PHY needs to be put into operational mode by the controller driver with GPIOs controlling the PHYs reset and cs signals. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/dwc3/dwc3-pci.c | 36 1 file

[PATCHv3 08/12] usb: dwc3: add hsphy_interface property

2015-04-29 Thread Heikki Krogerus
Platforms that have configured DWC_USB3_HSPHY_INTERFACE with value 3, i.e. UTMI+ and ULPI, need to inform the driver of the actual HSPHY interface type with the property. utmi if the interface is UTMI+ or ulpi if the interface is ULPI. Signed-off-by: Heikki Krogerus heikki.kroge

[PATCHv3 10/12] usb: dwc3: add ULPI interface support

2015-04-29 Thread Heikki Krogerus
Registers DWC3's ULPI interface with the ULPI bus when it's available. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Acked-by: David Cohen david.a.co...@linux.intel.com --- drivers/usb/dwc3/Kconfig | 7 drivers/usb/dwc3/Makefile | 4 +++ drivers/usb/dwc3/core.c | 19

[PATCHv3 12/12] phy: add driver for TI TUSB1210 ULPI PHY

2015-04-29 Thread Heikki Krogerus
+ * + * Copyright (C) 2015 Intel Corporation + * + * Author: Heikki Krogerus heikki.kroge...@linux.intel.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation

Re: [PATCHv3 08/11] usb: dwc3: add hsphy_interface property

2015-04-29 Thread Heikki Krogerus
+ /* Select the HS PHY interface */ + switch (DWC3_GHWPARAMS3_HSPHY_IFC(dwc-hwparams.hwparams3)) { + case DWC3_GHWPARAMS3_HSPHY_IFC_UTMI_ULPI: + if (!strncmp(dwc-hsphy_interface, utmi, 4)) { + reg = ~DWC3_GUSB2PHYCFG_ULPI_UTMI; + } else if

Re: [PATCHv3 06/11] usb: dwc3: soft reset to it's own function

2015-04-29 Thread Heikki Krogerus
+ * dwc3_soft_reset - Issue soft reset + * @dwc: Pointer to our controller context structure + */ +static int dwc3_soft_reset(struct dwc3 *dwc) I don't see this being called anywhere else in your series and I would really like to know when we would need to reset the core again ? I

[PATCHv3 10/11] phy: helpers for USB ULPI PHY registering

2015-04-28 Thread Heikki Krogerus
ULPI PHYs need to be bound to their controllers with a lookup. This adds helpers that the ULPI drivers can use to do both, the registration of the PHY and the lookup, at the same time. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Acked-by: David Cohen david.a.co

[PATCHv3 02/11] usb: dwc3: USB2 PHY register access bits

2015-04-28 Thread Heikki Krogerus
Definitions for Global USB2 PHY Vendor Control Register bits. We will need them to access ULPI PHY registers later. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Acked-by: David Cohen david.a.co...@linux.intel.com --- drivers/usb/dwc3/core.h | 8 1 file changed, 8

[PATCHv3 06/11] usb: dwc3: soft reset to it's own function

2015-04-28 Thread Heikki Krogerus
So it can be called from other places later. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com Acked-by: David Cohen david.a.co...@linux.intel.com --- drivers/usb/dwc3/core.c | 46 ++ 1 file changed, 30 insertions(+), 16 deletions(-) diff

[PATCHv3 08/11] usb: dwc3: add hsphy_interface property

2015-04-28 Thread Heikki Krogerus
Platforms that have configured DWC_USB3_HSPHY_INTERFACE with value 3, i.e. UTMI+ and ULPI, need to inform the driver of the actual HSPHY interface type with the property. utmi if the interface is UTMI+ or ulpi if the interface is ULPI. Signed-off-by: Heikki Krogerus heikki.kroge

[PATCHv3 07/11] usb: dwc3: setup phys earlier

2015-04-28 Thread Heikki Krogerus
to the PHYs, such as registering DWC3's ULPI interface, which can now be done in dwc3_phy_setup(). Also, if there ever was need for the two 100ms delays in dwc3_phy_setup() there isn't anymore. The PHYs are now reset after the PHY interfaces are setup. Signed-off-by: Heikki Krogerus heikki.kroge

[PATCHv3 11/11] phy: add driver for TI TUSB1210 ULPI PHY

2015-04-28 Thread Heikki Krogerus
+ * + * Copyright (C) 2015 Intel Corporation + * + * Author: Heikki Krogerus heikki.kroge...@linux.intel.com + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation

[PATCHv3 09/11] usb: dwc3: pci: add quirk for Baytrails

2015-04-28 Thread Heikki Krogerus
On some BYT platforms the USB2 PHY needs to be put into operational mode by the controller driver with GPIOs controlling the PHYs reset and cs signals. Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com --- drivers/usb/dwc3/dwc3-pci.c | 36 1 file

<    3   4   5   6   7   8   9   10   >