]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: rs9: Fix I2C accessors
authorMarek Vasut <marex@denx.de>
Thu, 29 Sep 2022 19:55:21 +0000 (21:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:17:26 +0000 (18:17 +0100)
commit94c9e0e11a53e18fcedbf4563ef04a07385b2c89
treeec628c75b7b94569e178c0a945d635d137fc0c44
parent48629bf2ec08cc5c0aa87a8437f9d30b3673d112
clk: rs9: Fix I2C accessors

[ Upstream commit 2ff4ba9e37024735f5cefc5ea2a73fc66addfe0e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-renesas-pcie.c