> When the controller isn't connected to a power source and the battery is > discharging, the battery level is reported from 0 to 9 instead of 1 to 11. > + battery_capacity = rd[offset] & 0x0F; > if (battery_capacity > 10) > battery_capacity--; Hi Frank, You might want to change this to -- if (battery_capacity > 10) battery_capacity = 10; -- As the report could return values of 12..15, it's just that you haven't seen them yet. It might be that they're just giving a rough estimation based on cell voltage, which might change over temp/life-time... this would also explain the slightly lower value when the battery is under load. It would be nice if they had another bit indicating charging, rather than relying on the (assumed) voltage measurement. But it is what it is. Cheers, Simon. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html