Re: Simple power management without APM or APCI?
Holger Schurig <h.schurig=BV0w/+9zmLpFIqJdIZnCIQ <at> public.gmane.org>
2002-11-01 09:13:52 GMT
> My question is.. Is this feasible at all?? What are the major things that
> can go wrong if I do this? Anyone?
This depends very much on the driver. I for example will face Power Management
issues on my PXA250 target early next year. One thing that I'm doing right
now is to enable power to the MAXIM RS-232 level driver when a port get's
opened and disable the power to the chip the the port get's closed. I will
also look into the CKEN register of the PXA (clock enable register). With
that I can disable the PLL frequency generation to various parts of the chip.
However, many things can go wrong.
For example, I might be possible that some chip or PLL needs time to
stabilize, so after enabling some kind of hardware I might have to wait for
some amount of time.
Also, some chips might loose their configuration, so I might have to keep
state of them and reprogram them. This can be complicated and not be done in
the kernel, for example if your "chip" is as complex as a GSM module.
Also, an approach like "power the driver once the port gets open()ed" is
certainly easier to do than "power the driver when there is data activity
from the CPU, but disable it when not, even when the driver is officially
open()ed" takes more thought, sweat and programming hours.
So I will certainly have to learn more about PM, APM (I saw in the cerf-patch
from Intrinsyc some apm.c module that was derived from ipaq work), hotplug
and of course lots of chip manufacturer's PDF reference manuals. And I'm
afraid that you will do this, too.
(Continue reading)