On 12/2/2010 1:12 AM, Hong Liu wrote:
+               intel_scu_ipc_simple_command(0xf1, 1);
+       else {
+               bool charger_conn = check_charger_conn();
+
+               if (charger_conn) {
+                       /* enter into active dead mode to do battery charging */
+                       intel_scu_ipc_update_register(MSIC_RTC_CONFIG2,
+                               MSIC_ACTIVE_DEAD, MSIC_ACTIVE_DEAD_MASK);
+                       intel_scu_ipc_simple_command(IPCMSG_COLD_RESET, 0);
+               } else {
+                       intel_scu_ipc_update_register(MSIC_CHIP_CTRL,
+                                       MSIC_CHIP_COLD_OFF, MSIC_CHIP_COLD_OFF);
+               }
+       }
  }

how do you solve the race of the user plugging in a charger after this check, but before the reboot/power_off is completed?

shouldn't this be done by firmware instead?

_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel

Reply via email to