This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a6153c5628d drivers/misc/rpmsgdev: add BATIOC_CAPACITY/CHIPID
a6153c5628d is described below

commit a6153c5628d358e798facf529e71d2ca064977bf
Author: p-dongyuanjie <[email protected]>
AuthorDate: Sun Dec 8 19:56:30 2024 +0800

    drivers/misc/rpmsgdev: add BATIOC_CAPACITY/CHIPID
    
    rpmsgdev_ioctl_arglen() omits these two battery ioctls, so forwarding
    them through rpmsgdev returns -ENOTTY instead of reaching the remote
    battery driver; both take int-sized arguments like the other getters.
    
    Assisted-by: OpenCode:mimo-v2.6-pro
    Signed-off-by: dongjiuzhu1 <[email protected]>
    Signed-off-by: wangjianyu3 <[email protected]>
---
 drivers/misc/rpmsgdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/rpmsgdev.c b/drivers/misc/rpmsgdev.c
index 71370029e41..794648983d6 100644
--- a/drivers/misc/rpmsgdev.c
+++ b/drivers/misc/rpmsgdev.c
@@ -615,6 +615,8 @@ static ssize_t rpmsgdev_ioctl_arglen(int cmd, unsigned long 
arg)
       case BATIOC_TEMPERATURE:
       case BATIOC_INPUT_CURRENT:
       case BATIOC_STATE:
+      case BATIOC_CAPACITY:
+      case BATIOC_CHIPID:
         return sizeof(int);
       case TUNSETIFF:
       case TUNGETIFF:

Reply via email to