OLPC battery class

Mitch Bradley wmb at laptop.org
Wed Jun 20 11:13:46 EDT 2007


David Woodhouse wrote:
> On Tue, 2007-06-19 at 16:57 +0100, Richard Hughes wrote:
>   
>>>> Hmm. I'm not completely convinced (are there any ac adapters that report
>>>> temperature current or voltage?) 
>>>>         
>>> I don't have any. They certainly exist in high-end machines though. And
>>> even when they _don't_ have the temp/current/voltage measurements,
>>> they're _still_ just another power supply, with fewer of the optional
>>> extra properties. Having an entirely separate 'class' of devices just
>>> for them is a lot of duplication for no real reason.
>>>       
>> Okay, but are they still under /sys/class/battery/ tho?
>>     
>
> It became apparent that 'battery' was a bad name, due to the above. It's
> now /sys/class/power_supply/$devname and looks a bit like this...
>   

While it is true in the abstract sense that a battery is a form of power 
supply, in common usage the name "power supply" usually refers to 
mains-powered devices.  So it seems to me that the connotation problem 
still exists, albeit in reverse.  The name  "power source" doesn't have 
baggage in either direction.


> 	capacity:       91
> 	capacity_level: Full
> 	current_avg:    130
> 	health:         Good
> 	present:        1
> 	status:         Full
> 	technology:     Unknown
> 	temp:           2239
> 	temp_ambient:   5000
> 	type:           Battery
> 	voltage_avg:    6979620
>
> ... and this...
>
> UDEV  [1136267947.825844] change   /devices/platform/olpc-battery.0/power_supply/olpc-battery (power_supply)
> UDEV_LOG=3
> ACTION=change
> DEVPATH=/devices/platform/olpc-battery.0/power_supply/olpc-battery
> SUBSYSTEM=power_supply
> SEQNUM=694
> POWER_SUPPLY_NAME=olpc-battery
> POWER_SUPPLY_TYPE=Battery
> POWER_SUPPLY_STATUS=Full
> POWER_SUPPLY_PRESENT=1
> POWER_SUPPLY_HEALTH=Good
> POWER_SUPPLY_TECHNOLOGY=Unknown
> POWER_SUPPLY_VOLTAGE_AVG=6982060
> POWER_SUPPLY_CURRENT_AVG=0
> POWER_SUPPLY_CAPACITY=91
> POWER_SUPPLY_CAPACITY_LEVEL=Full
> POWER_SUPPLY_TEMP=2237
> POWER_SUPPLY_TEMP_AMBIENT=5000
> UDEVD_EVENT=1
>
>   
>> Is there any chance you can stick the code into a new kernel rpm for me
>> pls?
>>     
>
> Soon, when I have it working properly... :)
>
>   




More information about the Devel mailing list