summaryrefslogtreecommitdiff
path: root/profiles/battery
diff options
context:
space:
mode:
authorSonny Sasaka <sonnysasaka@chromium.org>2020-11-30 13:56:02 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-11-30 16:19:10 -0800
commit9e2fd160e119d6d3e2d8f37b254b7e72c502d437 (patch)
treeb6dda6dfae8818bd32df579c0b902caab6dd3cb2 /profiles/battery
parent8b61f78086cbea7ae8810c58772f0806716d3db8 (diff)
downloadbluez-9e2fd160e119d6d3e2d8f37b254b7e72c502d437.tar.gz
battery: Implement Battery Provider API
This patch implements the BatteryProvider1 and BatteryProviderManager1 API. This is a means for external clients to feed battery information to BlueZ if they handle some profile and can decode battery reporting. The battery information is then exposed externally via the existing Battery1 interface. UI components can consume this API to display Bluetooth peripherals' battery via a unified BlueZ API. Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Diffstat (limited to 'profiles/battery')
-rw-r--r--profiles/battery/battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/profiles/battery/battery.c b/profiles/battery/battery.c
index 2478816a4..81f849d57 100644
--- a/profiles/battery/battery.c
+++ b/profiles/battery/battery.c
@@ -127,7 +127,7 @@ static void batt_io_ccc_written_cb(uint16_t att_ecode, void *user_data)
}
batt->battery = btd_battery_register(device_get_path(batt->device),
- "GATT Battery Service");
+ "GATT Battery Service", NULL);
if (!batt->battery) {
batt_reset(batt);