Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-02

Re: [PATCH v2 2/5] fsl/qe: setup clock source for TDM mode

From: David Miller <davem@davemloft.net>
Date: 2016-06-02 19:24:54
Also in: linuxppc-dev, lkml

From: Zhao Qiang <qiang.zhao@nxp.com>
Date: Thu, 2 Jun 2016 09:44:58 +0800
+static int ucc_get_tdm_sync_source(u32 tdm_num, enum qe_clock clock,
+				   enum comm_dir mode)
+{
+	int source = -EINVAL;
+
+	if (mode == COMM_DIR_RX && clock == QE_RSYNC_PIN) {
+		source = 0;
+		return source;
+	}
+	if (mode == COMM_DIR_TX && clock == QE_TSYNC_PIN) {
+		source = 0;
+		return source;
+	}
+
+	switch (tdm_num) {
+	case 0:
+	case 1:
+		switch (clock) {
+		case QE_BRG9:
+				source = 1;
+				break;
+		case QE_BRG10:
+				source = 2;
+				break;
These switch case bodies are over indented.  Same goes for the rest of
this function.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help