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 2022/07/26 03:12:41 UTC

[GitHub] [incubator-nuttx] Donny9 commented on a diff in pull request #6698: driver/power:add ioctl cmd for voltage info and protocol and add update event mask

Donny9 commented on code in PR #6698:
URL: https://github.com/apache/incubator-nuttx/pull/6698#discussion_r929485650


##########
drivers/power/battery_charger.c:
##########
@@ -388,6 +388,16 @@ static int bat_charger_ioctl(FAR struct file *filep, int cmd,
         }
         break;
 
+      case BATIOC_VOLTAGE_INFO:
+        {
+          FAR int *outvoltsp = (FAR int *)((uintptr_t)arg);
+          if (outvoltsp)
+            {
+              ret = dev->ops->voltage_info(dev, outvoltsp);

Review Comment:
   BATIOC_GET_VOLTAGE used to get voltage from setting register.
   BATIOC_VOLTAGE_INFO used to get actual output voltage from other register. 
   One is the theoretical value and the other is the actual value.
   This is not a common usage,so removed it.



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