.. | .. |
---|
411 | 411 | |
---|
412 | 412 | #define CAP_POWER_TYPE(PDO) ((PDO >> 30) & 3) |
---|
413 | 413 | #define CAP_FPDO_VOLTAGE(PDO) ((PDO >> 10) & 0x3ff) |
---|
414 | | -#define CAP_VPDO_VOLTAGE(PDO) ((PDO >> 20) & 0x3ff) |
---|
| 414 | +#define CAP_VPDO_MAX_VOLTAGE(PDO) ((PDO >> 20) & 0x3ff) |
---|
| 415 | +#define CAP_VPDO_MIN_VOLTAGE(PDO) ((PDO >> 10) & 0x3ff) |
---|
415 | 416 | #define CAP_FPDO_CURRENT(PDO) ((PDO >> 0) & 0x3ff) |
---|
416 | 417 | #define CAP_VPDO_CURRENT(PDO) ((PDO >> 0) & 0x3ff) |
---|
417 | 418 | |
---|
.. | .. |
---|
481 | 482 | struct i2c_client *client; |
---|
482 | 483 | struct device *dev; |
---|
483 | 484 | struct regmap *regmap; |
---|
484 | | - struct work_struct work; |
---|
485 | | - struct workqueue_struct *fusb30x_wq; |
---|
| 485 | + struct kthread_work irq_work; |
---|
| 486 | + struct kthread_worker *irq_worker; |
---|
486 | 487 | struct hrtimer timer_state_machine; |
---|
487 | 488 | struct hrtimer timer_mux_machine; |
---|
488 | 489 | struct PD_CAP_INFO pd_cap_info; |
---|
.. | .. |
---|
524 | 525 | int msg_id; |
---|
525 | 526 | enum tx_state tx_state; |
---|
526 | 527 | int hardrst_count; |
---|
527 | | - u32 source_power_supply[7]; |
---|
528 | 528 | /* 50mv unit */ |
---|
529 | | - u32 source_max_current[7]; |
---|
| 529 | + u32 source_power_supply[7]; |
---|
530 | 530 | /* 10ma uint*/ |
---|
| 531 | + u32 source_max_current[7]; |
---|
| 532 | + /* Fixed supply = 0, Battery supply = 1 */ |
---|
| 533 | + u32 sink_supply_type; |
---|
| 534 | + /* Sink Fixed Supply */ |
---|
| 535 | + u32 sink_volt; |
---|
| 536 | + u32 sink_opr_cur; |
---|
| 537 | + /* Sink Battery Supply */ |
---|
| 538 | + u32 sink_max_volt; |
---|
| 539 | + u32 sink_min_volt; |
---|
| 540 | + u32 sink_opr_power; |
---|
531 | 541 | int pos_power; |
---|
532 | 542 | /* |
---|
533 | 543 | * if PartnerCap[0] == 0xffffffff |
---|