i2c: hisi: Add support to get clock frequency from clock
authorWeilong Chen <chenweilong@huawei.com>
Tue, 8 Nov 2022 01:58:11 +0000 (09:58 +0800)
committerWolfram Sang <wsa@kernel.org>
Wed, 7 Dec 2022 20:03:26 +0000 (21:03 +0100)
commit3256412fc57b6cabbc1cf1317d020e42f6d7aeab
tree003cb34e079bdd60293766d43e8cbf72dc30d23f
parentd78a167332e1ca8113268ed922c1212fd71b73ad
i2c: hisi: Add support to get clock frequency from clock

The clk_rate attribute is not generic device tree bindings for I2C
busses described in Documentation/devicetree/bindings/i2c/i2c.txt.
It can be managed by clock binding.

Support the driver to obtain clock information by clk_rate or
clock property. Find clock first, if not, fall back to clk_rate.

Signed-off-by: Weilong Chen <chenweilong@huawei.com>
Acked-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-hisi.c