Thread (50 messages) flat view 50 messages, 7 authors, 2016-06-14

RE: [PATCH] can: rcar_canfd: Add Renesas R-Car CAN FD driver

From: Ramesh Shanmugasundaram <hidden>
Date: 2016-03-02 08:45:47
Also in: linux-can, linux-devicetree, linux-renesas-soc

Hi Oliver,

Thanks for the review.
On 03/01/2016 10:34 AM, Ramesh Shanmugasundaram wrote:
quoted
This patch adds support for the CAN FD controller found in Renesas
R-Car SoCs. The controller operates in CAN FD mode by default. Two
test modes are available and can be enabled by the
"rcar_canfd.testmode" module parameter. Refer to Documentation/kernel-
parameters.txt.

(..)
quoted
+#ifdef CONFIG_DEBUG_FS
+#include <linux/debugfs.h>
+
+static int rcar_canfd_showregs(struct seq_file *s, void *data) {
+	struct rcar_canfd_channel *priv = s->private;
+	u32 ch = priv->channel;
+	u32 rf = ch + RCANFD_RFFIFO_IDX;
+	u32 cf = RCANFD_CFFIFO_IDX;
+	u32 val, offset, i;
+
+	if (testmode)
+		seq_printf(s, "RCANFD : testmode = %d\n", testmode);
+	seq_printf(s, "RCANFD register dump: channel %u\n", ch);
+	seq_printf(s, "%-40s: %x\n", "g: cfg",
+		   rcar_canfd_read(priv, RCANFD_GCFG));
Why do you think you would need this kind of register dumps in debugfs?

This could be interesting for development purposes - but in production
drivers this is pretty unusual and needless.
I thought it would be useful when we add more features to the driver (e.g. Gateway mode).
 
I would sugest to remove either the testmode (already suggested by Marc)
and this register dump stuff.
OK. I'll remove both.

Thanks,
Ramesh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help