mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02: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
2d36378a07
commit
1e35511dad
|
|
@ -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 New Issue
Block a user