]> git.karo-electronics.de Git - linux-beck.git/commit
i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs
authorHans de Goede <hdegoede@redhat.com>
Sun, 27 Sep 2015 14:57:08 +0000 (16:57 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 30 Nov 2015 14:54:22 +0000 (15:54 +0100)
commitbba61f50f76574ca5b84b310925be7c2e8e64275
tree188c97103d85fcd433b4e4e89cc22c03ab814e25
parent9abd29e7c13de24ce73213a425d9574b35ac0c6a
i2c: mv64xxx: The n clockdiv factor is 0 based on sunxi SoCs

According to the datasheets the n factor for dividing the tclk is
2 to the power n on Allwinner SoCs, not 2 to the power n + 1 as it is
on other mv64xxx implementations.

I've contacted Allwinner about this and they have confirmed that the
datasheet is correct.

This commit fixes the clk-divider calculations for Allwinner SoCs
accordingly.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-mv64xxx.c