summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWendly Li <wendlyli@google.com>2023-01-06 11:08:34 +0000
committerWendly Li <wendlyli@google.com>2023-01-06 11:11:35 +0000
commitb912fef242afc2e3c81e3934d11e77dcf9817c2e (patch)
treee1520dee8e077ae6d033f641f709edb7f4689148
parentd51b4da9541950374917871eb61e9e87179b1ded (diff)
downloadcommon-b912fef242afc2e3c81e3934d11e77dcf9817c2e.tar.gz
touch/common: refine debugging message
Bug: 177329320 Test: TBN works properly Change-Id: Ic1937feead923d6ba121d977a4d012040f52d6e6 Signed-off-by: Wendly Li <wendlyli@google.com>
-rw-r--r--touch_bus_negotiator.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/touch_bus_negotiator.c b/touch_bus_negotiator.c
index 9ad00de..f1361d8 100644
--- a/touch_bus_negotiator.c
+++ b/touch_bus_negotiator.c
@@ -77,11 +77,16 @@ static int aoc_channel_kthread(void *data)
struct tbn_context *tbn = data;
struct TbnEventResponse resp;
ssize_t len;
+ bool service_ready = false;
while (!kthread_should_stop()) {
- if (!aoc_tbn_service_ready()) {
- dev_warn(tbn->dev, "%s: AOC TBN service is not ready.\n",
- __func__);
+ if (service_ready != aoc_tbn_service_ready()) {
+ service_ready = !service_ready;
+ dev_info(tbn->dev, "%s: AOC TBN service is %s.\n",
+ __func__, service_ready ? "ready" : "not ready");
+ }
+
+ if (!service_ready) {
msleep(1000);
continue;
}