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

[GitHub] [nuttx] xiaoxiang781216 commented on a diff in pull request #8088: Add ACT8945A power driver

xiaoxiang781216 commented on code in PR #8088:
URL: https://github.com/apache/nuttx/pull/8088#discussion_r1068463144


##########
drivers/power/supply/regulator_gpio.c:
##########
@@ -65,7 +65,9 @@ static const struct regulator_ops_s g_regulator_gpio_ops =
   NULL,                         /* get_voltage_sel */
   regulator_gpio_enable,        /* enable */
   regulator_gpio_is_enabled,    /* is_enabled */
-  regulator_gpio_disable        /* disable */
+  regulator_gpio_disable,       /* disable */
+  NULL,                         /* enable pulldown  if reg. disabled */

Review Comment:
   revert don't need change



##########
drivers/power/supply/regulator.c:
##########
@@ -236,6 +238,32 @@ static int _regulator_get_voltage(FAR struct regulator_dev_s *rdev)
   return ret;
 }
 
+static int _regulator_do_enable_pulldown(FAR struct regulator_dev_s *rdev)
+{
+  int ret;

Review Comment:
     int ret = 0;
   
     if (rdev->ops->enable_pulldown)
       {
         ret = rdev->ops->enable_pulldown(rdev);
         if (ret < 0)
           {
             pwrerr("failed to enable pulldown\n");
           }
       }
   
     return ret;
   



##########
drivers/power/supply/regulator.c:
##########
@@ -236,6 +238,32 @@ static int _regulator_get_voltage(FAR struct regulator_dev_s *rdev)
   return ret;
 }
 
+static int _regulator_do_enable_pulldown(FAR struct regulator_dev_s *rdev)
+{
+  int ret;
+
+  ret = rdev->ops->enable_pulldown(rdev);
+  if (ret < 0)
+    {
+      pwrerr("failed to get enable pulldown\n");
+    }
+
+  return ret;
+}
+
+static int _regulator_do_disable_pulldown(FAR struct regulator_dev_s *rdev)
+{
+  int ret;
+
+  ret = rdev->ops->disable_pulldown(rdev);

Review Comment:
   ditto



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org