[tesla-dev] kstat battery -> acpi_drv

Li, Aubrey aubrey.li at intel.com
Sat Jun 28 07:04:44 PDT 2008


Rafael.Vanoni at Sun.COM wrote:

> Li, Aubrey wrote:
>> Rafael Vanoni wrote:
>> 
>>> Just noticed that 6682365 changed the kstat module 'battery' to
>>> 'acpi_drv'. I'm pushing the update in a couple of minutes.
>>> 
>> Not perfect, does this mean power usage feature in the new
>> powertop will not work on the old revision of ON?
>> 
>> I would suggest we implement a simple probe mechanism here.
>> Something like below: 
>> 
>> char *
>> battery_probe()
>> {
>> 	ksp = kstat_lookup(kc, "battery", 0, "battery BIF0"); 	if (ksp)
>> 		return "battery";
>> 	ksp = kstat_lookup(kc, "acpi_drv", 0, "battery BIF0");
if (ksp)
>>  		return "acpi_drv";
>> 	return NULL;
>> }
>> 
>> And battery_stat_snapshot() calls battery probe to do the rest job.
>> I can make a patch for it if you like.
> 
> Here's a patch for it.
> 
> thanks
> Rafael

Wow, you are always so quick, :-)
Thanks for the patch, it looks great, please feel free to commit.
How about the OpenSolaris conference? anything about the power?

Thanks,
-Aubrey



More information about the tesla-dev mailing list