[PATCH v3] linux: Detect the battery of bluetooth input devices.
Shih-Yuan Lee (FourDollars)
fourdollars at gmail.com
Wed Sep 4 01:05:54 PDT 2013
Hi,
On Tue, Sep 3, 2013 at 4:15 PM, Martin Pitt <martin.pitt at ubuntu.com> wrote:
> I would like to create a test case for this to verify the fix and
> ensure it stays working in the future. For this we need the sysfs
> contents for these devices. Do you have such a device? I asked for it
> in http://pad.lv/1153488, i. e. for
>
> grep -r . /sys/class/power_supply/*hid*
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/type:Battery
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/control:auto
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/async:disabled
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/runtime_enabled:disabled
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/runtime_active_kids:0
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/runtime_active_time:0
grep: /sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/autosuspend_delay_ms:
Input/output error
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/runtime_status:unsupported
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/runtime_usage:0
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/power/runtime_suspended_time:0
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/scope:Device
grep: /sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/capacity:
Input/output error
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/online:1
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/status:Discharging
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/model_name:“$4”的鍵盤
/sys/class/power_supply/hid-10:9A:DD:96:DA:0D-battery/present:1
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/type:Battery
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/control:auto
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/async:disabled
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/runtime_enabled:disabled
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/runtime_active_kids:0
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/runtime_active_time:0
grep: /sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/autosuspend_delay_ms:
Input/output error
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/runtime_status:unsupported
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/runtime_usage:0
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/power/runtime_suspended_time:0
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/scope:Device
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/capacity:61
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/online:1
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/status:Discharging
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_NAME=hid-28:CF:DA:BB:74:1B-battery
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_PRESENT=1
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_ONLINE=1
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_CAPACITY=61
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_MODEL_NAME=“$4”的滑鼠
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_STATUS=Discharging
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/uevent:POWER_SUPPLY_SCOPE=Device
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/model_name:“$4”的滑鼠
/sys/class/power_supply/hid-28:CF:DA:BB:74:1B-battery/present:1
It is weird that linux kernel 3.5.0-39.60 and 3.8.0-29.42 in Ubuntu
can not read the battery capacity of Apple Wireless Keyboard.
The output of dmesg shows "power_supply hid-10:9A:DD:96:DA:0D-battery:
driver failed to report `capacity' property: -5".
However this might be another issue of bluetooth relative components.
Regards,
$4
More information about the devkit-devel
mailing list