Re: [PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-09-05 Thread Loic Poulain
Hi Johan, On 4 September 2018 at 14:47, Johan Hovold wrote: > On Sat, Aug 04, 2018 at 12:17:15PM +0200, Loic Poulain wrote: >> Some FTDI devices like FTX or FT232R support CBUS Bit Bang mode on CBUS >> pins, allowing host to control them via simple USB control transfers. >>

[PATCH v3 6/6] arm: dts: qcom: db410c: Enable USB OTG support

2018-09-04 Thread Loic Poulain
these events, point two times to this extcon device. Signed-off-by: Loic Poulain --- v2: no change v3: Point two times to the same extcon-usb-device arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 20 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 11 ++- 2

[PATCH v3 5/6] phy: qcom-usb-hs: Fix unbalanced notifier registration

2018-09-04 Thread Loic Poulain
Phy power on/off cycle can happen several times during device life. We then need to balance the extcon notifier registration accordingly. Fixes: f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") Signed-off-by: Loic Poulain --- v2: don't use devres version (power-on alway

[PATCH v3 4/6] usb: chipidea: Fix otg event handler

2018-09-04 Thread Loic Poulain
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it. Signed-off-by: Loic Poulain --- v2: v3: no change drivers/usb/chipidea/otg.c

[PATCH v3 1/6] usb: chipidea: Add dynamic pinctrl selection

2018-09-04 Thread Loic Poulain
efined by the device, they are respectively selected on host/device role start. If a default pinctrl exist, it is restored on host/device role stop. Signed-off-by: Loic Poulain --- v2: includes ordering v3: no change drivers/usb/chipidea/core.c | 19 +++ drivers/usb/c

[PATCH v3 3/6] usb: chipidea: Prevent unbalanced IRQ disable

2018-09-04 Thread Loic Poulain
ction to cover queue work operations") Signed-off-by: Loic Poulain --- v2: v3: no change drivers/usb/chipidea/otg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h index 7e7428e..4f8b817 100644 --- a/drivers/usb/chip

[PATCH v3 2/6] doc: usb: ci-hdrc-usb2: Add pinctrl properties definition

2018-09-04 Thread Loic Poulain
efined by the device, they are respectively selected on host/device role start. Signed-off-by: Loic Poulain --- v2: Add new pin modes documentation (host, device) v3: rebase on usb-next Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Docu

Re: [PATCH v2 3/7] usb: chipidea: Support generic usb extcon

2018-08-29 Thread Loic Poulain
ins. >> >> In case only one extcon device is associated to the USB device, and this >> device >> supports USB and USB-HOST cable states, we now use it for both VBUS (USB) and >> ID (USB-HOST) notifier. >> >> Signed-off-by: Loic Poulain >> --- >&

[PATCH v2 2/7] doc: usb: ci-hdrc-usb2: Add pinctrl properties definition

2018-08-27 Thread Loic Poulain
efined by the device, they are respectively selected on host/device role start. Signed-off-by: Loic Poulain --- v2: Add new pin modes documentation (host, device) Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindi

[PATCH v2 5/7] usb: chipidea: Fix otg event handler

2018-08-27 Thread Loic Poulain
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it. Signed-off-by: Loic Poulain --- v2: no change drivers/usb/chipidea/otg.c | 9

[PATCH v2 6/7] phy: qcom-usb-hs: Fix unbalanced notifier registration

2018-08-27 Thread Loic Poulain
Phy power on/off cycle can happen several times during device life. We then need to balance the extcon notifier registration accordingly. Fixes: f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") Signed-off-by: Loic Poulain --- v2: don't use devres version (power-on alway

[PATCH v2 4/7] usb: chipidea: Prevent unbalanced IRQ disable

2018-08-27 Thread Loic Poulain
ction to cover queue work operations") Signed-off-by: Loic Poulain --- v2: no change drivers/usb/chipidea/otg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h index 9ecb598..a5557c7 100644 --- a/drivers/usb/chip

[PATCH v2 3/7] usb: chipidea: Support generic usb extcon

2018-08-27 Thread Loic Poulain
and USB-HOST cable states, we now use it for both VBUS (USB) and ID (USB-HOST) notifier. Signed-off-by: Loic Poulain --- v2: no change drivers/usb/chipidea/core.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index cdac778

[PATCH v2 7/7] arm: dts: qcom: db410c: Enable USB OTG support

2018-08-27 Thread Loic Poulain
2.0 micro B port. Routing is selected via USB_SW_SEL_PM gpio. In device role USB HUB can be held in reset. Signed-off-by: Loic Poulain --- v2: no change arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 20 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 9

[PATCH v2 1/7] usb: chipidea: Add dynamic pinctrl selection

2018-08-27 Thread Loic Poulain
efined by the device, they are respectively selected on host/device role start. If a default pinctrl exist, it is restored on host/device role stop. Signed-off-by: Loic Poulain --- v2: includes ordering drivers/usb/chipidea/core.c | 19 +++ drivers/usb/chipidea/host.c | 9 ++

Re: [PATCH 1/6] usb: chipidea: Add dynamic pinctrl selection

2018-08-24 Thread Loic Poulain
On 23 August 2018 at 12:11, Andy Shevchenko wrote: > On Tue, Aug 21, 2018 at 4:57 PM Loic Poulain wrote: >> >> Some hardware implementations require to configure pins differently >> according to the USB role (host/device), this can be an update of the >> pins rou

Re: [PATCH 5/6] phy: qcom-usb-hs: Fix unbalanced notifier registration

2018-08-24 Thread Loic Poulain
On 23 August 2018 at 19:27, Bjorn Andersson wrote: > On Tue 21 Aug 06:55 PDT 2018, Loic Poulain wrote: > >> Phy power on/off cycle can happen several times during device life. >> We then need to balance the extcon notifier registration accordingly. >> >> Fixes: f

Re: [PATCH 1/6] usb: chipidea: Add dynamic pinctrl selection

2018-08-23 Thread Loic Poulain
Hi Bjorn, On 23 August 2018 at 16:53, Bjorn Andersson wrote: > On Tue 21 Aug 06:55 PDT 2018, Loic Poulain wrote: > >> Some hardware implementations require to configure pins differently >> according to the USB role (host/device), this can be an update of the >> pins

Re: [PATCH 6/6] arm: dts: qcom: db410c: Enable USB OTG support

2018-08-22 Thread Loic Poulain
On 21 August 2018 at 18:09, Rob Herring wrote: > On Tue, Aug 21, 2018 at 8:56 AM Loic Poulain wrote: >> >> The Dragonboard-410c is able to act either as USB Host or Device. >> The role can be determined at runtime via the USB_HS_ID pin which is >> derived from

[PATCH 6/6] arm: dts: qcom: db410c: Enable USB OTG support

2018-08-21 Thread Loic Poulain
2.0 micro B port. Routing is selected via USB_SW_SEL_PM gpio. In device role USB HUB can be held in reset. Signed-off-by: Loic Poulain --- arch/arm64/boot/dts/qcom/apq8016-sbc-pmic-pins.dtsi | 20 arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi | 9 + 2 files

[PATCH 2/6] usb: chipidea: Support generic usb extcon

2018-08-21 Thread Loic Poulain
and USB-HOST cable states, we now use it for both VBUS (USB) and ID (USB-HOST) notifier. Signed-off-by: Loic Poulain --- drivers/usb/chipidea/core.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 03e52fc..c595718 100644

[PATCH 1/6] usb: chipidea: Add dynamic pinctrl selection

2018-08-21 Thread Loic Poulain
efined by the device, they are respectively selected on host/device role start. If a default pinctrl exist, it is restored on host/device role stop. Signed-off-by: Loic Poulain --- drivers/usb/chipidea/core.c | 19 +++ drivers/usb/chipidea/host.c | 9 + drivers/usb/c

[PATCH 5/6] phy: qcom-usb-hs: Fix unbalanced notifier registration

2018-08-21 Thread Loic Poulain
Phy power on/off cycle can happen several times during device life. We then need to balance the extcon notifier registration accordingly. Fixes: f0b5c2c96370 ("phy: qcom-usb-hs: Replace the extcon API") Signed-off-by: Loic Poulain --- drivers/phy/qualcomm/phy-qcom-usb-hs.c | 6

[PATCH 3/6] usb: chipidea: Prevent unbalanced IRQ disable

2018-08-21 Thread Loic Poulain
ction to cover queue work operations") Signed-off-by: Loic Poulain --- drivers/usb/chipidea/otg.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/otg.h b/drivers/usb/chipidea/otg.h index 7e7428e..4f8b817 100644 --- a/drivers/usb/chipidea/otg.h +++ b/d

[PATCH 4/6] usb: chipidea: Fix otg event handler

2018-08-21 Thread Loic Poulain
At OTG work running time, it's possible that several events need to be addressed (e.g. ID and VBUS events). The current implementation handles only one event at a time which leads to ignoring the other one. Fix it. Signed-off-by: Loic Poulain --- drivers/usb/chipidea/otg.c | 9 ++--- 1 file

Re: [PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-08-20 Thread Loic Poulain
Hi Johan, On 4 August 2018 at 12:17, Loic Poulain wrote: > Some FTDI devices like FTX or FT232R support CBUS Bit Bang mode on CBUS > pins, allowing host to control them via simple USB control transfers. > To make use of a CBUS pin in Bit Bang mode, the pin must be configured >

[PATCH v3] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-08-04 Thread Loic Poulain
-send-email-ste...@agner.ch Signed-off-by: Loic Poulain --- v2: Use message-id for LKML reference Rework read_eeprom according to Andy's comment and return read count Remove noisy messages Comment style alignment Add defines for magic values Cannot use devm, because gpiochip

[PATCH v2] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-08-04 Thread Loic Poulain
-send-email-ste...@agner.ch Signed-off-by: Loic Poulain --- v2: Use message-id for LKML reference Rework read_eeprom according to Andy's comment and return read count Remove noisy messages Comment style alignment Add defines for magic values Cannot use devm, because gpiochip

Re: [PATCH] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-08-01 Thread Loic Poulain
Thanks Andy, On 1 August 2018 at 18:08, Andy Shevchenko wrote: > On Wed, Aug 1, 2018 at 6:46 PM, Loic Poulain wrote: >> Some FTDI devices like FTX or FT232R support CBUS Bit Bang mode on CBUS >> pins, allowing host to control them via simple USB control transfers. >> To m

[PATCH] USB: serial: ftdi_sio: Add support for CBUS GPIO

2018-08-01 Thread Loic Poulain
). Signed-off-by: Loic Poulain --- drivers/usb/serial/Kconfig| 9 ++ drivers/usb/serial/ftdi_sio.c | 222 ++ drivers/usb/serial/ftdi_sio.h | 83 3 files changed, 314 insertions(+) diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial

Re: [PATCH v6] USB: serial: ftdi_sio: Add MTP NVM support

2018-07-15 Thread Loic Poulain
Hi Johan, Thanks for the review. On 10 July 2018 at 11:19, Johan Hovold wrote: > Hi, > > I finally found some time to dig into the ftdi eeprom handling. > > On Tue, Jun 26, 2018 at 02:54:48PM +0200, Loic Poulain wrote: >> Most of FTDI's devices have an EEPROM which

Re: [PATCH v6] USB: serial: ftdi_sio: Add MTP NVM support

2018-07-09 Thread Loic Poulain
Hi Johan, On 29 June 2018 at 21:52, Ajay Gupta wrote: > Hi Loic. > Thanks for fixing comments. Looks good to me now. > > On 6/26/18, Loic Poulain wrote: >> Most of FTDI's devices have an EEPROM which records FTDI devices >> configuration setting (e.g. the VID, PID,

[PATCH v6] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-26 Thread Loic Poulain
support could integrate CBUS EEPROM configuration reading in order to determine which of the CBUS pins are available as GPIO. Reviewed-by: Andy Shevchenko Signed-off-by: Loic Poulain --- v2: Use ifdef instead of IS_ENABLED error message in case of nvmem registering failure Fix space/tab

Re: [PATCH v5] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-26 Thread Loic Poulain
Hi Andy, On 26 June 2018 at 13:02, Andy Shevchenko wrote: > On Mon, Jun 25, 2018 at 3:35 PM, Loic Poulain wrote: >> Most of FTDI's devices have an EEPROM which records FTDI devices >> configuration setting (e.g. the VID, PID, I/O config...) and user >> data. For example,

[PATCH v5] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Loic Poulain
support could integrate CBUS EEPROM configuration reading in order to determine which of the CBUS pins are available as GPIO. Signed-off-by: Loic Poulain --- v2: Use ifdef instead of IS_ENABLED error message in case of nvmem registering failure Fix space/tab in Kconfig v3: Make nvmem

[PATCH v4] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Loic Poulain
support could integrate CBUS EEPROM configuration reading in order to determine which of the CBUS pins are available as GPIO. Signed-off-by: Loic Poulain --- v2: Use ifdef instead of IS_ENABLED error message in case of nvmem registering failure Fix space/tab in Kconfig v3: Make nvmem

Re: [PATCH v3] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-25 Thread Loic Poulain
Hi Andy, On 25 June 2018 at 09:36, Andy Shevchenko wrote: > On Fri, Jun 22, 2018 at 5:22 PM, Loic Poulain wrote: >> Most of FTDI's devices have an EEPROM which records FTDI devices >> configuration setting (e.g. the VID, PID, I/O config...) and user >> data. > >>

[PATCH v3] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-22 Thread Loic Poulain
CBUS EEPROM configuration reading in order to determine which of the CBUS pins are available as GPIO. Signed-off-by: Loic Poulain --- v2: Use ifdef instead of IS_ENABLED error message in case of nvmem registering failure Fix space/tab in Kconfig v3: Make nvmem a child of the usb dev

Re: [PATCH v2] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-22 Thread Loic Poulain
Hi Ajay, Thanks for the review. On 21 June 2018 at 19:34, Ajay Gupta wrote: > Hi Loic > > On 6/21/18, Loic Poulain wrote: >> Most of FTDI's devices have an EEPROM which records FTDI devices >> configuration setting (e.g. the VID, PID, I/O config...) and user >> d

[PATCH v2] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-21 Thread Loic Poulain
CBUS EEPROM configuration reading in order to determine which of the CBUS pins are available as GPIO. Signed-off-by: Loic Poulain --- v2: Use ifdef instead of IS_ENABLED error message in case of nvmem registering failure Fix space/tab in Kconfig drivers/usb/serial/Kconfig| 13

Re: [PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-20 Thread Loic Poulain
Hi Johan, Srini, On 19 June 2018 at 15:06, Johan Hovold wrote: > On Tue, Jun 19, 2018 at 02:32:11PM +0200, Loic Poulain wrote: >> Hi Johan, Srini, >> >> On 18 June 2018 at 11:47, Srinivas Kandagatla >> wrote: >> > On 18/06/18 09:46, Johan Hovold wrote:

Re: [PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-19 Thread Loic Poulain
Hi Johan, Srini, On 18 June 2018 at 11:47, Srinivas Kandagatla wrote: > > > On 18/06/18 09:46, Johan Hovold wrote: >> >> On Thu, Jun 14, 2018 at 10:08:46PM +0200, Loic Poulain wrote: >>> >>> Most of FTDI's devices have an EEPROM which records FTDI devices

[PATCH] USB: serial: ftdi_sio: Add MTP NVM support

2018-06-14 Thread Loic Poulain
CBUS EEPROM configuration reading in order to determine which of the CBUS pins are available as GPIO. Signed-off-by: Loic Poulain --- drivers/usb/serial/Kconfig| 11 + drivers/usb/serial/ftdi_sio.c | 108 ++ drivers/usb/serial/ftdi_sio.h | 28