1
0
mirror of https://github.com/m42uko/linux-fsia6b.git synced 2022-05-12 18:36:03 +02:00

Clean up patches to linuxconsole's inputattach

This commit is contained in:
Markus Koch 2019-07-26 18:40:20 +02:00
parent 5fc1539c0c
commit 6a70e971d5
3 changed files with 69 additions and 34 deletions

View File

@ -0,0 +1,27 @@
From 6b60b90b0cfa8e881324533082fbefb6aaaa2b8d Mon Sep 17 00:00:00 2001
From: Markus Koch <markus@notsyncing.net>
Date: Fri, 26 Jul 2019 18:26:30 +0200
Subject: [PATCH 1/2] inputattach: add 155200 to the list of valid baud rates
There are multiple supported devices which work with this baud rate.
Signed-off-by: Markus Koch <markus@notsyncing.net>
---
utils/inputattach.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/utils/inputattach.c b/utils/inputattach.c
index cdbec739..31cc431f 100644
--- a/utils/inputattach.c
+++ b/utils/inputattach.c
@@ -1010,6 +1010,7 @@ int main(int argc, char **argv)
case 9600: type->speed = B9600; break;
case 19200: type->speed = B19200; break;
case 38400: type->speed = B38400; break;
+ case 115200: type->speed = B115200; break;
default:
fprintf(stderr, "inputattach: invalid baud rate '%d'\n",
baud);
--
2.22.0

View File

@ -0,0 +1,42 @@
From c34fff11dea62368151274dc307420b753ce2900 Mon Sep 17 00:00:00 2001
From: Markus Koch <markus@notsyncing.net>
Date: Fri, 26 Jul 2019 18:35:31 +0200
Subject: [PATCH 2/2] inputattach: add support for the FlySky FS-iA6B RC
receiver
Signed-off-by: Markus Koch <markus@notsyncing.net>
---
utils/inputattach.c | 3 +++
utils/serio-ids.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/utils/inputattach.c b/utils/inputattach.c
index 31cc431f..90260f85 100644
--- a/utils/inputattach.c
+++ b/utils/inputattach.c
@@ -902,6 +902,9 @@ static struct input_types input_types[] = {
{ "--rainshadow-cec", "-rainshadow-cec", "RainShadow Tech HDMI CEC dongle",
B9600, CS8,
SERIO_RAINSHADOW_CEC, 0x00, 0x00, 0, NULL },
+{ "--fsia6b", "-fsia6b", "FS-iA6B RC Receiver",
+ B115200, CS8,
+ SERIO_FSIA6B, 0x00, 0x00, 0, NULL },
{ NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, NULL }
};
diff --git a/utils/serio-ids.h b/utils/serio-ids.h
index ab52b0dc..aa0c48fb 100644
--- a/utils/serio-ids.h
+++ b/utils/serio-ids.h
@@ -137,5 +137,8 @@
#ifndef SERIO_RAINSHADOW_CEC
# define SERIO_RAINSHADOW_CEC 0x41
#endif
+#ifndef SERIO_FSIA6B
+# define SERIO_FSIA6B 0x42
+#endif
#endif
--
2.22.0

View File

@ -1,34 +0,0 @@
From 339a2bc99269466e05a546de2ac63c3cb46a2e6e Mon Sep 17 00:00:00 2001
From: David Gardner <git@icmfp.com>
Date: Tue, 26 Feb 2019 19:11:43 +0000
Subject: [PATCH] Add support for the FS-iA6B receiver
---
utils/inputattach.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/utils/inputattach.c b/utils/inputattach.c
index 53528551..dd3112d6 100644
--- a/utils/inputattach.c
+++ b/utils/inputattach.c
@@ -864,6 +864,9 @@ static struct input_types input_types[] = {
{ "--wacom_iv", "-wacom_iv", "Wacom protocol IV tablet",
B9600, CS8 | CRTSCTS,
SERIO_WACOM_IV, 0x00, 0x00, 0, wacom_iv_init },
+{ "--fsia6b", "-fsia6b", "FS-iA6B RC Receiver",
+ B115200, CS8,
+ 0x42, 0x00, 0x00, 0, NULL },
{ "--pulse8-cec", "-pulse8-cec", "Pulse Eight HDMI CEC dongle",
B9600, CS8,
SERIO_PULSE8_CEC, 0x00, 0x00, 0, NULL },
@@ -978,6 +981,7 @@ int main(int argc, char **argv)
case 9600: type->speed = B9600; break;
case 19200: type->speed = B19200; break;
case 38400: type->speed = B38400; break;
+ case 115200: type->speed = B115200; break;
default:
fprintf(stderr, "inputattach: invalid baud rate '%d'\n",
baud);
--
2.11.0