-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Somebody in the thread at some point said: | Andy Green wrote: |> Somebody in the thread at some point said: |> |> And temp in 0.25 Kelvin |> |> steps --> Celcius in 0.1 steps. But this is basically scaling up |> |> operation and you see otherwise unmassaged data. |> | |> | ? |> | 1K step = 1 degree Celsius step |> |> "Scaling up operation" refers to the sentence before that you snipped: |> |> ''Some of the coulomb counter data is actually directly provided in very |> funny units relative to a sense resistor outside the chip (20mR in our |> case), the driver does the recommended computation and normalizes them |> to uV and uA as required by power_supply APIs.'' | | So this is not saying that a .25K step is a .1C step?
Wow no, the guy on top of these quotes was asking if we send raw data from Coulomb Counter chip down /sys. What I was explaining is it is pretty raw, but power_supply mandates we report in 0.1C steps and the chip gives us 0.25K steps, therefore we rebase Kelvin to Centigrade and then convert the granularity to 0.1C, itself actually a "scaling up operation", ie we are not losing information. You can see all this in the link I gave to the driver: ~ 245 case POWER_SUPPLY_PROP_TEMP: ~ 246 v = hdq_read16(di, BQ27000_TEMP_L); ~ 247 if (v < 0) ~ 248 return v; ~ 249 /* K (in 0.25K units) is 273.15 up from C (in 0.1C)*/ ~ 250 /* 10926 = 27315 * 4 / 10 */ ~ 251 val->intval = (((long)v * 10l) - 10926) / 4; ~ 252 break; - -Andy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkiIJzEACgkQOjLpvpq7dMqaagCeNGhw60hS7RXbKMyn7hAod5hq fzYAn3PADYwvYVMGxbSPZ5ist/tc3F/4 =fcsf -----END PGP SIGNATURE----- _______________________________________________ Openmoko community mailing list [email protected] http://lists.openmoko.org/mailman/listinfo/community

