Re: [PATCH] i2c: designware: suppress unneeded SDA hold time warnings

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

 



On 03/08/2018 03:23 PM, Alexander Monakov wrote:
The hardware may not support SDA hold time configuration, but if it is
not set in the Device Tree either, there is no need to print a warning.

Link: https://patchwork.kernel.org/patch/9681781/
Cc: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxx>
Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
Cc: Wolfram Sang <wsa@xxxxxxxxxxxxx>
Signed-off-by: Alexander Monakov <amonakov@xxxxxxxxx>
---
Hello,

Thomas originally raised this issue in April (see patchwork link), Jarkko
gave his acked-by but recommended to use "else if", Wolfram agreed, and
then it seems to have fallen through the cracks. Resubmitting with "else if".

Thanks.
Alexander

  drivers/i2c/busses/i2c-designware-master.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 418c233075d3..5d49f2aa8ccf 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -161,7 +161,7 @@ static int i2c_dw_init_master(struct dw_i2c_dev *dev)
  		if (!(dev->sda_hold_time & DW_IC_SDA_HOLD_RX_MASK))
  			dev->sda_hold_time |= 1 << DW_IC_SDA_HOLD_RX_SHIFT;
  		dw_writel(dev, dev->sda_hold_time, DW_IC_SDA_HOLD);
-	} else {
+	} else if (dev->sda_hold_time) {
  		dev_warn(dev->dev,
  			"Hardware too old to adjust SDA hold time.\n");
  	}

Acked-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>



[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