mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
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:
parent
175fc78290
commit
0e0e41ea38
2 changed files with 8 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue