npcx/i2c: Refactor i2c_freq_changed
npcx/i2c: Refactor i2c_freq_changed

This splits the implementation of i2c_freq_changed() into a per-port
worker function and a top-level iterator function. This change makes
i2c_port_set_freq() available to set a port's I2C speed.

BRANCH=none
BUG=b:201039003
TEST=with follow-on patches, switched I2C bus speed between 400 kHz
	and 1 MHz.

Change-Id: Ifb5613ac3a59cbd64f01f3a396f978db5e77d9f1
Signed-off-by: Caveh Jalali <08e24a66aefda7a55ca7d73f8903e0fb16eec763@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170291
Reviewed-by: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>

coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec