clk: rs9: Fix I2C accessors
authorMarek Vasut <marex@denx.de>
Thu, 29 Sep 2022 19:55:21 +0000 (21:55 +0200)
committerStephen Boyd <sboyd@kernel.org>
Mon, 17 Oct 2022 21:06:07 +0000 (14:06 -0700)
commit2ff4ba9e37024735f5cefc5ea2a73fc66addfe0e
treea3b0f8df645da9efb09ac09c46c8d2e984a26ae4
parent9abf2313adc1ca1b6180c508c25f22f9395cc780
clk: rs9: Fix I2C accessors

Add custom I2C accessors to this driver, since the regular I2C regmap ones
do not generate the exact I2C transfers required by the chip. On I2C write,
it is mandatory to send transfer length first, on read the chip returns the
transfer length in first byte. Instead of always reading back 8 bytes, which
is the default and also the size of the entire register file, set BCP register
to 1 to read out 1 byte which is less wasteful.

Fixes: 892e0ddea1aa ("clk: rs9: Add Renesas 9-series PCIe clock generator driver")
Reported-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929195521.284497-1-marex@denx.de
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-renesas-pcie.c