ucsi: ucsi_glink: add more flags for clients during notification

Add partner_change and connect flags when notifying clients
about the partner information.This would be useful for some clients to
modify their state/configuration.

Change-Id: I85b601b7ea60dda2ac630c51a499767f5fb70351
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
This commit is contained in:
Linyu Yuan 2020-11-04 09:46:31 +08:00 committed by Subbaraman Narayanamurthy
parent 2d36378a07
commit 1e35511dad
2 changed files with 8 additions and 0 deletions

View File

@ -375,6 +375,12 @@ static void ucsi_qti_notify(struct ucsi_dev *udev, unsigned int offset,
udev->constat_info.partner_usb = false;
udev->constat_info.partner_alternate_mode = false;
udev->constat_info.partner_change =
status->change & UCSI_CONSTAT_PARTNER_CHANGE;
udev->constat_info.connect =
status->flags & UCSI_CONSTAT_CONNECTED;
conn_partner_type = UCSI_CONSTAT_PARTNER_TYPE(status->flags);
switch (conn_partner_type) {

View File

@ -13,6 +13,8 @@ struct ucsi_glink_constat_info {
enum typec_accessory acc;
bool partner_usb;
bool partner_alternate_mode;
bool partner_change;
bool connect;
};
struct notifier_block;