Re: [PATCH v3 5/8] i2c: designware: Move SDA hold time configuration to common code

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

 



On 06/11/2018 06:17 PM, Andy Shevchenko wrote:
On Mon, 2018-06-11 at 17:22 +0300, Jarkko Nikula wrote:
SDA hold time configuration is common to both master and slave code.
It
is also something that can be done once during probe and do only
register write when HW needs to be reinitialized.

Remove duplication and move SDA hold time configuration to common
code.
It will be called from slave probe and for master code from a new
i2c_dw_set_timings_master() to where we will populate more probe time
timing parameter setting.

+	ret = i2c_dw_set_timings_master(dev);
+	if (ret)
+		return ret;

Perhaps + blank line?

  	ret = dev->init(dev);
  	if (ret)
  		return ret;

+	ret = i2c_dw_set_sda_hold(dev);
+	if (ret)
+		return ret;

Ditto.

Will do both.

--
Jarkko



[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