[v4,0/8] i2c: designware: Improve debug prints
mbox series

Message ID 20180612112205.11200-1-jarkko.nikula@linux.intel.com
Headers show
  • i2c: designware: Improve debug prints
Related show


Jarkko Nikula June 12, 2018, 11:21 a.m. UTC
Motivation here is to improve debug prints and while doing so to remove
some duplication and separate timing parameter validation from actual
register writes as this parameter validation and/or calculation is
needed to do only during probe.

Currently debug code prints SCL timing parameters whenever HW is
reinitialized but doesn't print importand SDA hold time nor actual bus
speed the controller is going to operate.

Thanks to Andy for review comments through the versions.

- Updated patches 2/8, 4/8 and 5/8: Yet another redundant "ret = 0;"
  assignment removal, couple blank lines added, updated commit log.
- Andy's reviewed by tag added to remaining patches. I hope I didn't
  miss any of his comments to previous version.

- Fail always if i2c_dw_acquire_lock() returns an error.
- Keep include statement order
- Remove redundant "ret = 0; " assignment from i2c_dw_set_sda_hold()

- SDA hold time configuration moved from "Separate timing parameter
  setting from HW initalization" patch to a new patch as well as
  i2c_dw_clk_rate() cleanup.
- New patch replacing ___constant_swab32() with swab32().
- Added Andys review by tags to patches 1-2.

Jarkko Nikula (8):
  i2c: designware: Remove needless variable from i2c_dw_init_slave()
  i2c: designware: Move register access detection to common code
  i2c: designware: Don't use internal ___constant_swab32
  i2c: designware: Call i2c_dw_clk_rate() only once in
  i2c: designware: Move SDA hold time configuration to common code
  i2c: designware: Separate timing parameter setting from HW
  i2c: designware: Add debug print for SDA hold time value
  i2c: designware: Add debug print for bus speed

 drivers/i2c/busses/i2c-designware-common.c |  76 ++++++++
 drivers/i2c/busses/i2c-designware-core.h   |   2 +
 drivers/i2c/busses/i2c-designware-master.c | 191 ++++++++++++---------
 drivers/i2c/busses/i2c-designware-slave.c  |  47 ++---
 4 files changed, 198 insertions(+), 118 deletions(-)