On Fri, 2010-12-03 at 00:15 +0800, Pallala, Ramakrishna 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?
>
> One more point,
> If you connect any USB device(for example mass storage or USB Hub)
> Those registers (0x192 and 0x193) show USB connection present even though
> they not
> Actually a charging type devices.
>
> I think you should use penwell_otg_query_charging_cap() which is provided
> by Penwell OTG transceiver driver. For more details please look into
> intel_mdf_battery driver.
Thanks for your suggestion. I think we should try to fix it in firmware
as Arjan suggested.
Thanks,
Hong
>
> Thanks,
> Ram
_______________________________________________
MeeGo-kernel mailing list
[email protected]
http://lists.meego.com/listinfo/meego-kernel