[powerdebug] sensors are displayed with the wrong unit

Bug #857382 reported by Daniel Lezcano
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro PMWG Powerdebug
Fix Released
Low
sanjay singh rawat

Bug Description

The different sensors temperatues informations give sometimes the value in millivolt instead of millidegree.
Powerdebug is assuming the result is always in millidegree.

Example of a sensor semantic:
 * GPADC - ADC_AUX1, connected to NTC R2148 next to RTC_XTAL on HREF
 * GPADC - ADC_AUX2, connected to NTC R2150 near DB8500 on HREF
 * Hence, temp#_min/max/max_hyst refer to millivolts and not
 * millidegrees
 * This is not the case for BAT_CTRL where millidegrees is used

Revision history for this message
Daniel Lezcano (daniel-lezcano) wrote :

There is no information about the unit used for a specific file. The userspace needs to take a decision depending on what kind of hardware it is running despite the sysfs interface should be a generic interface.

We have several solution:
 * display a raw value with mC / mV units and powerdebug does not take care of that. The fix is trivial.
 * display a raw value but let the user to switch from one unit to another unit. The fix is not trivial and we can have for the same directory some files displayed in mC and others in mV.

My advice would be to send a patch to add a sysfs temp#_unit file and let the different maintainer to fill it with the right value.
So in the future, powerdebug would be able to display correctly the result.

Changed in linaro-powerdebug:
importance: Undecided → Medium
assignee: nobody → Daniel Lezcano (daniel-lezcano)
status: New → Confirmed
Amit Kucheria (amitk)
Changed in linaro-powerdebug:
assignee: Daniel Lezcano (daniel-lezcano) → sanjay singh rawat (sanjay-rawat)
importance: Medium → Low
Revision history for this message
sanjay singh rawat (sanjay-rawat) wrote :

- HWMON gives the value of the temperature in mCelsius unit, this is one of the requirement set by the maintainer. For ab8500 this was mentioned in this conversation https://lkml.org/lkml/2013/1/30/437
- The fix is mainlined by Hongbo. This can be closed.

Changed in linaro-powerdebug:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.