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

xiaoxiang 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 0647b49990 drivers/battery: Fix Goldfish Battery x64 unresponsive 
interrupt issue
0647b49990 is described below

commit 0647b4999058ba8886c7c7c201ad0c539d54360e
Author: liwenxiang1 <[email protected]>
AuthorDate: Wed Oct 9 16:17:21 2024 +0800

    drivers/battery: Fix Goldfish Battery x64 unresponsive interrupt issue
    
    Signed-off-by: liwenxiang1 <[email protected]>
---
 drivers/power/battery/goldfish_battery.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/power/battery/goldfish_battery.c 
b/drivers/power/battery/goldfish_battery.c
index 0009bbe130..fbec7bba24 100644
--- a/drivers/power/battery/goldfish_battery.c
+++ b/drivers/power/battery/goldfish_battery.c
@@ -321,8 +321,9 @@ int goldfish_battery_register(FAR void *regs, int irq)
       goto fail;
     }
 
-  GOLDFISH_BATTERY_WRITE(data, BATTERY_INT_ENABLE, BATTERY_INT_MASK);
   up_enable_irq(data->irq);
+  GOLDFISH_BATTERY_WRITE(data, BATTERY_INT_ENABLE, BATTERY_INT_MASK);
+
   batinfo("goldfish_battery_register over");
   return 0;
 fail:

Reply via email to