public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] speakup_dummy: log about characters received by the dummy driver
@ 2020-11-01 18:39 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-11-01 18:39 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, speakup

The dummy speakup driver is used to check that speakup is working
properly, without the need for actually owning the hardware. Some
drivers require receiving characters, so we need a way to check that
this is working properly.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

Index: linux-5.9/drivers/accessibility/speakup/speakup_dummy.c
===================================================================
--- linux-5.9.orig/drivers/accessibility/speakup/speakup_dummy.c
+++ linux-5.9/drivers/accessibility/speakup/speakup_dummy.c
@@ -80,6 +80,11 @@ static struct attribute *synth_attrs[] =
 	NULL,	/* need to NULL terminate the list of attributes */
 };
 
+static void read_buff_add(u_char c)
+{
+	pr_info("speakup_dummy: got character %02x\n", c);
+}
+
 static struct spk_synth synth_dummy = {
 	.name = "dummy",
 	.version = DRV_VERSION,
@@ -103,7 +108,7 @@ static struct spk_synth synth_dummy = {
 	.flush = spk_synth_flush,
 	.is_alive = spk_synth_is_alive_restart,
 	.synth_adjust = NULL,
-	.read_buff_add = NULL,
+	.read_buff_add = read_buff_add,
 	.get_index = NULL,
 	.indexing = {
 		.command = NULL,

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-01 18:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-01 18:39 [PATCH] speakup_dummy: log about characters received by the dummy driver Samuel Thibault

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