You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2019/01/18 18:59:51 UTC

[GitHub] sjanc commented on a change in pull request #1605: hw/bus: Add power management for bus devices

sjanc commented on a change in pull request #1605: hw/bus: Add power management for bus devices
URL: https://github.com/apache/mynewt-core/pull/1605#discussion_r249151239
 
 

 ##########
 File path: hw/bus/src/bus.c
 ##########
 @@ -125,6 +137,29 @@ bus_dev_resume_func(struct os_dev *odev)
     return OS_OK;
 }
 
+#if MYNEWT_VAL(BUS_PM)
+static void
+bus_dev_inactivity_tmo_func(struct os_event *ev)
+{
+    struct bus_dev *bdev = (struct bus_dev *)ev->ev_arg;
+    int rc;
+
+    /* Just in case PM was changed while timer was running */
+    if (bdev->pm_mode != BUS_PM_MODE_AUTO) {
 
 Review comment:
   should this be under bdev->lock ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services