All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] hog: re-enable HoG report notifications on HoG device reconnect
@ 2015-04-17 22:00 Petri Gynther
  2015-04-20 14:50 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 10+ messages in thread
From: Petri Gynther @ 2015-04-17 22:00 UTC (permalink / raw)
  To: linux-bluetooth

On HoG device reconnect, re-enable HoG report notifications every
time by writing the client characteristic configuration attribute
of each HoG report.

Doing this on every reconnect:
1. ensures that HoG report notifications are always enabled
   (e.g. lost report notification state in battery swap).
2. signals to HoG device that it can start sending HoG reports
   (e.g. buffered keypresses while the reconnect is still pending).
---
 profiles/input/hog.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index c55443c..690fd43 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -842,10 +842,7 @@ static void attio_connected_cb(GAttrib *attrib, gpointer user_data)
 	for (l = hogdev->reports; l; l = l->next) {
 		struct report *r = l->data;
 
-		r->notifyid = g_attrib_register(hogdev->attrib,
-					ATT_OP_HANDLE_NOTIFY,
-					r->decl->value_handle,
-					report_value_cb, r, NULL);
+		enable_report_notification(r);
 	}
 }
 
-- 
2.2.0.rc0.207.ga3a616c


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

end of thread, other threads:[~2015-04-28  3:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17 22:00 [PATCH 2/3] hog: re-enable HoG report notifications on HoG device reconnect Petri Gynther
2015-04-20 14:50 ` Luiz Augusto von Dentz
2015-04-20 16:34   ` Petri Gynther
2015-04-20 20:12     ` Luiz Augusto von Dentz
2015-04-20 21:54       ` Petri Gynther
2015-04-20 23:17         ` Petri Gynther
2015-04-21  6:08           ` Luiz Augusto von Dentz
2015-04-21 20:27             ` Petri Gynther
2015-04-21 20:49               ` Luiz Augusto von Dentz
2015-04-28  3:17                 ` Arman Uguray

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.