AnsweredAssumed Answered

how to let pfuze100 into sleep mode?

Question asked by 吴 吴 on Jun 5, 2016
Latest reply on Jun 20, 2016 by Artur Petukhov

when i see pfuze100 supend code,it do nothing.According to MMPF0100Z.pdf,it need to setting to enter sleep mode;

sleep mode.png

  在drivers/regulator/pfuze100-regulator.c中,.pm = &pfuze_pm_ops,

    static int pfuze_suspend(struct device *dev)

{

    struct pfuze_chip *pfuze_chip = i2c_get_clientdata(to_i2c_client(dev));

    int index = 0;

    //pfuze_chip->need_restore的值为零

    if (pfuze_chip->need_restore) {

        /* 0x20~0x40 */

        index = pfuze_reg_save_restore(pfuze_chip, 0x20, 0x40, index, true);

        if (index < 0)

            goto err_ret;

        /* 0x66~0x71 */

        index = pfuze_reg_save_restore(pfuze_chip, 0x66, 0x71, ++index, true);

        if (index < 0)

            goto err_ret;

        /* 0x7f */

        index = pfuze_reg_save_restore(pfuze_chip, 0x7f, 0x7f, ++index, true);

        if (index < 0)

            goto err_ret;

    }

 

    return 0;

 

err_ret:

    return index;

}

Outcomes