Re: [PATCH v6 8/8] i2c: add zhaoxin i2c controller driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2024/1/4 04:02, Andi Shyti wrote:
Hi Hans,

[...]

--- a/drivers/i2c/busses/i2c-viai2c-common.c
+++ b/drivers/i2c/busses/i2c-viai2c-common.c
@@ -5,7 +5,7 @@
  #define VIAI2C_TIMEOUT			(msecs_to_jiffies(1000))
  #define VIAI2C_STRETCHING_TIMEOUT	200
-static int viai2c_wait_bus_ready(struct viai2c *i2c)
+int viai2c_wait_bus_ready(struct viai2c *i2c)
no, please, choose the rigth prototype at the beginning, don't
double change things in the same series.


ok, I will review my patch more carefully.


  {
  	unsigned long timeout;
  	void __iomem *base = i2c->base;
@@ -23,7 +23,7 @@ static int viai2c_wait_bus_ready(struct viai2c *i2c)
  	return 0;
  }
-static int viai2c_wait_status(struct viai2c *i2c)
+int viai2c_wait_status(struct viai2c *i2c)
  {
  	int ret = 0;
  	unsigned long time_left;
@@ -71,6 +71,9 @@ static irqreturn_t viai2c_isr(int irq, void *data)
/* save the status and write-clear it */
  	i2c->cmd_status = readw(i2c->base + VIAI2C_REG_ISR);
+	if (!i2c->cmd_status)
+		return IRQ_NONE;
+
is this change related to this patch? can you put this at the
beginning?

Andi


The original wmt driver does not have this, maybe I should use
'if (i2c->platform == VIAI2C_PLAT_ZHAOXIN &&! i2c->cmd_status)' instead?


Hans





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux