
When receiving Alert Message, if it is not unexpected but is
unsupported for some reason, the port should return Not_Supported
Message response.
Also, according to PD3.0 Spec 6.5.2.1.4 Event Flags Field, the
OTP/OVP/OCP flags in the Event Flags field in Status Message no longer
require Get_PPS_Status Message to clear them. Thus remove it when
receiving Status Message with those flags being set.
In addition, add the missing AMS operations for Status Message.
Fixes: 64f7c494a3
("typec: tcpm: Add support for sink PPS related messages")
Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance")
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210531164928.2368606-1-kyletso@google.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 063933f47a7af01650af9c4fbcc5831f1c4eb7d9
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-next)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0d3d3ed90758e39b033082001f2e9f782cfc26ef
28 lines
698 B
C
28 lines
698 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (c) 2017 Dialog Semiconductor
|
|
*
|
|
* Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
|
|
*/
|
|
|
|
#ifndef __LINUX_USB_PD_EXT_SDB_H
|
|
#define __LINUX_USB_PD_EXT_SDB_H
|
|
|
|
/* SDB : Status Data Block */
|
|
enum usb_pd_ext_sdb_fields {
|
|
USB_PD_EXT_SDB_INTERNAL_TEMP = 0,
|
|
USB_PD_EXT_SDB_PRESENT_INPUT,
|
|
USB_PD_EXT_SDB_PRESENT_BATT_INPUT,
|
|
USB_PD_EXT_SDB_EVENT_FLAGS,
|
|
USB_PD_EXT_SDB_TEMP_STATUS,
|
|
USB_PD_EXT_SDB_DATA_SIZE,
|
|
};
|
|
|
|
/* Event Flags */
|
|
#define USB_PD_EXT_SDB_EVENT_OCP BIT(1)
|
|
#define USB_PD_EXT_SDB_EVENT_OTP BIT(2)
|
|
#define USB_PD_EXT_SDB_EVENT_OVP BIT(3)
|
|
#define USB_PD_EXT_SDB_EVENT_CF_CV_MODE BIT(4)
|
|
|
|
#endif /* __LINUX_USB_PD_EXT_SDB_H */
|