[PATCH v3 2/2] platform/chrome: cros_ec_typec: Handle hard reset

2021-04-20 Thread Prashant Malani
The Chrome Embedded Controller (EC) generates a hard reset type C event when a USB Power Delivery (PD) hard reset is encountered. Handle this event by unregistering the partner and cable on the associated port and clearing the event flag. Cc: Benson Leung Signed-off-by: Prashant Malani

[PATCH v3 1/2] platform/chrome: cros_ec: Add Type C hard reset

2021-04-20 Thread Prashant Malani
Update the EC command header to include the new event bit. This bit is included in the latest version of the Chrome EC headers[1]. [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h Signed-off-by: Prashant Malani --- Changes in v3: - Remove

Re: [PATCH v2 1/2] platform/chrome: cros_ec: Add Type C hard reset

2021-04-20 Thread Prashant Malani
Hi Enric, On Tue, Apr 20, 2021 at 3:00 AM Enric Balletbo i Serra wrote: > > Hi Prashant, > > On 16/4/21 20:27, Prashant Malani wrote: > > Update the EC command header to include the new event bit. This bit > > is included in the latest version of the Chrome EC headers[1]

[PATCH] platform/chrome: cros_ec_typec: Track port role

2021-04-20 Thread Prashant Malani
Stash the currently reported port role in the port struct and add a check for that too while determining whether to re-configure on-board Type C switches (this deals with cases like role swaps where the mux flags don't change, but the port role does). Signed-off-by: Prashant Malani Suggested

[PATCH v2 2/2] platform/chrome: cros_ec_typec: Handle hard reset

2021-04-16 Thread Prashant Malani
The Chrome Embedded Controller (EC) generates a hard reset type C event when a USB Power Delivery (PD) hard reset is encountered. Handle this event by unregistering the partner and cable on the associated port and clearing the event flag. Cc: Benson Leung Signed-off-by: Prashant Malani

[PATCH v2 1/2] platform/chrome: cros_ec: Add Type C hard reset

2021-04-16 Thread Prashant Malani
Update the EC command header to include the new event bit. This bit is included in the latest version of the Chrome EC headers[1]. [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h Change-Id: I52a36e725d945665814d4e59ddd1e76a3692db9f --- v2 is

Re: [PATCH] platform/chrome: cros_ec_typec: Handle hard reset

2021-04-16 Thread Prashant Malani
Hi Enric, Thanks for taking a look. On Thu, Apr 15, 2021 at 10:39 PM Enric Balletbo Serra wrote: > > Hi Prashant, > > Thank you for your patch. > > Missatge de Prashant Malani del dia dj., 15 > d’abr. 2021 a les 4:15: > > > > The Chrome Embedded Controller (

[PATCH] platform/chrome: cros_ec_typec: Handle hard reset

2021-04-14 Thread Prashant Malani
bit. This bit is included in the latest version of the Chrome EC headers[1]. [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h Cc: Benson Leung Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c| 13

[PATCH] platform/chrome: cros_ec_typec: Check for device within remove function

2021-03-18 Thread Prashant Malani
In a couple of call sites, we use the same pattern of checking for a partner or cable device before attempting to remove it. Simplify this by moving those checks into the remove functions. Cc: Benson Leung Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 20

[PATCH] platform/chrome: cros_ec_typec: Flush pending work

2021-02-11 Thread Prashant Malani
When a PD notifier event arrives, a new work event won't be enqueued if the current one hasn't completed. This could lead to dropped events. So, flush any pending work before scheduling the new instance. Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 1 + 1 file

Re: [PATCH 1/2] platform/chrome: cros_ec_typec: Skip port partner check in configure_mux()

2021-02-05 Thread Prashant Malani
o allow for mux configuration of Type-C ports, to enable > retimer communication. > > Signed-off-by: Rajmohan Mani Reviewed-by: Prashant Malani > --- > drivers/platform/chrome/cros_ec_typec.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/platform/chrom

Re: [PATCH 2/2] platform/chrome: cros_ec_types: Support disconnect events without partners

2021-02-05 Thread Prashant Malani
On Fri, Feb 5, 2021 at 12:05 PM Prashant Malani wrote: > > Hi Raj, > > On Fri, Feb 5, 2021 at 11:52 AM Rajmohan Mani wrote: > > > > There are certain scenarios, where a disconnect event might > > occur on a Type-C port with no port partners. This is requir

Re: [PATCH 2/2] platform/chrome: cros_ec_types: Support disconnect events without partners

2021-02-05 Thread Prashant Malani
ible. But otherwise LGTM, so: Reviewed-by: Prashant Malani

Re: [PATCH v2 1/2] platform/chrome: cros_ec: Import Type C control command

2021-02-04 Thread Prashant Malani
Thanks Benson, On Wed, Feb 3, 2021 at 11:18 PM Benson Leung wrote: > > Hi Prashant, > > On Tue, 2 Feb 2021 18:15:37 -0800, Prashant Malani wrote: > > This command is used to communicate with the Chrome Embedded Controller > > (EC) regarding USB Type C events and sta

[PATCH v2 2/2] platform/chrome: cros_ec_typec: Clear Type C disc events

2021-02-02 Thread Prashant Malani
Clear USB Type C discovery events from the Chrome EC once they've been successfully handled. Signed-off-by: Prashant Malani --- Changes in v2: - No changes. drivers/platform/chrome/cros_ec_typec.c | 28 +++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git

[PATCH v2 1/2] platform/chrome: cros_ec: Import Type C control command

2021-02-02 Thread Prashant Malani
Signed-off-by: Prashant Malani --- Changes in v2: - Fixed new line errors. .../linux/platform_data/cros_ec_commands.h| 26 +++ 1 file changed, 26 insertions(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index

Re: [PATCH 1/2] platform/chrome: cros_ec: Import Type C control command

2021-02-02 Thread Prashant Malani
On Tue, Feb 2, 2021 at 5:49 PM Prashant Malani wrote: > > This command is used to communicate with the Chrome Embedded Controller > (EC) regarding USB Type C events and state. > > These header updates are included in the latest Chrome OS EC headers [1] > > [1] > https://c

[PATCH 2/2] platform/chrome: cros_ec_typec: Clear Type C disc events

2021-02-02 Thread Prashant Malani
Clear USB Type C discovery events from the Chrome EC once they've been successfully handled. Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 28 +++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/platform/chrome

[PATCH 1/2] platform/chrome: cros_ec: Import Type C control command

2021-02-02 Thread Prashant Malani
Signed-off-by: Prashant Malani --- .../linux/platform_data/cros_ec_commands.h| 26 +++ 1 file changed, 26 insertions(+) diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index d3c40220b281..a95dc22a5463 100644

[PATCH] platform/chrome: cros_ec_typec: Decouple partner removal

2021-02-02 Thread Prashant Malani
of returning. Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index e724a5eaef1c..91b8fc1fd7f3 100644 --- a/drivers

Re: [PATCH 6/6] platform/chrome: cros_ec_typec: Set opmode to PD on SOP connected

2021-02-01 Thread Prashant Malani
either as > source or sink. > > Signed-off-by: Benson Leung Reviewed-by: Prashant Malani > --- > drivers/platform/chrome/cros_ec_typec.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/platform/chrome/cros_ec_typec.c > b/drivers/platform/chrome/cros_

Re: [PATCH 5/6] platform/chrome: cros_ec_typec: Set Partner PD revision from status

2021-02-01 Thread Prashant Malani
On Thu, Jan 28, 2021 at 10:14 PM Benson Leung wrote: > > Status provides sop_revision. Process it, and set it using the new > setter in the typec class. > > Signed-off-by: Benson Leung Reviewed-by: Prashant Malani > --- > drivers/platform/chrome/cros_ec_typec.c | 14 +++

Re: [PATCH 4/6] platform/chrome: cros_ec_typec: Report SOP' PD revision from status

2021-02-01 Thread Prashant Malani
istering the cable. > > Signed-off-by: Benson Leung Reviewed-by: Prashant Malani > --- > drivers/platform/chrome/cros_ec_typec.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/platform/chrome/cros_ec_typec.c > b/drivers/platform/c

Re: [PATCH] usb: typec: Send uevent for num_altmodes update

2021-01-07 Thread Prashant Malani
Hi Greg, Thanks for taking a look at the patch. On Thu, Jan 7, 2021 at 1:16 AM Greg KH wrote: > > On Wed, Jan 06, 2021 at 07:49:04PM -0800, Prashant Malani wrote: > > Generate a change uevent when the "number_of_alternate_modes" sysfs file > > for partners and plugs

[PATCH] usb: typec: Send uevent for num_altmodes update

2021-01-06 Thread Prashant Malani
Generate a change uevent when the "number_of_alternate_modes" sysfs file for partners and plugs is updated by a port driver. Cc: Heikki Krogerus Cc: Benson Leung Signed-off-by: Prashant Malani --- drivers/usb/typec/class.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/d

Re: [PATCH 2/2] platform/chrome: cros_ec_typec: Send mux configuration acknowledgment to EC

2020-12-21 Thread Prashant Malani
orm/ec/+/refs/heads/master/include/ec_commands.h > > Signed-off-by: Utkarsh Patel I'm not sure what the maintainers' preference is for the header (same patch or separate patch). FWIW: Reviewed-by: Prashant Malani Thanks, -Prashant

Re: [PATCH 1/2] platform/chrome: cros_ec_typec: Parameterize cros_typec_cmds_supported()

2020-12-21 Thread Prashant Malani
ec. > Rename cros_typec_cmds_supported() to cros_typec_feature_supported(). > > Signed-off-by: Utkarsh Patel Reviewed-by: Prashant Malani Thanks, -Prashant

[PATCH v2] usb: typec: Add class for plug alt mode device

2020-12-10 Thread Prashant Malani
Add the Type C class for plug alternate mode devices which are being registered by the Type C connector class. This ensures that udev events get generated when the plug alt modes are registered. Signed-off-by: Prashant Malani Cc: Heikki Krogerus --- Changes in v2: - Changed code to set

Re: [PATCH] usb: typec: Add bus type for plug alt modes

2020-12-09 Thread Prashant Malani
On Wed, Dec 9, 2020 at 2:59 PM Prashant Malani wrote: > > Hi Heikki, > > On Wed, Dec 9, 2020 at 9:15 AM Heikki Krogerus > wrote: > > > > Hi Prashant, > > > > On Wed, Dec 09, 2020 at 08:22:52AM -0800, Prashant Malani wrote: > > > Hi Heikki, &

Re: [PATCH] usb: typec: Add bus type for plug alt modes

2020-12-09 Thread Prashant Malani
Hi Heikki, On Wed, Dec 9, 2020 at 9:15 AM Heikki Krogerus wrote: > > Hi Prashant, > > On Wed, Dec 09, 2020 at 08:22:52AM -0800, Prashant Malani wrote: > > Hi Heikki, > > > > On Wed, Dec 9, 2020 at 8:14 AM Heikki Krogerus > > wrote: > > > > > &

Re: [PATCH] usb: typec: Add bus type for plug alt modes

2020-12-09 Thread Prashant Malani
Hi Heikki, On Wed, Dec 9, 2020 at 8:14 AM Heikki Krogerus wrote: > > On Tue, Dec 08, 2020 at 03:45:19PM -0800, Prashant Malani wrote: > > Hi Heikki, > > > > Thanks a lot for looking at the patch. > > > > On Tue, Dec 8, 2020 at 1:37 AM Heikki Krogerus > >

Re: [PATCH] usb: typec: Add bus type for plug alt modes

2020-12-08 Thread Prashant Malani
Hi Heikki, Thanks a lot for looking at the patch. On Tue, Dec 8, 2020 at 1:37 AM Heikki Krogerus wrote: > > On Wed, Dec 02, 2020 at 07:08:47PM -0800, Prashant Malani wrote: > > Add the Type C bus for plug alternate modes which are being > > registered via the Type

Re: [PATCH] platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags

2020-12-04 Thread Prashant Malani
Friendly ping. If there are not other reservations, can we pick this patch? It doesn't depend on any other patch series. Thanks, On Thu, Nov 19, 2020 at 11:32 PM Heikki Krogerus wrote: > > On Thu, Nov 05, 2020 at 06:03:05PM -0800, Prashant Malani wrote: > > On occasion, the Chr

[PATCH] usb: typec: Add bus type for plug alt modes

2020-12-02 Thread Prashant Malani
devices to alternate mode drivers. Update the Type C bus documentation to mention that there are alternate mode devices for plugs as well. Signed-off-by: Prashant Malani Cc: Heikki Krogerus --- Documentation/driver-api/usb/typec_bus.rst | 6 +++--- drivers/usb/typec/class.c | 8

[PATCH] platform/chrome: cros_ec_typec: Decouple cable remove on disconnect

2020-11-25 Thread Prashant Malani
-by: Prashant Malani --- This patch should be applied on top of the series[1] which adds support for cable & plugs to cros-ec-typec. [1] https://lore.kernel.org/linux-usb/20201116201150.2919178-1-pmal...@chromium.org/ drivers/platform/chrome/cros_ec_typec.c | 5 ++--- 1 file changed, 2 insertions(+

Re: [PATCH v4 1/2] usb: typec: Consolidate sysfs ABI documentation

2020-11-25 Thread Prashant Malani
Hi Heikki, On Tue, Nov 24, 2020 at 11:53 PM Heikki Krogerus wrote: > > On Wed, Nov 25, 2020 at 09:46:06AM +0200, Heikki Krogerus wrote: > > On Tue, Nov 24, 2020 at 12:32:35PM -0800, Prashant Malani wrote: > > > Hi, > > > > > > On Tue, Nov 24, 2020 at

[PATCH v5 2/2] usb: typec: Expose Product Type VDOs via sysfs

2020-11-25 Thread Prashant Malani
A PD-capable device can return up to 3 Product Type VDOs as part of its DiscoverIdentity Response (USB PD Spec, Rev 3.0, Version 2.0, Section 6.4.4.3.1). Add sysfs attributes to expose these to userspace. Cc: Benson Leung Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Heikki

[PATCH v5 1/2] usb: typec: Consolidate sysfs ABI documentation

2020-11-25 Thread Prashant Malani
Both partner and cable have identity VDOs. These are listed separately in the Documentation/ABI/testing/sysfs-class-typec. Factor these out into a common location to avoid the duplication. Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus --- Changes in v5: - Corrected the email address

Re: [PATCH v4 1/2] usb: typec: Consolidate sysfs ABI documentation

2020-11-24 Thread Prashant Malani
Hi, On Tue, Nov 24, 2020 at 12:10:31PM -0800, Prashant Malani wrote: > Both partner and cable have identity VDOs. These are listed separately > in the Documentation/ABI/testing/sysfs-class-typec. Factor these out > into a common location to avoid the duplication. > > Signed-o

[PATCH v4 2/2] usb: typec: Expose Product Type VDOs via sysfs

2020-11-24 Thread Prashant Malani
A PD-capable device can return up to 3 Product Type VDOs as part of its DiscoverIdentity Response (USB PD Spec, Rev 3.0, Version 2.0, Section 6.4.4.3.1). Add sysfs attributes to expose these to userspace. Cc: Benson Leung Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Heikki

Re: [PATCH v3 1/2] usb: typec: Consolidate syfs ABI documentation

2020-11-24 Thread Prashant Malani
Hi Heikki, On Tue, Nov 24, 2020 at 5:23 AM Heikki Krogerus wrote: > > On Fri, Oct 23, 2020 at 02:43:26PM -0700, Prashant Malani wrote: > > Both partner and cable have identity VDOs. These are listed separately > > in the Documentation/ABI/testing/sysfs-class-typec

[PATCH v4 1/2] usb: typec: Consolidate sysfs ABI documentation

2020-11-24 Thread Prashant Malani
Both partner and cable have identity VDOs. These are listed separately in the Documentation/ABI/testing/sysfs-class-typec. Factor these out into a common location to avoid the duplication. Signed-off-by: Prashant Malani Acked-by: Heikki Krogerus --- Changes in v4: - Rebased on top of the usb

Re: [PATCH v3 2/4] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

2020-11-20 Thread Prashant Malani
On Fri, Nov 20, 2020 at 4:07 AM Prashant Malani wrote: > > On Fri, Nov 20, 2020 at 01:22:18PM +0200, Heikki Krogerus wrote: > > On Thu, Nov 19, 2020 at 12:09:06AM -0800, Prashant Malani wrote: > > > Hi Utkarsh, > > > > > > On Wed, Nov 18, 2020 a

Re: [PATCH v3 2/4] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

2020-11-20 Thread Prashant Malani
On Fri, Nov 20, 2020 at 01:22:18PM +0200, Heikki Krogerus wrote: > On Thu, Nov 19, 2020 at 12:09:06AM -0800, Prashant Malani wrote: > > Hi Utkarsh, > > > > On Wed, Nov 18, 2020 at 10:32:09PM -0800, Utkarsh Patel wrote: > > > Configure Thunderbolt 3 cable generation

Re: [PATCH] usb: typec: Fix num_altmodes kernel-doc error

2020-11-20 Thread Prashant Malani
On Fri, Nov 20, 2020 at 09:41:21AM +0100, Greg KH wrote: > On Thu, Nov 19, 2020 at 10:35:22PM -0800, Prashant Malani wrote: > > The commit to introduce the num_altmodes attribute for partner had an > > error where one of the parameters was named differently in the comment >

Re: [PATCH v3 1/4] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message

2020-11-20 Thread Prashant Malani
On Fri, Nov 20, 2020 at 10:05:14AM +0200, Heikki Krogerus wrote: > On Wed, Nov 18, 2020 at 10:32:08PM -0800, Utkarsh Patel wrote: > > When Thunderbolt 3 cable is being used to create USB4 connection, use > > Thunderbolt 3 discover mode VDO to fill details such as active cable plug > > link

Re: linux-next: build warning after merge of the usb tree

2020-11-19 Thread Prashant Malani
Hi Stephen, On Fri, Nov 20, 2020 at 04:15:06PM +1100, Stephen Rothwell wrote: > Hi all, > > After merging the usb tree, today's linux-next build (htmldocs) produced > this warning: > > drivers/usb/typec/class.c:632: warning: Excess function parameter > 'num_alt_modes' description in

[PATCH] usb: typec: Fix num_altmodes kernel-doc error

2020-11-19 Thread Prashant Malani
: drivers/usb/typec/class.c:632: warning: Excess function parameter 'num_alt_modes' description in 'typec_partner_set_num_altmodes' Fixes: a0ccdc4a77a1 ("usb: typec: Add number of altmodes partner attr") Signed-off-by: Prashant Malani --- drivers/usb/typec/class.c | 2 +- 1 file changed, 1

Re: [PATCH v3 2/4] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

2020-11-19 Thread Prashant Malani
Hi Utkarsh, On Thu, Nov 19, 2020 at 6:32 PM Patel, Utkarsh H wrote: > > Hi Prashant, > > > -Original Message- > > From: Prashant Malani > > Sent: Thursday, November 19, 2020 12:09 AM > > To: Patel, Utkarsh H > > Cc: linux-kernel@vge

Re: [RFC PATCH 2/3] usb: typec: Add product_type sysfs attribute file for partners and cables

2020-11-19 Thread Prashant Malani
Hi Heikki, On Thu, Nov 19, 2020 at 01:05:06PM +0200, Heikki Krogerus wrote: > On Wed, Nov 18, 2020 at 10:53:50AM -0800, Prashant Malani wrote: > > > +What:/sys/class/typec/-cable/product_type > > > +Date:December 2020 > > > +Contact: Heikk

Re: [PATCH v3 2/4] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

2020-11-19 Thread Prashant Malani
Hi Utkarsh, On Wed, Nov 18, 2020 at 10:32:09PM -0800, Utkarsh Patel wrote: > Configure Thunderbolt 3 cable generation value by filling Thunderbolt 3 > cable discover mode VDO to support rounded Thunderbolt 3 cables. > While we are here use Thunderbolt 3 cable discover mode VDO to fill active >

Re: [PATCH v3 00/11] chrome/platform: cros_ec_typec: Register cables, partner altmodes and plug altmodes

2020-11-18 Thread Prashant Malani
Hi Greg, On Wed, Nov 18, 2020 at 01:16:49PM +0100, Greg KH wrote: > On Wed, Nov 18, 2020 at 12:59:59PM +0100, Greg KH wrote: > > On Mon, Nov 16, 2020 at 12:11:36PM -0800, Prashant Malani wrote: > > > This patch series adds support for the following bits of functionality, > &

Re: [RFC PATCH 2/3] usb: typec: Add product_type sysfs attribute file for partners and cables

2020-11-18 Thread Prashant Malani
lowing peripherals: - Thunderbolt 3 active cable. - Thunderbolt 3 passive cable. - Dell WD19TB dock. - Type C DisplayPort enabled monitor (which advertises as AMA). For the above, the product_type seems to be getting parsed and displayed correctly, so FWIW: Tested-by: Prashant Malani > --- &

Re: [RFC PATCH 0/3] usb: typec: Product Type time

2020-11-18 Thread Prashant Malani
Hi Heikki, Thanks for developing these patches :) On Wed, Nov 18, 2020 at 06:00:56PM +0300, Heikki Krogerus wrote: > Hi Prashant, > > The original discussion [1]. > > This proposal is in practice a compromise. I came to the conclusion > that we probable should expose the product type

Re: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

2020-11-17 Thread Prashant Malani
On Tue, Nov 17, 2020 at 10:19 AM Prashant Malani wrote: > > Hi Utkarsh, > > On Fri, Nov 13, 2020 at 12:25:01PM -0800, Utkarsh Patel wrote: > > Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 > > cable discover mode VDO to support rounded and

Re: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message

2020-11-17 Thread Prashant Malani
On Tue, Nov 17, 2020 at 1:16 PM Prashant Malani wrote: > > Hi Utkarsh, > > On Fri, Nov 13, 2020 at 12:25:00PM -0800, Utkarsh Patel wrote: > > USB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 > > cable discover mode VDO to fill details such a

Re: [PATCH v2 5/8] usb: typec: Use Thunderbolt 3 cable discover mode VDO in Enter_USB message

2020-11-17 Thread Prashant Malani
Hi Utkarsh, On Fri, Nov 13, 2020 at 12:25:00PM -0800, Utkarsh Patel wrote: > USB4 also uses same cable properties as Thunderbolt 3 so use Thunderbolt 3 > cable discover mode VDO to fill details such as active cable plug link > training and cable rounded support. > > Suggested-by: Heikki Krogerus

Re: [PATCH] platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags

2020-11-17 Thread Prashant Malani
Including Heikki, who I forgot to add in the original patch email. On Thu, Nov 05, 2020 at 06:03:05PM -0800, Prashant Malani wrote: > On occasion, the Chrome Embedded Controller (EC) can send a mux > configuration which doesn't map to a particular data mode. For instance, > dedicat

Re: [PATCH v2 6/8] platform/chrome: cros_ec_typec: Use Thunderbolt 3 cable discover mode VDO in USB4 mode

2020-11-17 Thread Prashant Malani
Hi Utkarsh, On Fri, Nov 13, 2020 at 12:25:01PM -0800, Utkarsh Patel wrote: > Configure Thunderbolt3/USB4 cable generation value by filing Thunderbolt 3 > cable discover mode VDO to support rounded and non-rounded Thunderbolt3/ > USB4 cables. > While we are here use Thunderbolt 3 cable discover

Re: [PATCH v3 03/11] usb: typec: Add plug num_altmodes sysfs attr

2020-11-17 Thread Prashant Malani
Hi Heikki, On Tue, Nov 17, 2020 at 02:41:43PM +0200, Heikki Krogerus wrote: > On Mon, Nov 16, 2020 at 12:11:42PM -0800, Prashant Malani wrote: > > Add a field to the typec_plug struct to record the number of available > > altmodes as well as the corresponding sysfs attr

[PATCH v3 11/11] platform/chrome: cros_ec_typec: Register plug altmodes

2020-11-16 Thread Prashant Malani
typec_plug_set_num_altmodes(). Signed-off-by: Prashant Malani --- Changes in v3: - Re-arranged patch order and combined it with related series of patches. No version v2. drivers/platform/chrome/cros_ec_typec.c | 50 - 1 file changed, 40 insertions(+), 10 deletions

[PATCH v3 10/11] platform/chrome: cros_ec_typec: Register SOP' cable plug

2020-11-16 Thread Prashant Malani
In order to register cable alternate modes, we need to first register a plug object. Use the Type C connector class framework to register a SOP' plug for this purpose. Since a cable and plug go hand in hand, we can handle the registration and removal together. Signed-off-by: Prashant Malani

[PATCH v3 05/11] platform/chrome: cros_ec_typec: Factor out PD identity parsing

2020-11-16 Thread Prashant Malani
Factor out the PD identity parsing code into a separate function. This way it can be re-used for Cable PD identity parsing in future patches. No functional changes are introduced by this patch. Signed-off-by: Prashant Malani Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki Krogerus

[PATCH v3 06/11] platform/chrome: cros_ec_typec: Rename discovery struct

2020-11-16 Thread Prashant Malani
Rename the sop_disc data struct which is used to store PD discovery data to the more generic name of disc_data. It can then be re-used to store and process cable discovery data. Signed-off-by: Prashant Malani Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki Krogerus --- Changes in v3: - Re

[PATCH v3 01/11] usb: pd: Add captive Type C cable type

2020-11-16 Thread Prashant Malani
able connector type, when provided the cable VDO. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki Krogerus --- Changes in v3: - Re-arranged patch order and combined it with related series of patches. - Added Re

[PATCH v3 02/11] usb: typec: Add number of altmodes partner attr

2020-11-16 Thread Prashant Malani
is -1. Cc: Benson Leung Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus --- Changes in v3: - Re-arranged patch order and combined it with related series of patches. - Added Reviewed-by tags Changes in v2: - Added ABI/testing documentation entry for added

[PATCH v3 08/11] platform/chrome: cros_ec_typec: Store cable plug type

2020-11-16 Thread Prashant Malani
Use the PD VDO Type C cable plug type macro to retrieve and store the cable plug type in the cable descriptor. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Signed-off-by: Prashant Malani Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki Krogerus --- Changes in v3: - Re-arranged patch order

[PATCH v3 07/11] platform/chrome: cros_ec_typec: Register cable

2020-11-16 Thread Prashant Malani
When the Chrome Embedded Controller notifies the driver that SOP' discovery is complete, retrieve the PD discovery data and register a cable object with the Type C connector class framework. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki

[PATCH v3 03/11] usb: typec: Add plug num_altmodes sysfs attr

2020-11-16 Thread Prashant Malani
attribute value is -1. We re-use the partner attribute for number_of_alternate_modes since the usage and name is similar, and update the corresponding *_show() command to support both partner and plugs. Signed-off-by: Prashant Malani --- Changes in v3: - Re-arranged patch order and combined it wi

[PATCH v3 09/11] platform/chrome: cros_ec_typec: Set partner num_altmodes

2020-11-16 Thread Prashant Malani
Set the number of altmodes available for a registered partner using the Type C connector class framework routine. Cc: Heikki Krogerus Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus --- Changes in v3: - Re-arranged patch order and combined it with related series of patches

[PATCH v3 04/11] platform/chrome: cros_ec_typec: Make disc_done flag partner-only

2020-11-16 Thread Prashant Malani
Change the disc_done flag, which indicates whether PD discovery is complete, to sop_disc_done instead, since we will process SOP and SOP' discovery data separately. Signed-off-by: Prashant Malani Reviewed-by: Greg Kroah-Hartman Reviewed-by: Heikki Krogerus --- Changes in v3: - Re-arranged

[PATCH v3 00/11] chrome/platform: cros_ec_typec: Register cables, partner altmodes and plug altmodes

2020-11-16 Thread Prashant Malani
ub/scm/linux/kernel/git/chrome-platform/linux.git/log/?h=for-next Prashant Malani (11): usb: pd: Add captive Type C cable type usb: typec: Add number of altmodes partner attr usb: typec: Add plug num_altmodes sysfs attr platform/chrome: cros_ec_typec: Make disc_done flag partner-only platform/chr

Re: [PATCH 0/3] platform/chrome: cros_ec_typec: Add plug and plug altmodes

2020-11-13 Thread Prashant Malani
Hi Greg, On Fri, Nov 13, 2020 at 6:13 AM Greg KH wrote: > > On Wed, Nov 11, 2020 at 05:23:25PM -0800, Prashant Malani wrote: > > This patch series add plug registration support to the cros-ec-typec > > driver. It also adds support for registering alternate modes for the &

Re: [PATCH v3 2/2] usb: typec: Expose Product Type VDOs via sysfs

2020-11-12 Thread Prashant Malani
Hi Heikki, On Thu, Nov 12, 2020 at 4:43 AM Heikki Krogerus wrote: > > On Wed, Nov 11, 2020 at 06:40:55PM -0800, Prashant Malani wrote: > > Hi Heikki, > > > > On Tue, Nov 10, 2020 at 01:54:53PM +0200, Heikki Krogerus wrote: > > > On Fri, Oct 23, 2020 at 02:43:

Re: [PATCH] drm/bridge: anx7625: Add anx7625 port switching.

2020-11-12 Thread Prashant Malani
On Thu, Nov 12, 2020 at 05:07:05PM +0800, Pi-Hsun Shih wrote: > Hi Prashant, > > Please see inline reply as below. > > On Thu, Nov 12, 2020 at 4:59 PM Prashant Malani wrote: > > > > Hi Pi-Hsun, > > > > I haven't gone through the code, but did have a hi

Re: [PATCH] drm/bridge: anx7625: Add anx7625 port switching.

2020-11-12 Thread Prashant Malani
Hi Pi-Hsun, I haven't gone through the code, but did have a high-level comment (kindly see inline) On Thu, Nov 12, 2020 at 02:40:40PM +0800, Pi-Hsun Shih wrote: > When output 2 lanes DP data, anx7625 can output to either TX1/RX1 or > TX2/RX2. In typical usage, these two TX/RX pairs corresponds

Re: [PATCH v3 2/2] usb: typec: Expose Product Type VDOs via sysfs

2020-11-11 Thread Prashant Malani
Hi Heikki, On Tue, Nov 10, 2020 at 01:54:53PM +0200, Heikki Krogerus wrote: > On Fri, Oct 23, 2020 at 02:43:28PM -0700, Prashant Malani wrote: > > I've now come to the conclusion that this is not the correct approach. > Instead, the whole identity, all six VDOs, should be supplied

[PATCH 0/3] platform/chrome: cros_ec_typec: Add plug and plug altmodes

2020-11-11 Thread Prashant Malani
um.org/ [3]: https://lore.kernel.org/lkml/20201106184104.939284-1-pmal...@chromium.org/ [4]: https://lore.kernel.org/lkml/20201110061535.2163599-1-pmal...@chromium.org/ Prashant Malani (3): usb: typec: Add plug num_altmodes sysfs attr platform/chrome: cros_ec_typec: Register SOP' cable plug platf

[PATCH 3/3] platform/chrome: cros_ec_typec: Register plug altmodes

2020-11-11 Thread Prashant Malani
typec_plug_set_num_altmodes(). Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 50 - 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index

[PATCH 2/3] platform/chrome: cros_ec_typec: Register SOP' cable plug

2020-11-11 Thread Prashant Malani
In order to register cable alternate modes, we need to first register a plug object. Use the Type C connector class framework to register a SOP' plug for this purpose. Since a cable and plug go hand in hand, we can handle the registration and removal together. Signed-off-by: Prashant Malani

[PATCH 1/3] usb: typec: Add plug num_altmodes sysfs attr

2020-11-11 Thread Prashant Malani
attribute value is -1. We re-use the partner attribute for number_of_alternate_modes since the usage and name is similar, and update the corresponding *_show() command to support both partner and plugs. Signed-off-by: Prashant Malani --- Documentation/ABI/testing/sysfs-class-typec | 9 +++ d

[PATCH v2 2/2] platform/chrome: cros_ec_typec: Set partner num_altmodes

2020-11-09 Thread Prashant Malani
Set the number of altmodes available for a registered partner using the Type C connector class framework routine. Cc: Heikki Krogerus Signed-off-by: Prashant Malani --- Changes in v2: - Patch introduced for the first time in v2. drivers/platform/chrome/cros_ec_typec.c | 8 1 file

[PATCH v2 1/2] usb: typec: Add number of altmodes partner attr

2020-11-09 Thread Prashant Malani
is -1. Cc: Benson Leung Cc: Heikki Krogerus Signed-off-by: Prashant Malani --- Changes in v2: - Added ABI/testing documentation entry for added sysfs file. - Changed name of the sysfs file to "number_of_alternate_modes" based on review comments. - Added is_visible() logic

[PATCH v2 5/6] usb: pd: Add captive Type C cable type

2020-11-06 Thread Prashant Malani
able connector type, when provided the cable VDO. Cc: Heikki Krogerus Signed-off-by: Prashant Malani --- Changes in v2: - No changes. include/linux/usb/pd_vdo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/usb/pd_vdo.h b/include/linux/usb/pd_vdo.h inde

[PATCH v2 6/6] platform/chrome: cros_ec_typec: Store cable plug type

2020-11-06 Thread Prashant Malani
Use the PD VDO Type C cable plug type macro to retrieve and store the cable plug type in the cable descriptor. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Signed-off-by: Prashant Malani --- Changes in v2: - Changed local variable from uint32_to u32. drivers/platform/chrome/cros_ec_typec.c

[PATCH v2 2/6] platform/chrome: cros_ec_typec: Factor out PD identity parsing

2020-11-06 Thread Prashant Malani
Factor out the PD identity parsing code into a separate function. This way it can be re-used for Cable PD identity parsing in future patches. No functional changes are introduced by this patch. Signed-off-by: Prashant Malani --- Changes in v2: - No changes. drivers/platform/chrome

[PATCH v2 4/6] platform/chrome: cros_ec_typec: Register cable

2020-11-06 Thread Prashant Malani
When the Chrome Embedded Controller notifies the driver that SOP' discovery is complete, retrieve the PD discovery data and register a cable object with the Type C connector class framework. Cc: Heikki Krogerus Signed-off-by: Prashant Malani --- Changes in v2: - No changes. drivers/platform

[PATCH v2 3/6] platform/chrome: cros_ec_typec: Rename discovery struct

2020-11-06 Thread Prashant Malani
Rename the sop_disc data struct which is used to store PD discovery data to the more generic name of disc_data. It can then be re-used to store and process cable discovery data. Signed-off-by: Prashant Malani --- Changes in v2: - No changes. drivers/platform/chrome/cros_ec_typec.c | 10

[PATCH v2 0/6] platform/chrome: cros_ec_typec: Add cable

2020-11-06 Thread Prashant Malani
variable uint32_t to u32 in patch 6/6. Prashant Malani (6): platform/chrome: cros_ec_typec: Make disc_done flag partner-only platform/chrome: cros_ec_typec: Factor out PD identity parsing platform/chrome: cros_ec_typec: Rename discovery struct platform/chrome: cros_ec_typec: Register cable usb

[PATCH v2 1/6] platform/chrome: cros_ec_typec: Make disc_done flag partner-only

2020-11-06 Thread Prashant Malani
Change the disc_done flag, which indicates whether PD discovery is complete, to sop_disc_done instead, since we will process SOP and SOP' discovery data separately. Signed-off-by: Prashant Malani --- Changes in v2: - No changes. drivers/platform/chrome/cros_ec_typec.c | 19

Re: [PATCH 6/6] platform/chrome: cros_ec_typec: Store cable plug type

2020-11-06 Thread Prashant Malani
Hi Greg, On Fri, Nov 06, 2020 at 10:33:02AM +0100, Greg Kroah-Hartman wrote: > On Fri, Nov 06, 2020 at 12:59:07AM -0800, Prashant Malani wrote: > > Hi Greg, > > > > Did you not receive these? > > Ah, I got 1, 2, and 5, and now 6. That's confusing, think abo

Re: [PATCH 6/6] platform/chrome: cros_ec_typec: Store cable plug type

2020-11-06 Thread Prashant Malani
Hi Greg, Thanks for looking at the patch. On Fri, Nov 06, 2020 at 08:20:59AM +0100, Greg Kroah-Hartman wrote: > On Thu, Nov 05, 2020 at 05:28:03PM -0800, Prashant Malani wrote: > > Use the PD VDO Type C cable plug type macro to retrieve and store the > > cable plug type in the c

[PATCH] platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags

2020-11-05 Thread Prashant Malani
to a driver abort. Modify the mux configuration handling to not return an error when an unrecognized mux flag combination is encountered. Concordantly, make the ensuing print a debug level print so as to not pollute the kernel logs. Cc: Keith Short Signed-off-by: Prashant Malani --- drivers/platform

[PATCH 6/6] platform/chrome: cros_ec_typec: Store cable plug type

2020-11-05 Thread Prashant Malani
Use the PD VDO Type C cable plug type macro to retrieve and store the cable plug type in the cable descriptor. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 21 - 1 file changed, 20 insertions(+), 1

[PATCH 5/6] usb: pd: Add captive Type C cable type

2020-11-05 Thread Prashant Malani
able connector type, when provided the cable VDO. Cc: Heikki Krogerus Signed-off-by: Prashant Malani --- include/linux/usb/pd_vdo.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/usb/pd_vdo.h b/include/linux/usb/pd_vdo.h index 68bdc4e2f5a9..8c5cb5830754 100644

[PATCH 3/6] platform/chrome: cros_ec_typec: Rename discovery struct

2020-11-05 Thread Prashant Malani
Rename the sop_disc data struct which is used to store PD discovery data to the more generic name of disc_data. It can then be re-used to store and process cable discovery data. Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 10 +- 1 file changed, 5

[PATCH 4/6] platform/chrome: cros_ec_typec: Register cable

2020-11-05 Thread Prashant Malani
When the Chrome Embedded Controller notifies the driver that SOP' discovery is complete, retrieve the PD discovery data and register a cable object with the Type C connector class framework. Cc: Heikki Krogerus Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 67

[PATCH 2/6] platform/chrome: cros_ec_typec: Factor out PD identity parsing

2020-11-05 Thread Prashant Malani
Factor out the PD identity parsing code into a separate function. This way it can be re-used for Cable PD identity parsing in future patches. No functional changes are introduced by this patch. Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 35

[PATCH 0/6] platform/chrome: cros_ec_typec: Add cable registration

2020-11-05 Thread Prashant Malani
plug field, and then use the added macro to add the corresponding field of the Type C cable descriptor in the cros-ec-typec driver. Prashant Malani (6): platform/chrome: cros_ec_typec: Make disc_done flag partner-only platform/chrome: cros_ec_typec: Factor out PD identity parsing platform

[PATCH 1/6] platform/chrome: cros_ec_typec: Make disc_done flag partner-only

2020-11-05 Thread Prashant Malani
Change the disc_done flag, which indicates whether PD discovery is complete, to sop_disc_done instead, since we will process SOP and SOP' discovery data separately. Signed-off-by: Prashant Malani --- drivers/platform/chrome/cros_ec_typec.c | 19 +++ 1 file changed, 7 insertions

  1   2   3   >