diff --git a/profiles/input/device.c b/profiles/input/device.c
index 7df92e2..fbc3d6f 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
return NULL;
}
+int input_device_disconnect(struct btd_device *dev, struct btd_profile *profile,
+ btd_profile_cb cb)
+{
+ struct input_device *idev;
+ int err;
+
+ idev = find_device_by_path(devices, device_get_path(dev));
+ if (!idev)
+ return -ENOENT;
+
+ err = connection_disconnect(idev, 0);
+ if (err < 0)
+ return err;
+
+ if (cb)
+ cb(profile, dev, 0);
+
+ return 0;
+}
+
static DBusMessage *local_disconnect(DBusConnection *conn,
DBusMessage *msg, void *data)
{
diff --git a/profiles/input/device.h b/profiles/input/device.h
index be1f830..d68798c 100644
--- a/profiles/input/device.h
+++ b/profiles/input/device.h
int input_device_connect(struct btd_device *dev, struct btd_profile *profile,
btd_profile_cb cb);
+int input_device_disconnect(struct btd_device *dev, struct btd_profile *profile,
+ btd_profile_cb cb);