Re: [PATCH 2/4] power: ab8500-charger: AB8500 charger driver

From: Arun Murthy
Date: Wed Feb 29 2012 - 13:21:20 EST


>> +       /* Enable main watchdog in OTP */
>> +       ret = abx500_set_register_interruptible(di->dev,
>> +               AB8500_OTP_EMUL, AB8500_OTP_CONF_15, OTP_ENABLE_WD);
>> +       if (ret) {
>> +               dev_err(di->dev, "failed to enable main WD in OTP\n");
>> +               goto out;
>> +       }
>> +
>> +       /* Enable main watchdog */
>> +       ret = abx500_set_register_interruptible(di->dev,
>> +               AB8500_SYS_CTRL2_BLOCK,
>> +               AB8500_MAIN_WDOG_CTRL_REG, MAIN_WDOG_ENA);
>> +       if (ret) {
>> +               dev_err(di->dev, "faile to enable main watchdog\n");
>> +               goto out;
>> +       }
>> +
>> +       /*
>> +        * Due to internal synchronisation, Enable and Kick watchdog bits
>> +        * cannot be enabled in a single write.
>> +        * A minimum delay of 2*32 kHz period (62.5µs) must be inserted
>> +        * between writing Enable then Kick bits.
>> +        */
>> +       udelay(63);
>
> Are you sure about this udelay?
>

Yes, a minimum of 62.5µsec is required. Its also commented just above.

Thanks and Regards,
Arun R Murthy
----------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/