OSDN Git Service

i2c: exynos5: Add bus clock support
authorSam Protsenko <semen.protsenko@linaro.org>
Thu, 9 Dec 2021 14:03:13 +0000 (16:03 +0200)
committerWolfram Sang <wsa@kernel.org>
Thu, 9 Dec 2021 14:46:01 +0000 (15:46 +0100)
commit697ad2490c96981ec12b0a6d3c7c26fbad80e1e8
tree5d490a8c48fd7a1f60f986de4395a295ece114b5
parent3f68910259524ce84eaee05075141cdaa45e9195
i2c: exynos5: Add bus clock support

In new Exynos SoCs (like Exynos850) where HSI2C is implemented as a
part of USIv2 block, there are two clocks provided to HSI2C controller:
  - PCLK: bus clock (APB), provides access to register interface
  - IPCLK: operating IP-core clock; SCL is derived from this one

Both clocks have to be asserted for HSI2C to be functional in that case.

Add code to obtain and enable/disable PCLK in addition to already
handled operating clock. Make it optional though, as older Exynos SoC
variants only have one HSI2C clock.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-exynos5.c