From 8a21ff775f5654eb078ae57ba64cdbd32b9297c4 Mon Sep 17 00:00:00 2001 From: Okash Khawaja Date: Sun, 25 Jun 2017 19:40:02 +0100 Subject: staging: speakup: make ttyio synths use device name This patch introduces new module parameter, dev, which takes a string representing the device that the external synth is connected to, e.g. ttyS0, ttyUSB0 etc. This is then used to communicate with the synth. That way, speakup can support more than ttyS*. As of this patch, it only supports ttyS*, ttyUSB* and selected synths for lp*. dev parameter is only available for tty-migrated synths. Users will either use dev or ser as both serve same purpose. This patch maintains backward compatility by allowing ser to be specified. When both are specified, whichever is non-default, i.e. not ttyS0, is used. If both are non-default then dev is used. Signed-off-by: Okash Khawaja Reviewed-by: Samuel Thibault Reviewed-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman --- drivers/staging/speakup/speakup_acntsa.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/staging/speakup/speakup_acntsa.c') diff --git a/drivers/staging/speakup/speakup_acntsa.c b/drivers/staging/speakup/speakup_acntsa.c index 6e4f873eddbc..0e10404e2e8c 100644 --- a/drivers/staging/speakup/speakup_acntsa.c +++ b/drivers/staging/speakup/speakup_acntsa.c @@ -96,6 +96,7 @@ static struct spk_synth synth_acntsa = { .trigger = 50, .jiffies = 30, .full = 40000, + .dev_name = SYNTH_DEFAULT_DEV, .startup = SYNTH_START, .checkval = SYNTH_CHECK, .vars = vars, @@ -135,9 +136,11 @@ static int synth_probe(struct spk_synth *synth) } module_param_named(ser, synth_acntsa.ser, int, 0444); +module_param_named(dev, synth_acntsa.dev_name, charp, S_IRUGO); module_param_named(start, synth_acntsa.startup, short, 0444); MODULE_PARM_DESC(ser, "Set the serial port for the synthesizer (0-based)."); +MODULE_PARM_DESC(dev, "Set the device e.g. ttyUSB0, for the synthesizer."); MODULE_PARM_DESC(start, "Start the synthesizer once it is loaded."); module_spk_synth(synth_acntsa); -- cgit v1.2.3