+ if source:
+ flags = {
+ (1 << 29): 'dual_role_power',
+ (1 << 28): 'suspend',
+ (1 << 27): 'unconstrained',
+ (1 << 26): 'comm_cap',
+ (1 << 25): 'dual_role_data',
+ (1 << 24): 'unchunked',
+ }
+ else: #sink
+ flags = {
+ (1 << 29): 'dual_role_power',
+ (1 << 28): 'high_capability',
+ (1 << 27): 'unconstrained',
+ (1 << 26): 'comm_cap',
+ (1 << 25): 'dual_role_data',
+ (0b01 << 23): 'fr_swap default power',
+ (0b10 << 23): 'fr_swap 1.5 A',
+ (0b11 << 23): 'fr_swap 3.0 A',
+ }