Skip to contentSkip to conversation

synclink_gt add serial bit order control

PATCH New Paul Fulghum 1 participant 1 message Jul 17, 2008 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 synclink_gt add serial bit order control

Add control of hardware serial bit order between
LSB first (default/standard) and MSB first.

include/linux/synclink.h +1 -0
@@ -136,6 +136,7 @@
 #define MGSL_INTERFACE_RTS_EN   0x10
 #define MGSL_INTERFACE_LL       0x20
 #define MGSL_INTERFACE_RL       0x40
+#define MGSL_INTERFACE_MSB_FIRST 0x80
 
 typedef struct _MGSL_PARAMS
 {
drivers/char/synclink_gt.c +2 -0
@@ -4430,6 +4430,8 @@ static void msc_set_vcr(struct slgt_info
 		break;
 	}
 
+	if (info->if_mode & MGSL_INTERFACE_MSB_FIRST)
+		val |= BIT4;
 	if (info->signals & SerialSignal_DTR)
 		val |= BIT3;
 	if (info->signals & SerialSignal_RTS)