소스 검색

Improve documentation slightly

All those comments in pdb_dpm.h aren't needed anymore.  They were just
to help me organize my thoughts on how the DPM should work.
Clara Hobbs 7 년 전
부모
커밋
fe107db849
2개의 변경된 파일4개의 추가작업 그리고 26개의 파일을 삭제
  1. 3
    0
      lib/include/pdb.h
  2. 1
    26
      lib/include/pdb_dpm.h

+ 3
- 0
lib/include/pdb.h 파일 보기

@@ -34,12 +34,15 @@
34 34
  * be statically allocated!
35 35
  */
36 36
 struct pdb_config {
37
+    /* User-initialized fields */
37 38
     /* Configuration information for the FUSB302B* chip */
38 39
     struct pdb_fusb_config fusb;
39 40
     /* DPM callbacks */
40 41
     struct pdb_dpm_callbacks dpm;
41 42
     /* Pointer to port-specific DPM data */
42 43
     void *dpm_data;
44
+
45
+    /* Automatically initialized fields */
43 46
     /* Policy Engine thread and related variables */
44 47
     struct pdb_pe pe;
45 48
     /* Protocol layer threads and related variables */

+ 1
- 26
lib/include/pdb_dpm.h 파일 보기

@@ -40,7 +40,7 @@ typedef bool (*pdb_dpm_tcc_func)(struct pdb_config *, enum fusb_typec_current);
40 40
  * PD Buddy firmware library device policy manager callback structure
41 41
  *
42 42
  * Optional functions may be set to NULL if the associated functionality is not
43
- * required.
43
+ * required. (TODO)
44 44
  */
45 45
 struct pdb_dpm_callbacks {
46 46
     pdb_dpm_eval_cap_func evaluate_capability;
@@ -48,31 +48,6 @@ struct pdb_dpm_callbacks {
48 48
     pdb_dpm_giveback_func giveback_enabled;
49 49
     pdb_dpm_tcc_func evaluate_typec_current; /* Optional */
50 50
     pdb_dpm_func pd_start; /* Optional */
51
-    /* dpm_sink_standby is called in PE_SNK_Select_Capability to ensure power
52
-     * consumption is less than 2.5 W.
53
-     *   - dpm_transition_standby()
54
-     */
55
-    /* dpm_output_set is called in five places:
56
-     *   - PS_RDY received → transition sink power supply to our request
57
-     *     - This could mean what we wanted, or what we had to settle for, so
58
-     *       we have to remember.
59
-     *     - dpm_transition_requested()
60
-     *   - Protocol error in PE_SNK_Transition_Sink
61
-     *     - Unnecessary?  If we really want to be defensive here, just go to
62
-     *       default output, right?  That's what we'll do shortly afterwards
63
-     *       anyway.
64
-     *     - dpm_transition_default()
65
-     *   - GotoMin received and giveback → transition sink to min power
66
-     *     - dpm_transition_min()
67
-     *   - Transition sink power supply to match Type-C Current advertisement
68
-     *     - dpm_transition_typec() (if I don't like it I can change it)
69
-     *   - Part of dpm_output_default
70
-     *     - Obsolete (see below)
71
-     */
72
-    /* dpm_output_default is only called in PE_SNK_Transition_to_Default.
73
-     * Should probably be part of new improved replacement for dpm_output_set.
74
-     *   - dpm_transition_default()
75
-     */
76 51
     pdb_dpm_func transition_default;
77 52
     pdb_dpm_func transition_min; /* Optional if no GiveBack */
78 53
     pdb_dpm_func transition_standby;

Loading…
취소
저장