]> asedeno.scripts.mit.edu Git - linux.git/commit
i2c: designware: Separate timing parameter setting from HW initalization
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 19 Jun 2018 11:23:23 +0000 (14:23 +0300)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 3 Jul 2018 21:06:04 +0000 (23:06 +0200)
commit56b637b5b2acd2cc0a340be6ce1369cbf52d7b30
tree7448e02a5d800f5f8f98572cecd4899847ecfb10
parent1080ee7e28e1cea86310739e5dd4612868768aed
i2c: designware: Separate timing parameter setting from HW initalization

Mixed timing parameter validation, calculation and their debug prints
with HW initialization in i2c_dw_init_master() and i2c_dw_init_slave()
as been bothering me some time.

It makes function a little bit unclear to follow, doesn't show what steps
are needed to do only once during probe and what are needed whenever HW
needs to be reinitialized. Also those debug prints show information that
doesn't change runtime and thus are also needlessly printed multiple times
whenever HW is reinitialized.

Thus let the i2c_dw_init_master() and i2c_dw_init_slave() to do only HW
initialization and move out one time parameter setting and debug prints
to separate functions which are called only during probe.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-designware-master.c