From: Eric van Tassell <evt@evtM17x.(none)>

---
 display.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/display.c b/display.c
index fcb4ec1..c97b45d 100644
--- a/display.c
+++ b/display.c
@@ -65,6 +65,8 @@ struct windata windata[] = {
        [CLOCK]     = { .name = "Clocks"     },
        [REGULATOR] = { .name = "Regulators" },
        [SENSOR]    = { .name = "Sensors"    },
+       [PWRDM]     = { .name = "Pwrdms"    },
+       [VDD]       = { .name = "Voltages"    },
        [GPIO]      = { .name = "Gpio"    },
 };
 
@@ -116,12 +118,24 @@ static int display_show_footer(int win, char *string)
 
 static int display_refresh(int win, bool read)
 {
+       struct display_ops *ops;
        /* we are trying to refresh a window which is not showed */
        if (win != current_win)
                return 0;
 
-       if (windata[win].ops && windata[win].ops->display)
-               return windata[win].ops->display(read);
+       ops = windata[win].ops;
+
+       if (ops) {
+               if (ops->display)
+                       return ops->display(read);
+               else
+                       if (ops->display_ex) {
+                               return ops->display_ex(read,
+                                                      windata[win].pvdata);
+                       }
+               else
+                       return -1;
+       }
 
        if (werase(main_win))
                return -1;
@@ -599,6 +613,7 @@ int display_register(int win, struct display_ops *ops)
                return -1;
 
        windata[win].ops = ops;
+       windata[win].pvdata = NULL;
 
        return 0;
 }
-- 
1.7.9.5


_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to