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 2020/10/20 18:25:05 UTC

[GitHub] [mynewt-core] JustineKH opened a new pull request #2395: da1469x_pd: add function to get power domain reference counts

JustineKH opened a new pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395


   Add function to get power domain reference counts.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713831406


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-714890226


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713248986


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713242936


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/da1469x_sleep.c
   <details>
   
   ```diff
   @@ -79,8 +79,7 @@
                return;
            }
        }
   -    if (da1469x_pd_get_ref_cnt(MCU_PD_DOMAIN_SYS) == 1)
   -    {
   +    if (da1469x_pd_get_ref_cnt(MCU_PD_DOMAIN_SYS) == 1) {
            /* Must enter mcu gpio sleep before releasing MCU_PD_DOMAIN_SYS */
            mcu_gpio_enter_sleep();
            sys_sleep = true;
   @@ -92,8 +91,7 @@
    
        slept = da1469x_m33_sleep();
    
   -    if (sys_sleep)
   -    {
   +    if (sys_sleep) {
            mcu_gpio_exit_sleep();
        }
    
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] andrzej-kaczmarek merged pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek merged pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] andrzej-kaczmarek commented on a change in pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on a change in pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#discussion_r510930457



##########
File path: hw/mcu/dialog/da1469x/src/hal_gpio.c
##########
@@ -473,6 +474,10 @@ mcu_gpio_enter_sleep(void)
         return;
     }
 
+    /* Save pins states and their latched values */

Review comment:
       the whole sleep code is run with interrupts disabled since it's called from 'os_tick_idle`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713066512


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713066512


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-714890226


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713242936


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/da1469x_sleep.c
   <details>
   
   ```diff
   @@ -79,8 +79,7 @@
                return;
            }
        }
   -    if (da1469x_pd_get_ref_cnt(MCU_PD_DOMAIN_SYS) == 1)
   -    {
   +    if (da1469x_pd_get_ref_cnt(MCU_PD_DOMAIN_SYS) == 1) {
            /* Must enter mcu gpio sleep before releasing MCU_PD_DOMAIN_SYS */
            mcu_gpio_enter_sleep();
            sys_sleep = true;
   @@ -92,8 +91,7 @@
    
        slept = da1469x_m33_sleep();
    
   -    if (sys_sleep)
   -    {
   +    if (sys_sleep) {
            mcu_gpio_exit_sleep();
        }
    
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713248986


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-714958753


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] benmccrea commented on a change in pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
benmccrea commented on a change in pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#discussion_r510923764



##########
File path: hw/mcu/dialog/da1469x/src/hal_gpio.c
##########
@@ -473,6 +474,10 @@ mcu_gpio_enter_sleep(void)
         return;
     }
 
+    /* Save pins states and their latched values */

Review comment:
       @JustineKH Are interrupts already disabled when `mcu_gpio_enter_sleep` gets called? If not,  an interrupt could change pin levels before entering sleep. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] andrzej-kaczmarek commented on a change in pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on a change in pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#discussion_r510930457



##########
File path: hw/mcu/dialog/da1469x/src/hal_gpio.c
##########
@@ -473,6 +474,10 @@ mcu_gpio_enter_sleep(void)
         return;
     }
 
+    /* Save pins states and their latched values */

Review comment:
       the whole sleep code is run with interrupts disabled since it's called from `os_tick_idle`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] andrzej-kaczmarek commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713509012


   adding new API is fine, although I only see it being used to make workarounds like in the 2nd patch which should not be merged upstream unless this fix can be explained.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-713831406


   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot removed a comment on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot removed a comment on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-714889145


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/da1469x_sleep.c
   <details>
   
   ```diff
   @@ -79,8 +79,8 @@
            }
        }
    
   -        /* Must enter mcu gpio sleep before releasing MCU_PD_DOMAIN_SYS */
   -        mcu_gpio_enter_sleep();
   +    /* Must enter mcu gpio sleep before releasing MCU_PD_DOMAIN_SYS */
   +    mcu_gpio_enter_sleep();
    
    
        /* PD_SYS will not be disabled here until we enter deep sleep, so don't wait */
   @@ -88,7 +88,7 @@
    
        slept = da1469x_m33_sleep();
    
   -        mcu_gpio_exit_sleep();
   +    mcu_gpio_exit_sleep();
    
        if (g_da1469x_sleep_cb.exit_sleep) {
            g_da1469x_sleep_cb.exit_sleep(slept);
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2395: da1469x_pd: add function to get power domain reference counts

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on pull request #2395:
URL: https://github.com/apache/mynewt-core/pull/2395#issuecomment-714889145


   
   <!-- style-bot -->
   
   ## Style check summary
   
   ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md)
   
   
   #### hw/mcu/dialog/da1469x/src/da1469x_sleep.c
   <details>
   
   ```diff
   @@ -79,8 +79,8 @@
            }
        }
    
   -        /* Must enter mcu gpio sleep before releasing MCU_PD_DOMAIN_SYS */
   -        mcu_gpio_enter_sleep();
   +    /* Must enter mcu gpio sleep before releasing MCU_PD_DOMAIN_SYS */
   +    mcu_gpio_enter_sleep();
    
    
        /* PD_SYS will not be disabled here until we enter deep sleep, so don't wait */
   @@ -88,7 +88,7 @@
    
        slept = da1469x_m33_sleep();
    
   -        mcu_gpio_exit_sleep();
   +    mcu_gpio_exit_sleep();
    
        if (g_da1469x_sleep_cb.exit_sleep) {
            g_da1469x_sleep_cb.exit_sleep(slept);
   ```
   
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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