Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: beaglebone: changing cpu frequency



On Jul 31, 2013, at 11:54 PM, Radoslaw Kujawa 
<radoslaw.kujawa%c0ff33.net@localhost> wrote:

> 
> On 1 Aug 2013, at 3:03 AM, Matt Thomas <matt%3am-software.com@localhost> 
> wrote:
> 
>> I still need a good method to get the powersource from the tps65217pmic so
>> I can limit the frequencies when power is limited.
> 
> 
> The power source is checked in the driver, but it's only used to print the 
> current source during attachment. The value of this register is never checked 
> again later.
> 
> I think we have at least two ways to do it:
> 
> - Make TPS65217 generate an interrupt upon power source change. The interrupt 
> line from TPS is connected to NNMI input on Sitara. I'm not really sure if 
> it's a good idea to generate interrupt on a line that is labeled "NNMI", 
> sounds dangerous (but it's not like I've actually checked what happens if you 
> trigger it). 
> 
> - Just make an additional sysmon indicator and poll the value of TPS register 
> as a part of sysmon refresh in tps65217pmic driver. Then send an event to 
> powerd(8) upon change of the power source. Possibly additional 
> sensor_powersource should be defined to make this an elegant solution. The 
> powerd(8) could react and change CPU speed via script that writes to sysctl.

I think the system should automatically drop cpu speed to 550MHz to be safe.
Then let powerd figure out if it should be increased.

Maybe add a PMFE_POWER_CHANGED event and I can use pmf_event_register to monitor
for it when your driver does a pmf_event_inject with it.



Home | Main Index | Thread Index | Old Index