Patch "platform/chrome: cros_ec_typec: Correct alt mode index" has been added to the 5.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/chrome: cros_ec_typec: Correct alt mode index

to the 5.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-chrome-cros_ec_typec-correct-alt-mode-index.patch
and it can be found in the queue-5.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 5902622bf7a4487017c61d79cabb16d7d387d245
Author: Prashant Malani <pmalani@xxxxxxxxxxxx>
Date:   Fri Aug 19 19:08:03 2022 +0000

    platform/chrome: cros_ec_typec: Correct alt mode index
    
    [ Upstream commit 4e477663e396f48c5cfc5f2d75d4b514f409516a ]
    
    Alt mode indices used by USB PD (Power Delivery) start with 1, not 0.
    
    Update the alt mdoe registration code to factor this in to the alt mode
    descriptor.
    
    Fixes: de0f49487db3 ("platform/chrome: cros_ec_typec: Register partner altmodes")
    Signed-off-by: Prashant Malani <pmalani@xxxxxxxxxxxx>
    Acked-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
    Reviewed-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220819190807.1275937-3-pmalani@xxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c
index 7cb2e35c4ded..1305a22a8831 100644
--- a/drivers/platform/chrome/cros_ec_typec.c
+++ b/drivers/platform/chrome/cros_ec_typec.c
@@ -669,7 +669,7 @@ static int cros_typec_register_altmodes(struct cros_typec_data *typec, int port_
 		for (j = 0; j < sop_disc->svids[i].mode_count; j++) {
 			memset(&desc, 0, sizeof(desc));
 			desc.svid = sop_disc->svids[i].svid;
-			desc.mode = j;
+			desc.mode = j + 1;
 			desc.vdo = sop_disc->svids[i].mode_vdo[j];
 
 			if (is_partner)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux