← Back to team overview

ac100 team mailing list archive

Re: Latest marvin24 patches, any sound and suspend?

 

Le 08/08/2011 21:57, Marc Dietrich a écrit :
mmh, I think I added some suspend code to the ec driver:

static int tegra_nvec_suspend(struct platform_device *pdev, pm_message_t state)
{
         struct nvec_chip *nvec = platform_get_drvdata(pdev);

         dev_dbg(nvec->dev, "suspending\n");
         nvec_write_async(nvec, EC_DISABLE_EVENT_REPORTING, 3);
         nvec_write_async(nvec, "\x04\x02", 2);
         nvec_disable_i2c_slave(nvec);

         return 0;
}

static int tegra_nvec_resume(struct platform_device *pdev)
{
         struct nvec_chip *nvec = platform_get_drvdata(pdev);

         dev_dbg(nvec->dev, "resuming\n");
         tegra_init_i2c_slave(nvec);
         nvec_write_async(nvec, EC_ENABLE_EVENT_REPORTING, 3);

         return 0;
}

not sure if it's enough.

from what I remind, we're both around the same code ;)


2- I don't know about voltage regulators status, but it's likely that
the cpu is still powered up.

looking at harmony/seaboard, they make heavy use of the regulators (e.g. to
switch off), but for ac100 everything seems to be magicly controlled by the ec.

that's not completly clear from what I read.
I'm afraid some black magic is done in userspace by nvrm_daemon...

3- linked to 1, there is no wakeup event to resume the CPU.

I think this needs a deeper review (especially check against ec_odm.c and
paz00_diag.c

There are already known commands to programm the EC to wakeup, it's just that today we don't seem to be able to put the EC in suspend mode...

I've some very minor fixes in a gitorious branch, but 1-3 still needs to
be understood and done...

cool! I will happily merge everything which improves the situtation.

nothing exciting, mainly the details I've seen while reading the toshiba .32 code. it's in something like dev-suspend branch in my personal gitorious tree.

Gilles.


References