Re: [PATCH 1/2] staging: typec: tcpm: Validate source and sink caps

2017-10-09 Thread Badhri Jagan Sridharan
Sorry about delay. Just sent the rebased patchset along with the comments addressed. Thanks & Regards, Badhri. On Mon, Sep 18, 2017 at 3:20 AM, Greg Kroah-Hartman wrote: > On Thu, Sep 07, 2017 at 06:22:13PM -0700, Badhri Jagan Sridharan wrote: >> The source and sink caps shou

Re: [PATCH 1/2] staging: typec: tcpm: Validate source and sink caps

2017-09-08 Thread Badhri Jagan Sridharan
On Fri, Sep 8, 2017 at 2:45 AM, Greg Kroah-Hartman wrote: > On Thu, Sep 07, 2017 at 06:22:13PM -0700, Badhri Jagan Sridharan wrote: >> The source and sink caps should follow the following rules. >> This patch validates whether the src_caps/snk_caps adheres >> to it. >

[PATCH 1/2] staging: typec: tcpm: Validate source and sink caps

2017-09-07 Thread Badhri Jagan Sridharan
. Errors in source/sink_caps of the local port will prevent the port registration. Whereas, errors in source caps of partner device would only log them. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/pd.h | 2 + drivers/staging/typec/tcpm.c | 107

[PATCH 2/2] staging: typec: tcpm: Only request matching pdos

2017-09-07 Thread Badhri Jagan Sridharan
the Object position field. This enables the Sink to indicate that it requires more current/power than is being offered. If the Sink requires a different voltage this will be indicated by its Sink Capabilities message. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tc

[PATCH 11/11 v3] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

2017-08-28 Thread Badhri Jagan Sridharan
PORT_RESET state to make sure the CC lines are open. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since previous version: - Only one previous version of the patch was sent. Numbering this V3 instead of V2 to keep the sequence number in sync with the rest of the

[PATCH 08/11 v3] staging: typec: tcpm: add cc change handling in src states

2017-08-28 Thread Badhri Jagan Sridharan
through the unattached state. Originally-from: Yueyao Zhu Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since previous version: - Only one previous version of the patch was sent. Numbering this V3 instead of V2 to keep the sequence number in sync with the rest of th

[PATCH 04/11 v3] staging: usb: tcpm: usb: type-c: tcpm: Check for Rp for tPDDebounce

2017-08-28 Thread Badhri Jagan Sridharan
C1 or CC2 pins for at least tPDDebounce and V BUS is detected. Alternatively, the port shall transition to TryWait.SRC if SNK.Rp state is not detected for tPDDebounce." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since v1: - Corrected tag Changelog since v

[PATCH 06/11 v3] staging: typec: tcpm: Comply with TryWait.SNK State

2017-08-28 Thread Badhri Jagan Sridharan
, but this event will not exceed tPDDebounce. The port shall transition to Unattached.SNK when the state of both of the CC1 and CC2 pins is SNK.Open for at least tPDDebounce." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since v1: - Corrected tag Changelo

[PATCH 10/11 v3] staging: typec: tcpm: Do not send PING msgs in TCPM

2017-08-28 Thread Badhri Jagan Sridharan
PING messages are used to monitor the connect/disconnect. However, when PD is carried over CC, so this is not required. Also, the spec does not clearly say if PD is possible when Type-c is connected to Type-A/B. So, removing sending PING messages altogether. Signed-off-by: Badhri Jagan Sridharan

[PATCH 05/11 v3] staging: typec: tcpm: Follow Try.SRC exit requirements

2017-08-28 Thread Badhri Jagan Sridharan
ected." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since v1: - Corrected tag Changelog since v2: - added Reviewed-by: Guenter Roeck - fixed version/sequence numbers drivers/staging/typec/tcpm.c | 33 - 1 file c

[PATCH 07/11 v3] staging: typec: tcpm: Consider port_type while determining unattached_state

2017-08-28 Thread Badhri Jagan Sridharan
CC1: 2 -> 0, CC2: 0 -> 0 [state PORT_RESET, polarity 0, disconnected] [ 762.347206] state change PORT_RESET -> SRC_UNATTACHED Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since previous version: - Only one previous version of the patch was sent. Nu

[PATCH 09/11 v3] staging: typec: tcpm: typec: tcpm: Wait for CC debounce before PD excg

2017-08-28 Thread Badhri Jagan Sridharan
-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since previous version: - Only one previous version of the patch was sent. Numbering this V3 instead of V2 to keep the sequence number in sync with the rest of the patches in the patch list. - added Reviewed-by: Guenter

[PATCH 03/11 v3] staging: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT

2017-08-28 Thread Badhri Jagan Sridharan
ich the port enters TryWait.SRC(SRC_TRYWAIT) and re-enter SRC_TRYWAIT only when CC keeps debouncing within tDRPTry. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since v1: - Corrected tag Changelog since v2: - added Reviewed-by: G

[PATCH 02/11 v3] staging: typec: tcpm: Check for port type for Try.SRC/Try.SNK

2017-08-28 Thread Badhri Jagan Sridharan
Enable Try.SRC or Try.SNK only when port_type is DRP. Try.SRC or Try.SNK state machines are not valid for SRC only or SNK only ports. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since v1: - Corrected tag Changelog since v2: - added Reviewed-by: Guenter Roeck

[PATCH 01/11 v3] staging: typec: tcpm: set port type callback

2017-08-28 Thread Badhri Jagan Sridharan
current configuration. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- Changelog since v1: - Corrected tag Changelog since v2: - added Reviewed-by: Guenter Roeck - fixed version/sequence numbers drivers/staging/typec/tcpm.c | 52

[PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

2017-08-26 Thread Badhri Jagan Sridharan
PORT_RESET state to make sure the CC lines are open. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 9e0111dea7c4..47b8fec5ea36 100644 --- a

[PATCH 10/11] staging: typec: tcpm: Do not send PING msgs in TCPM

2017-08-26 Thread Badhri Jagan Sridharan
PING messages are used to monitor the connect/disconnect. However, when PD is carried over CC, so this is not required. Also, the spec does not clearly say if PD is possible when Type-c is connected to Type-A/B. So, removing sending PING messages altogether. Signed-off-by: Badhri Jagan Sridharan

[PATCH 08/11] staging: typec: tcpm: add cc change handling in src states

2017-08-26 Thread Badhri Jagan Sridharan
through the unattached state. Originally-from: Yueyao Zhu Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 645f43ee83df..1f6827f32b29 10064

[PATCH 05/11 v2] staging: typec: tcpm: Follow Try.SRC exit requirements

2017-08-26 Thread Badhri Jagan Sridharan
ected." Signed-off-by: Badhri Jagan Sridharan --- hangelog since v1: - Corrected tag drivers/staging/typec/tcpm.c | 33 - 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 7e

[PATCH 03/11 v2] staging: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT

2017-08-26 Thread Badhri Jagan Sridharan
ich the port enters TryWait.SRC(SRC_TRYWAIT) and re-enter SRC_TRYWAIT only when CC keeps debouncing within tDRPTry. Signed-off-by: Badhri Jagan Sridharan --- Changelog since v1: - Corrected tag drivers/staging/typec/tcpm.c | 45 1 file changed, 29 i

[PATCH 01/11 v2] staging: typec: tcpm: set port type callback

2017-08-26 Thread Badhri Jagan Sridharan
current configuration. Signed-off-by: Badhri Jagan Sridharan --- Changelog since v1: - Corrected tag drivers/staging/typec/tcpm.c | 52 ++-- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec

[PATCH 07/11] staging: typec: tcpm: Consider port_type while determining unattached_state

2017-08-26 Thread Badhri Jagan Sridharan
CC1: 2 -> 0, CC2: 0 -> 0 [state PORT_RESET, polarity 0, disconnected] [ 762.347206] state change PORT_RESET -> SRC_UNATTACHED Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH 6/6] staging: usb: tcpm: Comply with TryWait.SNK State

2017-08-26 Thread Badhri Jagan Sridharan
, but this event will not exceed tPDDebounce. The port shall transition to Unattached.SNK when the state of both of the CC1 and CC2 pins is SNK.Open for at least tPDDebounce." Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 58 +++---

[PATCH 5/6] staging: usb: tcpm: usb: typec: tcpm: Follow Try.SRC exit requirements

2017-08-26 Thread Badhri Jagan Sridharan
ected." Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 33 - 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 7eed04698ebe..fc179bdea7e4 100644 ---

[PATCH 4/6] staging: usb: tcpm: usb: type-c: tcpm: Check for Rp for tPDDebounce

2017-08-26 Thread Badhri Jagan Sridharan
C1 or CC2 pins for at least tPDDebounce and V BUS is detected. Alternatively, the port shall transition to TryWait.SRC if SNK.Rp state is not detected for tPDDebounce." Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 68 1 fi

[PATCH 2/6] staging: usb: typec: Check for port type for Try.SRC/Try.SNK

2017-08-26 Thread Badhri Jagan Sridharan
Enable Try.SRC or Try.SNK only when port_type is DRP. Try.SRC or Try.SNK state machines are not valid for SRC only or SNK only ports. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging

[PATCH 3/6] staging: usb: tcpm: usb: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT

2017-08-26 Thread Badhri Jagan Sridharan
ich the port enters TryWait.SRC(SRC_TRYWAIT) and re-enter SRC_TRYWAIT only when CC keeps debouncing within tDRPTry. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 45 1 file changed, 29 insertions(+), 16 deletions(

[PATCH 1/6] staging: usb: typec: tcpm set port type callback

2017-08-26 Thread Badhri Jagan Sridharan
current configuration. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 52 ++-- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index a911cad41a59..6c045ac9c42a