[PATCH v7 1/7] regulator: fixed: add support for ACPI interface

2016-04-28 Thread Lu Baolu
Add support to retrieve fixed voltage configure information through ACPI interface. This is needed for Intel Bay Trail devices, where a GPIO is used to control the USB vbus. Signed-off-by: Lu Baolu --- drivers/regulator/fixed.c | 46 ++ 1 file changed

[PATCH v7 5/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-04-28 Thread Lu Baolu
owner per platform_no_drv_owner.cocci] Suggested-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/mfd/Kconfig| 8 + drivers/mfd/Makefile | 1 + drivers/mfd/intel-vuport.c | 89 ++ 3 files change

Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface

2016-04-28 Thread Lu Baolu
Hi, On 04/29/2016 01:15 AM, Mark Brown wrote: > On Thu, Apr 28, 2016 at 01:55:35PM +0800, Lu Baolu wrote: > >> How about below code? >> + gpiod = gpiod_get(dev, "vbus_en", GPIOD_ASIS); >> + if (IS_ERR(gpiod)) >> + return PTR_

Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface

2016-04-27 Thread Lu Baolu
Hi, On 04/27/2016 08:33 PM, Mark Brown wrote: > On Wed, Apr 27, 2016 at 09:54:10AM +0800, Lu Baolu wrote: > >> Please refer to Documentation/acpi/gpio-properties.txt. > That's not visibly what your driver is doing, that is also recommending > using a static name which is wh

Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface

2016-04-26 Thread Lu Baolu
Hi, On 04/26/2016 06:23 PM, Mark Brown wrote: > On Tue, Apr 26, 2016 at 10:24:56AM +0800, Lu Baolu wrote: > >> The GPIO name might be different in different use cases. For my case, >> it is "vbus_en", but other cases should use the different name. >> On ACPI co

Re: [PATCH v6 04/10] regulator: fixed: add support for ACPI interface

2016-04-25 Thread Lu Baolu
Hi Mark, On 04/26/2016 01:30 AM, Mark Brown wrote: > On Mon, Apr 25, 2016 at 04:04:50PM +0800, Lu Baolu wrote: > >> +ret = device_property_read_string(dev, "gpio-name", &gpio_name); >> +if (!ret) { >> +gpiod = gpiod_get(dev, gpio_name, GP

Re: [PATCH v6 03/10] regulator: fixed: add device binding for platform device

2016-04-25 Thread Lu Baolu
Hi Mark, On 04/26/2016 12:40 AM, Mark Brown wrote: > On Mon, Apr 25, 2016 at 04:04:49PM +0800, Lu Baolu wrote: > >> This is needed to handle the GPIO connected USB vcc pin found on >> Intel Baytrail devices. > In what way is this needed? The we defualt to using the driver

Re: [PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface

2016-04-25 Thread Lu Baolu
Hi, On 04/26/2016 07:51 AM, Chanwoo Choi wrote: > Hi Lu, > > On 2016년 04월 25일 17:04, Lu Baolu wrote: >> GPIO resource could be retrieved through APCI as well. >> >> Signed-off-by: Lu Baolu >> Reviewed-by: Felipe Balbi >> Acked-by: Chanwoo Choi >>

Re: [PATCH v6 01/10] extcon: usb-gpio: add device binding for platform device

2016-04-25 Thread Lu Baolu
Hi, On 04/26/2016 07:51 AM, Chanwoo Choi wrote: > Hi Lu, > > On 2016년 04월 25일 17:04, Lu Baolu wrote: >> This is needed to handle the GPIO connected USB ID pin found on >> Intel Baytrail devices. >> >> Signed-off-by: Lu Baolu >> Reviewed-by:

[PATCH v6 01/10] extcon: usb-gpio: add device binding for platform device

2016-04-25 Thread Lu Baolu
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b

[PATCH v6 03/10] regulator: fixed: add device binding for platform device

2016-04-25 Thread Lu Baolu
This is needed to handle the GPIO connected USB vcc pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu --- drivers/regulator/fixed.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index ff62d69..e6f376f 100644 --- a

[PATCH v6 00/10] usb: add support for Intel dual role port mux

2016-04-25 Thread Lu Baolu
series includes a driver for GPIO USB mux. (3) Drivers for USB port mux controlled through memory mapped registers and the logic to create the mux device. This type of dual role port mux could be found in Cherry Trail and Broxton devices. Lu Baolu (10): extcon: usb-gpio: add device binding

[PATCH v6 05/10] usb: mux: add generic code for dual role port mux

2016-04-25 Thread Lu Baolu
control the port mux from user space. Some other archs (e.g. Renesas R-Car gen2 SoCs) need an external mux to swap usb roles as well. This code could be leveraged for those archs as well. Signed-off-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by: Felipe Balbi Reviewed-by: Chanwoo Choi

[PATCH v6 04/10] regulator: fixed: add support for ACPI interface

2016-04-25 Thread Lu Baolu
Add support to retrieve fixed voltage configure information through ACPI interface. This is needed for Intel Bay Trail devices, where a GPIO is used to control the USB vbus. Signed-off-by: Lu Baolu --- drivers/regulator/fixed.c | 48 +++ 1 file

[PATCH v6 07/10] usb: mux: add driver for Intel drcfg controlled port mux

2016-04-25 Thread Lu Baolu
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between device controller and host controller. The mux is handled through the Dual Role Configuration Register. Signed-off-by: Heikki Krogerus Signed-off-by: Lu Baolu Signed-off-by: Wu Hao Reviewed-by: Felipe

[PATCH v6 10/10] MAINTAINERS: add maintainer entry for Intel USB dual role mux drivers

2016-04-25 Thread Lu Baolu
Add a maintainer entry for Intel USB dual role mux drivers and add myself as a maintainer. Signed-off-by: Lu Baolu --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 03e00c7..e2609e6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[PATCH v6 09/10] usb: pci-quirks: add Intel USB drcfg mux device

2016-04-25 Thread Lu Baolu
mux switch. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/usb/host/pci-quirks.c| 45 ++-- drivers/usb/host/xhci-ext-caps.h | 2 ++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb

[PATCH v6 06/10] usb: mux: add driver for Intel gpio controlled port mux

2016-04-25 Thread Lu Baolu
-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by: Felipe Balbi --- drivers/usb/mux/Kconfig | 11 +++ drivers/usb/mux/Makefile | 1 + drivers/usb/mux/portmux-intel-gpio.c | 149 +++ 3 files changed, 161 insertions(+) create mode

[PATCH v6 08/10] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-04-25 Thread Lu Baolu
owner per platform_no_drv_owner.cocci] Suggested-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/mfd/Kconfig| 8 + drivers/mfd/Makefile | 1 + drivers/mfd/intel-vuport.c | 90 ++ 3 files change

[PATCH v6 02/10] extcon: usb-gpio: add support for ACPI gpio interface

2016-04-25 Thread Lu Baolu
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon

Re: [PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-04-05 Thread Lu Baolu
Hi, On 03/14/2016 11:27 AM, Greg Kroah-Hartman wrote: > On Mon, Mar 14, 2016 at 09:09:22AM +0800, Lu Baolu wrote: >> On 03/11/2016 08:06 AM, Greg Kroah-Hartman wrote: >>> On Tue, Mar 08, 2016 at 03:53:44PM +0800, Lu Baolu wrote: >>>> +struct intel_mux_dev

Re: [PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-04-05 Thread Lu Baolu
Hi, On 03/11/2016 07:57 AM, Greg Kroah-Hartman wrote: > On Thu, Mar 10, 2016 at 01:39:43PM +0100, Oliver Neukum wrote: >> On Tue, 2016-03-08 at 15:53 +0800, Lu Baolu wrote: >> >>> diff --git a/Documentation/ABI/testing/sysfs-bus-platform >>> b/Documentati

[PATCH 1/2] usb: xhci: fix wild pointers in xhci_mem_cleanup

2016-03-25 Thread Lu Baolu
This patch fixes some wild pointers produced by xhci_mem_cleanup. These wild pointers will cause system crash if xhci_mem_cleanup() is called twice. Reported-and-tested-by: Pengcheng Li Signed-off-by: Lu Baolu Cc: sta...@vger.kernel.org --- drivers/usb/host/xhci-mem.c | 6 ++ 1 file

[PATCH 2/2] usb: xhci: remove hardcoded gfp_t in xhci_mem_init

2016-03-25 Thread Lu Baolu
xhci_mem_init() should use @flags, instead of hardcode, for DMA memory allocation. Signed-off-by: Lu Baolu --- drivers/usb/host/xhci-mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index bad0d1f..7c2f884

[PATCH v4 4/7] usb: mux: add driver for Intel gpio controlled port mux

2016-03-19 Thread Lu Baolu
In some Intel platforms, a single usb port is shared between USB host and device controller. The shared port is under control of GPIO pins. This patch adds the support for USB GPIO controlled port mux. Signed-off-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by

[PATCH v5 0/6] usb: add support for Intel dual role port mux

2016-03-19 Thread Lu Baolu
USB port mux controlled through memory mapped registers and the logic to create the mux device. This type of dual role port mux could be found in Cherry Trail and Broxton devices. Lu Baolu (6): extcon: usb-gpio: add device binding for platform device extcon: usb-gpio: add support

Re: [PATCH v5 3/6] usb: mux: add common code for Intel dual role port mux

2016-03-19 Thread Lu Baolu
Hi Chanwoo, On 03/18/2016 03:52 PM, Chanwoo Choi wrote: > Hi Baolu, > > On 2016년 03월 18일 15:32, Lu Baolu wrote: >> Several Intel PCHs and SOCs have an internal mux that is used to >> share one USB port between device controller and host controller. >> >> A usb po

[PATCH v4 7/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-19 Thread Lu Baolu
Some Intel platforms have an USB port mux controlled by GPIOs. There's a single ACPI platform device that provides both USB ID extcon device and a USB port mux device. This MFD driver will split the 2 devices for their respective drivers. Signed-off-by: Lu Baolu Suggested-by: David

[PATCH v4 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-19 Thread Lu Baolu
HOST and PERIPHERAL; 3) The required action to do the real port switch. This patch adds the common code to handle usb port mux. With this common code, the individual mux driver, which always is platform dependent, could focus on the real operation of mux switch. Signed-off-by: Lu Baolu Reviewed-by

[PATCH v5 5/6] usb: mux: add driver for Intel drcfg controlled port mux

2016-03-19 Thread Lu Baolu
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between device controller and host controller. The mux is handled through the Dual Role Configuration Register. Signed-off-by: Heikki Krogerus Signed-off-by: Lu Baolu Signed-off-by: Wu Hao Reviewed-by: Felipe

Re: [PATCH v4 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-19 Thread Lu Baolu
function with unique id on patch[2] > [2] 5960387a2fb83 (usb: dwc3: omap: Replace deprecated API of extcon) Thanks. That's helpful. By the way, is extcon_get_extcon_dev() still available? > > I'm sorry for late reply. I add the some comment on below. Never mind. Thank you

Re: [PATCH v5 6/6] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-19 Thread Lu Baolu
On 03/18/2016 04:09 PM, Lee Jones wrote: > On Fri, 18 Mar 2016, Lu Baolu wrote: > >> Some Intel platforms have an USB port mux controlled by GPIOs. >> There's a single ACPI platform device that provides both USB ID >> extcon device and a USB port mux device. This M

[PATCH v5 1/6] extcon: usb-gpio: add device binding for platform device

2016-03-19 Thread Lu Baolu
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b

[PATCH v5 4/6] usb: mux: add driver for Intel gpio controlled port mux

2016-03-19 Thread Lu Baolu
In some Intel platforms, a single usb port is shared between USB host and device controller. The shared port is under control of GPIO pins. This patch adds the support for USB GPIO controlled port mux. Signed-off-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by

[PATCH v4 6/7] usb: pci-quirks: add Intel USB drcfg mux device

2016-03-19 Thread Lu Baolu
mux switch. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/usb/host/pci-quirks.c| 47 ++-- drivers/usb/host/xhci-ext-caps.h | 2 ++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb

[PATCH v5 6/6] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-19 Thread Lu Baolu
Some Intel platforms have an USB port mux controlled by GPIOs. There's a single ACPI platform device that provides both USB ID extcon device and a USB port mux device. This MFD driver will split the 2 devices for their respective drivers. Signed-off-by: Lu Baolu Suggested-by: David

[PATCH v5 2/6] extcon: usb-gpio: add support for ACPI gpio interface

2016-03-19 Thread Lu Baolu
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon

[PATCH v4 5/7] usb: mux: add driver for Intel drcfg controlled port mux

2016-03-19 Thread Lu Baolu
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between device controller and host controller. The mux is handled through the Dual Role Configuration Register. Signed-off-by: Heikki Krogerus Signed-off-by: Lu Baolu Signed-off-by: Wu Hao Reviewed-by: Felipe

[PATCH v4 1/7] extcon: usb-gpio: add device binding for platform device

2016-03-19 Thread Lu Baolu
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b

[PATCH v5 3/6] usb: mux: add common code for Intel dual role port mux

2016-03-19 Thread Lu Baolu
HOST and PERIPHERAL; 3) The required action to do the real port switch. This patch adds the common code to handle usb port mux. With this common code, the individual mux driver, which always is platform dependent, could focus on the real operation of mux switch. Signed-off-by: Lu Baolu Reviewed-by

[PATCH v4 2/7] extcon: usb-gpio: add support for ACPI gpio interface

2016-03-19 Thread Lu Baolu
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon

[PATCH v4 0/7] usb: add support for Intel dual role port mux

2016-03-19 Thread Lu Baolu
USB port mux controlled through memory mapped registers and the logic to create the mux device. This type of dual role port mux could be found in Cherry Trail and Broxton devices. Lu Baolu (7): extcon: usb-gpio: add device binding for platform device extcon: usb-gpio: add support

Re: [PATCH v4 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-18 Thread Lu Baolu
On 03/17/2016 03:27 PM, Chanwoo Choi wrote: > Hi Lu, > > On 2016년 03월 17일 16:16, Lu Baolu wrote: >> Hi Chanwoo, >> >> On 03/17/2016 02:07 PM, Chanwoo Choi wrote: >>> Hi Lu, >>> >>> To handle extcon (external connector), I implemented th

Re: [PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-14 Thread Lu Baolu
On 03/14/2016 11:27 AM, Greg Kroah-Hartman wrote: > On Mon, Mar 14, 2016 at 09:09:22AM +0800, Lu Baolu wrote: >> On 03/11/2016 08:06 AM, Greg Kroah-Hartman wrote: >>> On Tue, Mar 08, 2016 at 03:53:44PM +0800, Lu Baolu wrote: >>>> +struct intel_mux_dev { >>>

Re: [PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-13 Thread Lu Baolu
Hi, On 03/11/2016 08:06 AM, Greg Kroah-Hartman wrote: > On Tue, Mar 08, 2016 at 03:53:44PM +0800, Lu Baolu wrote: >> Several Intel PCHs and SOCs have an internal mux that is used to >> share one USB port between device controller and host controller. >> >> A usb port

Re: [PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-10 Thread Lu Baolu
On 03/11/2016 07:57 AM, Greg Kroah-Hartman wrote: > On Thu, Mar 10, 2016 at 01:39:43PM +0100, Oliver Neukum wrote: >> On Tue, 2016-03-08 at 15:53 +0800, Lu Baolu wrote: >> >>> diff --git a/Documentation/ABI/testing/sysfs-bus-platform >>> b/Documentation/ABI/tes

Re: [PATCH v3 0/7] usb: add support for Intel dual role port mux

2016-03-10 Thread Lu Baolu
On 03/11/2016 08:03 AM, Greg Kroah-Hartman wrote: > On Tue, Mar 08, 2016 at 03:53:41PM +0800, Lu Baolu wrote: >> Intel SOC chips are featured with USB dual role. The host role is >> provided by Intel xHCI IP, and the gadget role is provided by IP >> from designware. Ta

[PATCH v3 5/7] usb: mux: add driver for Intel drcfg controlled port mux

2016-03-07 Thread Lu Baolu
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between device controller and host controller. The mux is handled through the Dual Role Configuration Register. Signed-off-by: Heikki Krogerus Signed-off-by: Lu Baolu Signed-off-by: Wu Hao Reviewed-by: Felipe

[PATCH v3 2/7] extcon: usb-gpio: add support for ACPI gpio interface

2016-03-07 Thread Lu Baolu
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon

[PATCH v3 1/7] extcon: usb-gpio: add device binding for platform device

2016-03-07 Thread Lu Baolu
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b

[PATCH v3 6/7] usb: pci-quirks: add Intel USB drcfg mux device

2016-03-07 Thread Lu Baolu
mux switch. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/usb/host/pci-quirks.c| 47 ++-- drivers/usb/host/xhci-ext-caps.h | 2 ++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb

[PATCH v3 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-07 Thread Lu Baolu
HOST and PERIPHERAL; 3) The required action to do the real port switch. This patch adds the common code to handle usb port mux. With this common code, the individual mux driver, which always is platform dependent, could focus on the real operation of mux switch. Signed-off-by: Lu Baolu Reviewed-by

[PATCH v3 7/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-07 Thread Lu Baolu
Some Intel platforms have an USB port mux controlled by GPIOs. There's a single ACPI platform device that provides both USB ID extcon device and a USB port mux device. This MFD driver will split the 2 devices for their respective drivers. Signed-off-by: Lu Baolu Suggested-by: David

[PATCH v3 4/7] usb: mux: add driver for Intel gpio controlled port mux

2016-03-07 Thread Lu Baolu
In some Intel platforms, a single usb port is shared between USB host and device controller. The shared port is under control of GPIO pins. This patch adds the support for USB GPIO controlled port mux. Signed-off-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by

[PATCH v3 0/7] usb: add support for Intel dual role port mux

2016-03-07 Thread Lu Baolu
USB port mux controlled through memory mapped registers and the logic to create the mux device. This type of dual role port mux could be found in Cherry Trail and Broxton devices. Lu Baolu (7): extcon: usb-gpio: add device binding for platform device extcon: usb-gpio: add support

Re: [PATCH v2 7/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-07 Thread Lu Baolu
On 03/08/2016 12:40 PM, Lee Jones wrote: > On Mon, 07 Mar 2016, Lu Baolu wrote: > >> Some Intel platforms have an USB port mux controlled by GPIOs. >> There's a single ACPI platform device that provides both USB ID >> extcon device and a USB port mux device. This M

[PATCH v2 6/7] usb: pci-quirks: add Intel USB drcfg mux device

2016-03-07 Thread Lu Baolu
mux switch. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/usb/host/pci-quirks.c| 47 ++-- drivers/usb/host/xhci-ext-caps.h | 2 ++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb

[PATCH v2 3/7] usb: mux: add common code for Intel dual role port mux

2016-03-07 Thread Lu Baolu
HOST and PERIPHERAL; 3) The required action to do the real port switch. This patch adds the common code to handle usb port mux. With this common code, the individual mux driver, which always is platform dependent, could focus on the real operation of mux switch. Signed-off-by: Lu Baolu Reviewed-by

[PATCH v2 2/7] extcon: usb-gpio: add support for ACPI gpio interface

2016-03-07 Thread Lu Baolu
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon

[PATCH v2 5/7] usb: mux: add driver for Intel drcfg controlled port mux

2016-03-07 Thread Lu Baolu
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between device controller and host controller. The mux is handled through the Dual Role Configuration Register. Signed-off-by: Heikki Krogerus Signed-off-by: Lu Baolu Signed-off-by: Wu Hao Reviewed-by: Felipe

[PATCH v2 4/7] usb: mux: add driver for Intel gpio controlled port mux

2016-03-07 Thread Lu Baolu
In some Intel platforms, a single usb port is shared between USB host and device controller. The shared port is under control of GPIO pins. This patch adds the support for USB GPIO controlled port mux. Signed-off-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by

[PATCH v2 7/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-07 Thread Lu Baolu
Some Intel platforms have an USB port mux controlled by GPIOs. There's a single ACPI platform device that provides both USB ID extcon device and a USB port mux device. This MFD driver will split the 2 devices for their respective drivers. Signed-off-by: Lu Baolu Suggested-by: David

[PATCH v2 1/7] extcon: usb-gpio: add device binding for platform device

2016-03-07 Thread Lu Baolu
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi Acked-by: Chanwoo Choi --- drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b

[PATCH v2 0/7] usb: add support for Intel dual role port mux

2016-03-07 Thread Lu Baolu
USB port mux controlled through memory mapped registers and the logic to create the mux device. This type of dual role port mux could be found in Cherry Trail and Broxton devices. Lu Baolu (7): extcon: usb-gpio: add device binding for platform device extcon: usb-gpio: add support

Re: [PATCH 5/7] usb: misc: add driver for Intel drcfg controlled port mux

2016-03-03 Thread Lu Baolu
On 03/04/2016 09:44 AM, Greg Kroah-Hartman wrote: > On Fri, Mar 04, 2016 at 09:38:58AM +0800, Lu Baolu wrote: >> >> On 03/04/2016 12:14 AM, Greg Kroah-Hartman wrote: >>> On Thu, Mar 03, 2016 at 02:37:42PM +0800, Lu Baolu wrote: >>>> Several Intel PCHs and SO

Re: [PATCH 5/7] usb: misc: add driver for Intel drcfg controlled port mux

2016-03-03 Thread Lu Baolu
On 03/04/2016 12:12 AM, Greg Kroah-Hartman wrote: > On Thu, Mar 03, 2016 at 02:37:42PM +0800, Lu Baolu wrote: >> Several Intel PCHs and SOCs have an internal mux that is used to >> share one USB port between device controller and host controller. >> The mux is handled

Re: [PATCH 5/7] usb: misc: add driver for Intel drcfg controlled port mux

2016-03-03 Thread Lu Baolu
On 03/04/2016 12:14 AM, Greg Kroah-Hartman wrote: > On Thu, Mar 03, 2016 at 02:37:42PM +0800, Lu Baolu wrote: >> Several Intel PCHs and SOCs have an internal mux that is used to >> share one USB port between device controller and host controller. >> The mux is handled

Re: [PATCH 3/7] usb: misc: add common code for Intel dual role port mux

2016-03-03 Thread Lu Baolu
On 03/04/2016 12:15 AM, Greg Kroah-Hartman wrote: > On Thu, Mar 03, 2016 at 02:37:40PM +0800, Lu Baolu wrote: >> +#if IS_ENABLED(CONFIG_USB_MUX) >> +extern int usb_mux_register(struct usb_mux_dev *mux); >> +extern int usb_mux_unregister(struct device *dev); >>

Re: [PATCH 3/7] usb: misc: add common code for Intel dual role port mux

2016-03-03 Thread Lu Baolu
On 03/04/2016 12:10 AM, Greg Kroah-Hartman wrote: > On Thu, Mar 03, 2016 at 02:37:40PM +0800, Lu Baolu wrote: >> Several Intel PCHs and SOCs have an internal mux that is used to >> share one USB port between device controller and host controller. >> >> A usb port mux

Re: [PATCH 2/7] extcon: usb-gpio: add support for ACPI gpio interface

2016-03-02 Thread Lu Baolu
On 03/03/2016 03:24 PM, Chanwoo Choi wrote: > Hi Lu, > > On 2016년 03월 03일 15:37, Lu Baolu wrote: >> GPIO resource could be retrieved through APCI as well. >> >> Signed-off-by: Lu Baolu >> Reviewed-by: Felipe Balbi >> --- >> drivers/extcon/ex

Re: [PATCH 1/7] extcon: usb-gpio: add device binding for platform device

2016-03-02 Thread Lu Baolu
On 03/03/2016 03:24 PM, Chanwoo Choi wrote: > Hell Lu, > > On 2016년 03월 03일 15:37, Lu Baolu wrote: >> This is needed to handle the GPIO connected USB ID pin found on >> Intel Baytrail devices. >> >> Signed-off-by: Lu Baolu >> Reviewed-by: Felipe Balb

[PATCH 1/7] extcon: usb-gpio: add device binding for platform device

2016-03-02 Thread Lu Baolu
This is needed to handle the GPIO connected USB ID pin found on Intel Baytrail devices. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/extcon/extcon-usb-gpio.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb

[PATCH 2/7] extcon: usb-gpio: add support for ACPI gpio interface

2016-03-02 Thread Lu Baolu
GPIO resource could be retrieved through APCI as well. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/extcon/extcon-usb-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index af9c8b0

[PATCH 4/7] usb: misc: add driver for Intel gpio controlled port mux

2016-03-02 Thread Lu Baolu
In some Intel platforms, a single usb port is shared between USB host and device controller. The shared port is under control of GPIO pins. This patch adds the support for USB GPIO controlled port mux. Signed-off-by: David Cohen Signed-off-by: Lu Baolu Reviewed-by: Heikki Krogerus Reviewed-by

[PATCH 5/7] usb: misc: add driver for Intel drcfg controlled port mux

2016-03-02 Thread Lu Baolu
Several Intel PCHs and SOCs have an internal mux that is used to share one USB port between device controller and host controller. The mux is handled through the Dual Role Configuration Register. Signed-off-by: Heikki Krogerus Signed-off-by: Lu Baolu Signed-off-by: Wu Hao Reviewed-by: Felipe

[PATCH 3/7] usb: misc: add common code for Intel dual role port mux

2016-03-02 Thread Lu Baolu
HOST and PERIPHERAL; 3) The required action to do the real port switch. This patch adds the common code to handle usb port mux. With this common code, the individual mux driver, which always is platform dependent, could focus on the real operation of mux switch. Signed-off-by: Lu Baolu Reviewed-by

[PATCH 0/7] usb: add support for Intel dual role port mux

2016-03-02 Thread Lu Baolu
USB port mux controlled through memory mapped registers and the logic to create the mux device. This type of dual role port mux could be found in Cherry Trail and Broxton devices. Lu Baolu (7): extcon: usb-gpio: add device binding for platform device extcon: usb-gpio: add support

[PATCH 7/7] mfd: intel_vuport: Add Intel virtual USB port MFD Driver

2016-03-02 Thread Lu Baolu
Some Intel platforms have an USB port mux controlled by GPIOs. There's a single ACPI platform device that provides both USB ID extcon device and a USB port mux device. This MFD driver will split the 2 devices for their respective drivers. Signed-off-by: Lu Baolu Suggested-by: David

[PATCH 6/7] usb: pci-quirks: add Intel USB drcfg mux device

2016-03-02 Thread Lu Baolu
mux switch. Signed-off-by: Lu Baolu Reviewed-by: Felipe Balbi --- drivers/usb/host/pci-quirks.c| 47 ++-- drivers/usb/host/xhci-ext-caps.h | 2 ++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb

Re: [PATCH v7 07/10] usb: dbc: handle endpoint stall

2016-03-02 Thread Lu Baolu
On 03/02/2016 08:58 PM, Felipe Balbi wrote: > Hi, > > Mathias Nyman writes: >> [ text/plain ] >> On 26.01.2016 14:58, Lu Baolu wrote: >>> In case of endpoint stall, software is able to detect the situation >>> by reading DCCTRL.HIT or DCCTRL.HOT bits. DbC

Re: [PATCH v7 07/10] usb: dbc: handle endpoint stall

2016-03-02 Thread Lu Baolu
On 03/02/2016 08:58 PM, Mathias Nyman wrote: > On 26.01.2016 14:58, Lu Baolu wrote: >> In case of endpoint stall, software is able to detect the situation >> by reading DCCTRL.HIT or DCCTRL.HOT bits. DbC follows the normal USB >> framework to handle endpoint stall. When soft

Re: [PATCH v7 05/10] usb: dbc: add bulk out and bulk in interfaces

2016-02-18 Thread Lu Baolu
On 02/18/2016 09:32 PM, Mathias Nyman wrote: > On 26.01.2016 14:58, Lu Baolu wrote: >> This patch adds interfaces for bulk out and bulk in ops. These >> interfaces could be used to implement early printk bootconsole >> or hook to various system debuggers. >>

Re: [PATCH v7 04/10] usb: dbc: add debug buffer

2016-02-18 Thread Lu Baolu
On 02/18/2016 07:43 PM, Mathias Nyman wrote: > On 26.01.2016 14:58, Lu Baolu wrote: >> "printk" is not suitable for dbc debugging especially when console >> is in usage. This patch adds a debug buffer in dbc driver and puts >> the debug messages in this local bu

Re: [PATCH v7 02/10] usb: dbc: probe and setup xhci debug capability

2016-02-17 Thread Lu Baolu
Helgaas and Dan Williams in case they have an opinoin about > the DMA and PCI cases. All the quirks in this file have been documented and verified to work. Your concerns are right, I'll be glad to see other opinions. > > > more comments inline > > On 26.01.2016 14:58

Re: [PATCH v7 00/10] usb: early: add support for early printk through USB3 debug port

2016-02-03 Thread Lu Baolu
On 02/04/2016 05:43 AM, Greg Kroah-Hartman wrote: > On Tue, Feb 02, 2016 at 10:34:34PM +0800, Lu Baolu wrote: >> >> On 01/26/2016 08:58 PM, Lu Baolu wrote: >>> Hi, >>> >>> This patch series adds support for early printk through USB3 debug port

Re: [PATCH v7 00/10] usb: early: add support for early printk through USB3 debug port

2016-02-02 Thread Lu Baolu
On 01/26/2016 08:58 PM, Lu Baolu wrote: > Hi, > > This patch series adds support for early printk through USB3 debug port. > USB3 debug port is described in xHCI specification as an optional extended > capability. > > Patch 1 to 9 add the driver for xHCI debug capabilit

[PATCH v7 03/10] usb: dbc: add support for Intel xHCI dbc quirk

2016-01-26 Thread Lu Baolu
a port reset to the debug port from the host xHCI. This patch introduces this work around. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 52 include/linux/usb/xhci-dbc.h | 2 ++ 2 files changed, 54 insertions(+) diff --git a/drivers/usb

[PATCH v7 00/10] usb: early: add support for early printk through USB3 debug port

2016-01-26 Thread Lu Baolu
ned expression compared with zero: size > 0 (3) add fix for 0-DAY kernel test error: arch/x86/built-in.o: In function `setup_early_printk': early_printk.c:(.init.text+0xceba): undefined reference to `early_xdbc_init' early_printk.c:(.init.text+0xcec8): undefined reference

[PATCH v7 04/10] usb: dbc: add debug buffer

2016-01-26 Thread Lu Baolu
DBC_DEBUG is defined. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 62 ++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 41ce116..6855048 100644 --- a/drivers

[PATCH v7 02/10] usb: dbc: probe and setup xhci debug capability

2016-01-26 Thread Lu Baolu
between the debug host and target. Signed-off-by: Lu Baolu --- MAINTAINERS | 7 + arch/x86/Kconfig.debug | 12 + drivers/usb/early/Makefile | 1 + drivers/usb/early/xhci-dbc.c | 774 +++ include/linux/usb/xhci-dbc.h | 187

[PATCH v7 05/10] usb: dbc: add bulk out and bulk in interfaces

2016-01-26 Thread Lu Baolu
This patch adds interfaces for bulk out and bulk in ops. These interfaces could be used to implement early printk bootconsole or hook to various system debuggers. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 373 +++ include/linux/usb/xhci

[PATCH v7 10/10] usb: doc: add document for xHCI DbC driver

2016-01-26 Thread Lu Baolu
Add Documentation/usb/xhci-dbc.txt. This document includes development status and user guide for USB3 debug port. Signed-off-by: Lu Baolu --- Documentation/usb/xhci-dbc.txt | 350 + MAINTAINERS| 1 + drivers/usb/early/xhci-dbc.c

[PATCH v7 09/10] usb: dbc: add handshake between debug target and host

2016-01-26 Thread Lu Baolu
'y' in the tty application. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 6c24ba0..1806ea1 100644 --- a/drivers/usb/early/xhci-dbc

[PATCH v7 01/10] x86: fixmap: add permanent fixmap for xhci debug port

2016-01-26 Thread Lu Baolu
fixed_addresses table for xHCI mmio access. Signed-off-by: Lu Baolu --- arch/x86/include/asm/fixmap.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 6d7d0e5..84298cb 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include

[PATCH v7 06/10] usb: dbc: handle dbc-configured exit

2016-01-26 Thread Lu Baolu
DbC might exit configured state in some cases (refer to 7.6.4.4 in xHCI spec 1.1). Software needs detect and clear this situation by clearing DCCTRL.DCR and wait until the DbC configured before read or write oprations. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 28

[PATCH v7 08/10] x86: early_printk: add USB3 debug port earlyprintk support

2016-01-26 Thread Lu Baolu
Add support for early printk by writing debug messages to the USB3 debug port. Users can use this type of early printk by specifying kernel parameter of "earlyprintk=xdbc". This gives users a chance of providing debug output. Signed-off-by: Lu Baolu --- Documentation/kernel-parameter

[PATCH v7 07/10] usb: dbc: handle endpoint stall

2016-01-26 Thread Lu Baolu
. Signed-off-by: Lu Baolu --- drivers/usb/early/xhci-dbc.c | 36 1 file changed, 36 insertions(+) diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index c81df40..344d93e 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early

Re: [PATCH v6 10/12] usb: dbc: add handshake between debug target and host

2016-01-26 Thread Lu Baolu
d test robot wrote: > >> CC: kbuild-...@01.org >> In-Reply-To: <1453781665-4714-11-git-send-email-baolu...@linux.intel.com> >> TO: Lu Baolu >> CC: Greg Kroah-Hartman >> CC: linux-...@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu >> >>

Re: [PATCH v6 03/12] usb: dbc: probe and setup xhci debug capability

2016-01-26 Thread Lu Baolu
On 01/26/2016 03:36 PM, Greg Kroah-Hartman wrote: > On Tue, Jan 26, 2016 at 12:14:16PM +0800, Lu Baolu wrote: >> xHCI debug capability (DbC) is an optional functionality provided >> by an xHCI host controller. Software learns this capability by >> walking through the extend

[PATCH v6 02/12] x86: fixmap: add permanent fixmap for xhci debug port

2016-01-25 Thread Lu Baolu
fixed_addresses table for xHCI mmio access. Signed-off-by: Lu Baolu --- arch/x86/include/asm/fixmap.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h index 6d7d0e5..84298cb 100644 --- a/arch/x86/include/asm/fixmap.h +++ b/arch/x86/include

<    5   6   7   8   9   10   11   12   13   >