Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/5] android: Add initial code for hidhost virtual unplug
@ 2013-10-22 18:49 Ravi kumar Veeramally
  2013-10-22 18:49 ` [PATCH 2/5] android: Add initial code for hidhost get and set protocol Ravi kumar Veeramally
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ravi kumar Veeramally @ 2013-10-22 18:49 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ravi kumar Veeramally

This adds initial code for hidhost .virtual_unplug interface
---
 android/hal-hidhost.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/android/hal-hidhost.c b/android/hal-hidhost.c
index f941f2f..523ce6d 100644
--- a/android/hal-hidhost.c
+++ b/android/hal-hidhost.c
@@ -79,6 +79,8 @@ static bt_status_t hh_disconnect(bt_bdaddr_t *bd_addr)
 
 static bt_status_t hh_virtual_unplug(bt_bdaddr_t *bd_addr)
 {
+	struct hal_msg_cmd_bt_hid_vp cmd;
+
 	DBG("");
 
 	if (!interface_ready())
@@ -87,7 +89,13 @@ static bt_status_t hh_virtual_unplug(bt_bdaddr_t *bd_addr)
 	if (!bd_addr)
 		return BT_STATUS_PARM_INVALID;
 
-	return BT_STATUS_UNSUPPORTED;
+	memcpy(cmd.bdaddr, bd_addr, sizeof(cmd.bdaddr));
+
+	if (hal_ipc_cmd(HAL_SERVICE_ID_HIDHOST, HAL_MSG_OP_BT_HID_VP,
+			sizeof(cmd), &cmd, 0, NULL, NULL) < 0)
+		return BT_STATUS_FAIL;
+
+	return BT_STATUS_SUCCESS;
 }
 
 static bt_status_t hh_set_info(bt_bdaddr_t *bd_addr, bthh_hid_info_t hid_info)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-22 20:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 18:49 [PATCH 1/5] android: Add initial code for hidhost virtual unplug Ravi kumar Veeramally
2013-10-22 18:49 ` [PATCH 2/5] android: Add initial code for hidhost get and set protocol Ravi kumar Veeramally
2013-10-22 18:49 ` [PATCH 3/5] android: Add initial code for hidhost get and set report Ravi kumar Veeramally
2013-10-22 18:49 ` [PATCH 4/5] android: Add initial code for hidhost send data Ravi kumar Veeramally
2013-10-22 18:49 ` [PATCH 5/5] android: Add initial code for hidhost set hid information Ravi kumar Veeramally
2013-10-22 20:16 ` [PATCH 1/5] android: Add initial code for hidhost virtual unplug Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox