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
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
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]
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
Suggest
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
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 t
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 (
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
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
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
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
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 required
possible.
But otherwise LGTM, so:
Reviewed-by: 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
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 --
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
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
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/c
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
--- a
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
her 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_
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 +++
; registering 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/platf
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
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
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
ec.
> Rename cros_typec_cmds_supported() to cros_typec_feature_supported().
>
> Signed-off-by: Utkarsh Patel
Reviewed-by: Prashant Malani
Thanks,
-Prashant
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 the
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,
&
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:
> > >
> > &
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
> >
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 C con
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, th
mode 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
ff-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 inserti
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
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
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
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
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
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. Factor th
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
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
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
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
>
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 training
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 'typec_part
:
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 +
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
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
lags & USB_PD_CTRL_ACTIVE_LINK_UNIDIR)
data.tbt_cable_vdo |= TBT_CABLE_LINK_TRAINING;
data.tbt_cable_vdo |= TBT_SET_CABLE_ROUNDED(pd_ctrl->cable_gen);
if (data.tbt_cable_vdo)
data.tbt_cable_vdo |= TBT_MODE;
Best regards,
-Prashant
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,
> &
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
> ---
&
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 expos
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
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
udo;
> + u32 tbt_cable_vdo;
Can we instead just include a field for the rounded cable support property
, similar to what was done for active_link_training? That way this gets
decoupled
from whether a TBT VDO was present in the cable or not
> unsigned char active_link_training:1;
> };
>
> --
> 2.17.1
>
Best regards,
-Prashant
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,
> de
27;s way through review and use that (note that there may be
timing issues between the Mux update event and PD discovery complete
event reaching the port driver).
Best regards,
-Prashant
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 attribute to
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
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 M
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
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
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
alue 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 a
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
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: H
s the 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
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
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-arr
s://git.kernel.org/pub/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
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
&
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:
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
pends on ports be
> coupled inside anx7625 driver, or in another driver, or is there
> any existing way to accomplish this?
Might be good to add [RFC] as a tag instead of [PATCH] in case this
iteration is chiefly to solicit comments.
Best regards,
-Prashant
[1]:
https://lore.kernel.org/linux-usb/1604403610-16577-1-git-send-email-jun...@nxp.com/
>
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 supp
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
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
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 M
s the 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 +
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
alue 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 s
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
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
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
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/pla
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
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
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
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 about
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
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/pla
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
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
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
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
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
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
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 inser
1 - 100 of 368 matches
Mail list logo