From: Alexander Monakov Date: Thu, 8 Mar 2018 13:23:53 +0000 (+0300) Subject: i2c: designware: suppress unneeded SDA hold time warnings X-Git-Tag: v4.19~1263^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a20e707aae2562ad1e6fc39bbc0fa9fd47a6390;p=platform%2Fkernel%2Flinux-rpi.git i2c: designware: suppress unneeded SDA hold time warnings 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. Reported-by: Thomas Petazzoni Signed-off-by: Alexander Monakov Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c index 0573253..fd36c39 100644 --- a/drivers/i2c/busses/i2c-designware-master.c +++ b/drivers/i2c/busses/i2c-designware-master.c @@ -163,7 +163,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"); }