Skip to contentSkip to conversation

i2c: imx: Improve message log when DMA is not used

PATCH Applied Fabio Estevam 2 participants 4 messages Nov 1, 2015 – Jan 3, 2016

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/2 i2c: imx: Improve message log when DMA is not used

From: Fabio Estevam <[email protected]>

When DMA cannot be used, it is better to state that the I2C controller will operate in PIO mode.

---
 drivers/i2c/busses/i2c-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-imx.c +1 -1
index 785aa67..1e522c3 100644
@@ -339,7 +339,7 @@ fail_tx:
 	dma_release_channel(dma->chan_tx);
 fail_al:
 	devm_kfree(dev, dma);
-	dev_info(dev, "can't use DMA\n");
+	dev_info(dev, "can't use DMA, using PIO instead.\n");
 }
 
 static void i2c_imx_dma_callback(void *arg)
Signature · 1 line
1.9.1
author reviewer
#1 lore raw

PATCH 2/2 i2c: imx: Remove unneeded comments

From: Fabio Estevam <[email protected]>

These multi-lines comments do not follow the standard kernel coding style. In fact, they are not useful comments, so get rid of them.

---
 drivers/i2c/busses/i2c-imx.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/i2c/busses/i2c-imx.c +0 -12
index 1e522c3..696c920 100644
@@ -29,9 +29,6 @@
  *
  */
 
-/** Includes *******************************************************************
-*******************************************************************************/
-
 #include <linux/clk.h>
 #include <linux/completion.h>
 #include <linux/delay.h>
@@ -54,9 +51,6 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 
-/** Defines ********************************************************************
-*******************************************************************************/
-
 /* This will be the driver name the kernel reports */
 #define DRIVER_NAME "imx-i2c"
 
@@ -118,9 +112,6 @@
 #define I2CR_IEN_OPCODE_0	0x0
 #define I2CR_IEN_OPCODE_1	I2CR_IEN
 
-/** Variables ******************************************************************
-*******************************************************************************/
-
 /*
  * sorted list of clock divider, register value pairs
  * taken from table 26-5, p.26-9, Freescale i.MX
@@ -409,9 +400,6 @@ static void i2c_imx_dma_free(struct imx_i2c_struct *i2c_imx)
 	dma->chan_using = NULL;
 }
 
-/** Functions for IMX I2C adapter driver ***************************************
-*******************************************************************************/
-
 static int i2c_imx_bus_busy(struct imx_i2c_struct *i2c_imx, int for_busy)
 {
 	unsigned long orig_jiffies = jiffies;
Signature · 1 line
1.9.1
#2 lore raw

Re: [PATCH 2/2] i2c: imx: Remove unneeded comments

Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

These multi-lines comments do not follow the standard kernel coding style. In fact, they are not useful comments, so get rid of them.

There have been some other changes to the imx driver. Could you rebase against my for-next or for-4.5? Thanks!