[PATCH v8 12/14] staging: typec: tcpci: keep the disconnected cc line open

2018-06-26 Thread Li Jun
While set polarity, we should keep the disconnected cc line to be open. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v8 13/14] staging: typec: tcpci: Only touch target bit when enable vconn

2018-06-26 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging

[PATCH v8 10/14] staging: typec: tcpci: enable vbus detection

2018-06-26 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/typec/tcpci.c b

[PATCH v8 11/14] typec: tcpm: add starting value for drp toggling

2018-06-26 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH v8 14/14] staging: typec: tcpci: move tcpci drivers out of staging

2018-06-26 Thread Li Jun
Move TCPCI(Typec port controller interface) driver and rt1711h driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 22

[PATCH v8 09/14] staging: typec: tcpci: register port before request irq

2018-06-26 Thread Li Jun
From: Peter Chen With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Reviewed-by: Heikki Krogerus Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 +-- 1

[PATCH v8 08/14] staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()

2018-06-26 Thread Li Jun
As tcpm_register_port() and tcpci_register_port() never return NULL and NULL is not a success in this case, use IS_ERR() to check the return value of both. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v8 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-26 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 131 +++ 1 file changed, 109 insertions(+), 22

[PATCH v8 07/14] staging: typec: tcpci: remove unused tcpci_tcpc_config

2018-06-26 Thread Li Jun
Since we will use config settings via device properties, so remove the hard code tcpci_tcpc_config. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v8 03/14] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-06-26 Thread Li Jun
Add nxp ptn5110 typec controller compatible string: "nxp,ptn5110", which is a standard tcpci chip with power delivery support. Meanwhile remove "usb,tcpci" because it doesn't follow the binding format rule and has not been used yet. Reviewed-by: Heikki Kroger

[PATCH v8 05/14] usb: typec: add API to get typec basic port power and data config

2018-06-26 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role by its name string. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 58 +++ include/linux/usb/typec.h | 3 +++ 2 files

[PATCH v8 04/14] usb: typec: add fwnode to tcpc

2018-06-26 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 +++ drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files

[PATCH v8 00/14] staging: typec: tcpci: move out of staging

2018-06-26 Thread Li Jun
ci driver when set polarity. - Directly enable vbus detect in tcpci driver rather than add a API. - Details added in each patch. [1] https://patchwork.kernel.org/patch/10231447/ [2] https://patchwork.kernel.org/patch/10276483/ [3] https://www.spinics.net/lists/linux-usb/msg166366.html Li Jun (13)

[PATCH v8 01/14] dt-bindings: connector: add properties for typec

2018-06-26 Thread Li Jun
Add bindings supported by current typec driver, so user can pass all those properties via dt. Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 44 +++ include/dt-bindings/usb/pd.h | 62

[PATCH v8 02/14] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-06-26 Thread Li Jun
ersion 1.1" Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 49 ++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/type

[PATCH v7 13/14] staging: typec: tcpci: Only touch target bit when enable vconn

2018-06-25 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging

[PATCH v7 14/14] staging: typec: tcpci: move tcpci drivers out of staging

2018-06-25 Thread Li Jun
Move TCPCI(Typec port controller interface) driver and rt1711h driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 22

[PATCH v7 08/14] staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()

2018-06-25 Thread Li Jun
As tcpm_register_port() and tcpci_register_port() never return NULL and NULL is not a success in this case, use IS_ERR() to check the return value of both. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v7 10/14] staging: typec: tcpci: enable vbus detection

2018-06-25 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/typec/tcpci.c b

[PATCH v7 09/14] staging: typec: tcpci: register port before request irq

2018-06-25 Thread Li Jun
From: Peter Chen With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Reviewed-by: Heikki Krogerus Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 +-- 1

[PATCH v7 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-25 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 132 +++ 1 file changed, 110 insertions(+), 22

[PATCH v7 12/14] staging: typec: tcpci: keep the disconnected cc line open

2018-06-25 Thread Li Jun
While set polarity, we should keep the disconnected cc line to be open. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v7 05/14] usb: typec: add API to get typec basic port power and data config

2018-06-25 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role by its name string. Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 58 +++ include/linux/usb/typec.h | 3 +++ 2 files changed, 57 insertions(+), 4

[PATCH v7 11/14] typec: tcpm: add starting value for drp toggling

2018-06-25 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH v7 07/14] staging: typec: tcpci: remove unused tcpci_tcpc_config

2018-06-25 Thread Li Jun
Since we will use config settings via device properties, so remove the hard code tcpci_tcpc_config. Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v7 04/14] usb: typec: add fwnode to tcpc

2018-06-25 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 +++ drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files

[PATCH v7 03/14] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-06-25 Thread Li Jun
Add nxp ptn5110 typec controller compatible string: "nxp,ptn5110", which is a standard tcpci chip with power delivery support. Meanwhile remove "usb,tcpci" because it doesn't follow the binding format rule and has not been used yet. Reviewed-by: Heikki Kroger

[PATCH v7 02/14] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-06-25 Thread Li Jun
ersion 1.1" Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 49 ++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/type

[PATCH v7 01/14] dt-bindings: connector: add properties for typec

2018-06-25 Thread Li Jun
Add bindings supported by current typec driver, so user can pass all those properties via dt. Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 44 +++ include/dt-bindings/usb/pd.h | 62

[PATCH v7 00/14] staging: typec: tcpci: move out of staging

2018-06-25 Thread Li Jun
set cc1/cc2 to be open in tcpci driver when set polarity. - Directly enable vbus detect in tcpci driver rather than add a API. - Details added in each patch. [1] https://patchwork.kernel.org/patch/10231447/ [2] https://patchwork.kernel.org/patch/10276483/ [3] https://www.spinics.net/lists/linux-us

[PATCH v6 10/15] staging: typec: tcpci: enable vbus detection

2018-05-27 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c

[PATCH v6 15/15] staging: typec: tcpci: move tcpci drivers out of staging

2018-05-27 Thread Li Jun
Move TCPCI(Typec port controller interface) driver and rt1711h driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 22

[PATCH v6 14/15] staging: typec: tcpci: Only touch target bit when enable vconn

2018-05-27 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v6 12/15] usb: typec: tcpm: set cc for drp toggling attach

2018-05-27 Thread Li Jun
In case of drp toggling, we may need set correct cc value for role control after attach as it may never been set. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index d885bff

[PATCH v6 06/15] usb: typec: tcpm: support get typec and pd config from device properties

2018-05-27 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 132 +++ 1 file changed, 110 insertions(+), 22 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers

[PATCH v6 13/15] staging: typec: tcpci: keep the disconnected cc line open

2018-05-27 Thread Li Jun
While set polarity, we should keep the disconnected cc line to be open. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index 4d3b0ae

[PATCH v6 11/15] typec: tcpm: add starting value for drp toggling

2018-05-27 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH v6 07/15] staging: typec: tcpci: remove unused tcpci_tcpc_config

2018-05-27 Thread Li Jun
Since we will use config settings via device properties, so remove the hard code tcpci_tcpc_config. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index e59547a

[PATCH v6 09/15] staging: typec: tcpci: register port before request irq

2018-05-27 Thread Li Jun
From: Peter Chen With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 +-- 1 file changed, 9 insertions(+), 6

[PATCH v6 05/15] usb: typec: add API to get typec basic port power and data config

2018-05-27 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role by its name string. Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 50 +++ include/linux/usb/typec.h | 3 +++ 2 files changed, 53 insertions(+) diff

[PATCH v6 03/15] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-05-27 Thread Li Jun
Add nxp ptn5110 typec controller compatible string: "nxp,ptn5110", which is a standard tcpci chip with power delivery support. Meanwhile remove "usb,tcpci" because it doesn't follow the binding format rule and has not been used yet. Signed-off-by: Li Jun --- drivers/

[PATCH v6 00/15] staging: typec: tcpci: move out of staging

2018-05-27 Thread Li Jun
le vbus detect in tcpci driver rather than add a API. - Details added in each patch. [1] https://patchwork.kernel.org/patch/10231447/ [2] https://patchwork.kernel.org/patch/10276483/ [3] https://www.spinics.net/lists/linux-usb/msg166366.html Li Jun (14): dt-bindings: connector: add properties for typec

[PATCH v6 02/15] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-05-27 Thread Li Jun
ersion 1.1" Reviewed-by: Rob Herring Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 49 ++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/type

[PATCH v6 08/15] staging: typec: tcpci: use IS_ERR() instead of PTR_ERR_OR_ZERO()

2018-05-27 Thread Li Jun
As tcpm_register_port() and tcpci_register_port() never return NULL and NULL is not a success in this case, use IS_ERR() to check the return value of both. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v6 04/15] usb: typec: add fwnode to tcpc

2018-05-27 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 +++ drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files changed, 10 insertions(+) diff

[PATCH v6 01/15] dt-bindings: connector: add properties for typec

2018-05-27 Thread Li Jun
Add bindings supported by current typec driver, so user can pass all those properties via dt. Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 44 +++ include/dt-bindings/usb/pd.h | 62 ++ 2 files changed, 106

[PATCH v5 13/14] staging: typec: tcpci: Only touch target bit when enable vconn

2018-05-02 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v5 14/14] staging: typec: tcpci: move tcpci driver out of staging

2018-05-02 Thread Li Jun
Move TCPCI(Typec port controller interface) driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/TODO | 5 - drivers/usb/typec/Kconfig | 7 +++ drivers

[PATCH v5 12/14] staging: typec: tcpci: keep the not connecting cc line open

2018-05-02 Thread Li Jun
While set polarity, we should keep the not connecting cc line to be open. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index 5c48810

[PATCH v5 11/14] usb: typec: tcpm: set cc for drp toggling attach

2018-05-02 Thread Li Jun
In case of drp toggling, we may need set correct cc value for role control after attach as it may never been set. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 0c7fa14

[PATCH v5 09/14] staging: typec: tcpci: enable vbus detection

2018-05-02 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c

[PATCH v5 10/14] typec: tcpm: add starting value for drp toggling

2018-05-02 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH v5 08/14] staging: typec: tcpci: register port before request irq

2018-05-02 Thread Li Jun
From: Peter Chen With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 +-- 1 file changed, 9 insertions(+), 6

[PATCH v5 04/14] usb: typec: add fwnode to tcpc

2018-05-02 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 +++ drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files changed, 10 insertions(+) diff

[PATCH v5 07/14] staging: typec: tcpci: remove unused tcpci_tcpc_config

2018-05-02 Thread Li Jun
Since we will use config settings via device properties, so remove the hard code tcpci_tcpc_config. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index 01d14fb

[PATCH v5 03/14] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-05-02 Thread Li Jun
Add nxp ptn5110 typec controller compatible string: usb-tcpci,ptn5110, which is a standard tcpci chip with power delivery support. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec

[PATCH v5 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-05-02 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 133 +++ 1 file changed, 111 insertions(+), 22 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers

[PATCH v5 05/14] usb: typec: add API to get typec basic port power and data config

2018-05-02 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role by its name string. Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 52 +++ include/linux/usb/typec.h | 3 +++ 2 files changed, 55 insertions(+) diff

[PATCH v5 02/14] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-05-02 Thread Li Jun
ersion 1.1" Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 49 ++ 1 file changed, 49 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/typec-tcpci.txt new file mo

[PATCH v5 00/14] staging: typec: tcpci: move out of staging

2018-05-02 Thread Li Jun
patch. [1] https://patchwork.kernel.org/patch/10231447/ [2] https://patchwork.kernel.org/patch/10276483/ [3] https://www.spinics.net/lists/linux-usb/msg166366.html Li Jun (13): dt-bindings: connector: add properties for typec dt-bindings: usb: add documentation for typec port controller(TCPCI)

[PATCH v5 01/14] dt-bindings: connector: add properties for typec

2018-05-02 Thread Li Jun
Add bingdings supported by current typec driver, so user can pass all those properties via dt. Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 44 +++ include/dt-bindings/usb/pd.h | 62 ++ 2 files changed, 106

[PATCH RFC] usb: typec: tcpm: remove operating_snk_mw for rdo

2018-04-16 Thread Li Jun
x27;t limit the PDO matching between the same type, so the rdo operating and max current/power calculation should be updated accordingly. [1]https://patchwork.kernel.org/patch/10342299/ Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 52 ++-- 1 file ch

[PATCH v5 3/5] dt-bindings: usb: fusb302: remove max-sink-* properties

2018-04-16 Thread Li Jun
Remove max-sink-* properties since they are deprecated. Reviewed-by: Rob Herring Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/fcs,fusb302.txt | 6 -- 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs

[PATCH v5 1/5] usb: typec: tcpm: pdo matching optimization

2018-04-16 Thread Li Jun
f one sink pdo. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 105 ++- 1 file changed, 67 insertions(+), 38 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 677d121..048b953 100644 ---

[PATCH v5 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw

2018-04-16 Thread Li Jun
Since there is no user of max_snk_*, so we can remove them from tcpm. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 include/linux/usb/tcpm.h | 9 - 2 files changed, 21 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb

[PATCH v5 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-16 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/fusb302/fusb302.c | 42 - 1 file changed, 28 insertions(+), 14 deletions(-) diff --git

[PATCH v5 4/5] usb: typec: wcove: remove max_snk_* for sink config

2018-04-16 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/typec_wcove.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/typec/typec_wcove.c b

[PATCH v5 0/5] usb: typec: remove max_snk_mv/ma/mw

2018-04-16 Thread Li Jun
Convert the device properties passing max_snk_* to be a variable sink pdo for fusb302. Li Jun (5): usb: typec: tcpm: pdo matching optimization usb: typec: fusb302: remove max_snk_* for sink config dt-bindings: usb: fusb302: remove max-sink-* properties usb: typec: wcove: remove max_snk_* for

[PATCH v4 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw

2018-04-13 Thread Li Jun
Since there is no user of max_snk_*, so we can remove them from tcpm. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 include/linux/usb/tcpm.h | 9 - 2 files changed, 21 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb

[PATCH v4 3/5] dt-bindings: usb: fusb302: remove max-sink-* properties

2018-04-13 Thread Li Jun
Remove max-sink-* properties since they are deprecated. Reviewed-by: Rob Herring Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/fcs,fusb302.txt | 6 -- 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs

[PATCH v4 4/5] usb: typec: wcove: remove max_snk_* for sink config

2018-04-13 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/typec_wcove.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/typec/typec_wcove.c b

[PATCH v4 1/5] usb: typec: tcpm: pdo matching optimization

2018-04-13 Thread Li Jun
f one sink pdo. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 102 ++- 1 file changed, 65 insertions(+), 37 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 677d121..c127339 100644 ---

[PATCH v4 0/5] usb: typec: remove max_snk_mv/ma/mw

2018-04-13 Thread Li Jun
;"). - Convert the device properties passing max_snk_* to be a variable sink pdo for fusb302. Li Jun (5): usb: typec: tcpm: pdo matching optimization usb: typec: fusb302: remove max_snk_* for sink config dt-bindings: usb: fusb302: remove max-sink-* properties usb: typec: wcove: remove m

[PATCH v4 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-13 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Reviewed-by: Hans de Goede Signed-off-by: Li Jun --- drivers/usb/typec/fusb302/fusb302.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a

[PATCH v3 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-04-12 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Signed-off-by: Li Jun --- drivers/usb/typec/fusb302/fusb302.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/usb/typec/fusb302

[PATCH v3 0/5] usb: typec: remove max_snk_mv/ma/mw

2018-04-12 Thread Li Jun
setting as Hans suggested. - Add Rob's reviewed-by for dt-binding patch. Changes for v2: - rebase the 1st patch to be based on commit 6f566af34628 ("Revert "typec: tcpm: Only request matching pdos""). - Convert the device properties passing max_snk_* to be a variable

[PATCH v3 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw

2018-04-12 Thread Li Jun
Since there is no user of max_snk_*, so we can remove them from tcpm. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 include/linux/usb/tcpm.h | 9 - 2 files changed, 21 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index c127339

[PATCH v3 3/5] dt-bindings: usb: fusb302: remove max-sink-* properties

2018-04-12 Thread Li Jun
Remove max-sink-* properties since they are deprecated. Reviewed-by: Rob Herring Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/fcs,fusb302.txt | 6 -- 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs,fusb302.txt b/Documentation

[PATCH v3 4/5] usb: typec: wcove: remove max_snk_* for sink config

2018-04-12 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Signed-off-by: Li Jun --- drivers/usb/typec/typec_wcove.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c

[PATCH v3 1/5] usb: typec: tcpm: pdo matching optimization

2018-04-12 Thread Li Jun
f one sink pdo. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 102 ++- 1 file changed, 65 insertions(+), 37 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 677d121..c127339 100644 --- a/drivers/usb/typec/tc

[PATCH v4 12/13] staging: typec: tcpci: Only touch target bit when enable vconn

2018-03-28 Thread Li Jun
We need regmap_update_bits to avoid touch any other bits when enable or disable vconn. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging

[PATCH v4 13/13] staging: typec: tcpci: move tcpci driver out of staging

2018-03-28 Thread Li Jun
Move TCPCI(Typec port controller interface) driver out of staging. Signed-off-by: Li Jun --- drivers/staging/Kconfig| 2 -- drivers/staging/Makefile | 1 - drivers/staging/typec/Kconfig | 14 -- drivers/staging/typec/Makefile | 1

[PATCH v4 11/13] staging: typec: tcpci: keep the not connecting cc line open

2018-03-28 Thread Li Jun
While set polarity, we should keep the not connecting cc line to be open. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c index d5b4e4e

[PATCH v4 07/13] staging: typec: tcpci: register port before request irq

2018-03-28 Thread Li Jun
With that we can clear any pending events and the port is registered so driver can be ready to handle typec events once we request irq. Signed-off-by: Peter Chen Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff

[PATCH v4 09/13] typec: tcpm: add starting value for drp toggling

2018-03-28 Thread Li Jun
As DRP port autonomously toggles the Rp/Rd need a start value to begin with, so add one parameter for it in tcpm_start_drp_toggling. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH v4 08/13] staging: typec: tcpci: enable vbus detection

2018-03-28 Thread Li Jun
TCPCI implementation may need SW to enable VBUS detection to generate power status events. Reviewed-by: Guenter Roeck Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec/tcpci.c

[PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach

2018-03-28 Thread Li Jun
In case of drp toggling, we may need set correct cc value for role control after attach as it may never been set. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 218c230

[PATCH v4 03/13] staging: typec: tcpci: add compatible string for nxp ptn5110

2018-03-28 Thread Li Jun
Add nxp ptn5110 typec controller compatible string: usb-tcpci,ptn5110, which is a standard tcpci chip with power delivery support. Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/typec/tcpci.c b/drivers/staging/typec

[PATCH v4 06/13] usb: typec: tcpm: support get typec and pd config from device properties

2018-03-28 Thread Li Jun
This patch adds support of get typec and power delivery config from firmware description. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 140 ++- 1 file changed, 115 insertions(+), 25 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers

[PATCH v4 02/13] dt-bindings: usb: add documentation for typec port controller(TCPCI)

2018-03-28 Thread Li Jun
ersion 1.1" Signed-off-by: Li Jun --- .../devicetree/bindings/usb/typec-tcpci.txt| 33 ++ 1 file changed, 33 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/typec-tcpci.txt b/Documentation/devicetree/bindings/usb/typec-tcpci.txt new file mo

[PATCH v4 05/13] usb: typec: add API to get typec basic port power and data config

2018-03-28 Thread Li Jun
This patch adds 3 APIs to get the typec port power and data type, and preferred power role by its name string. Suggested-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 52 +++ include/linux/usb/typec.h | 3 +++ 2 files

[PATCH v4 04/13] usb: typec: add fwnode to tcpc

2018-03-28 Thread Li Jun
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus Signed-off-by: Li Jun --- drivers/staging/typec/tcpci.c | 14 +++--- drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files changed, 10 insertions

[PATCH v4 01/13] dt-bindings: connector: add properties for typec

2018-03-28 Thread Li Jun
Add bingdings supported by current typec driver, so user can pass all those properties via dt. Signed-off-by: Li Jun --- .../bindings/connector/usb-connector.txt | 39 ++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/connector/usb

[PATCH v4 00/13] staging: typec: tcpci: move out of staging

2018-03-28 Thread Li Jun
uncontacted cc line open, set cc1/cc2 to be open in tcpci driver when set polarity. - Directly enable vbus detect in tcpci driver rather than add a API. - Details added in each patch. [1] https://patchwork.kernel.org/patch/10231447/ [2] https://patchwork.kernel.org/patch/10276483/ [3] https://www.s

[PATCH v2 5/5] usb: typec: tcpm: remove max_snk_mv/ma/mw

2018-03-23 Thread Li Jun
Since there is no user of max_snk_*, so we can remove them from tcpm. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 12 include/linux/usb/tcpm.h | 9 - 2 files changed, 21 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 50a1979

[PATCH v2 4/5] usb: typec: wcove: remove max_snk_* for sink config

2018-03-23 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Signed-off-by: Li Jun --- drivers/usb/typec/typec_wcove.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c

[PATCH v2 3/5] dt-bindings: usb: fusb302: remove max-sink-* properties

2018-03-23 Thread Li Jun
Remove max-sink-* properties since they are deprecated. Signed-off-by: Li Jun --- Documentation/devicetree/bindings/usb/fcs,fusb302.txt | 6 -- 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs,fusb302.txt b/Documentation/devicetree/bindings/usb/fcs

[PATCH v2 2/5] usb: typec: fusb302: remove max_snk_* for sink config

2018-03-23 Thread Li Jun
Since max_snk_* is to be deprecated, so remove max_snk_* by adding a variable PDO for sink config. Signed-off-by: Li Jun --- drivers/usb/typec/fusb302/fusb302.c | 51 +++-- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/drivers/usb/typec/fusb302

[PATCH v2 0/5] usb: typec: remove max_snk_mv/ma/mw

2018-03-23 Thread Li Jun
be a variable sink pdo for fusb302. Li Jun (5): usb: typec: tcpm: pdo matching optimization usb: typec: fusb302: remove max_snk_* for sink config dt-bindings: usb: fusb302: remove max-sink-* properties usb: typec: wcove: remove max_snk_* for sink config usb: typec: tcpm: rem

[PATCH v2 1/5] usb: typec: tcpm: pdo matching optimization

2018-03-23 Thread Li Jun
f one sink pdo. Signed-off-by: Li Jun --- drivers/usb/typec/tcpm.c | 127 +-- 1 file changed, 90 insertions(+), 37 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 677d121..50a1979 100644 --- a/drivers/usb/typec/tc

  1   2   3   4   5   6   7   8   >