diff options
author | Binbin Zhou <zhoubinbin@loongson.cn> | 2025-02-20 15:56:12 +0300 |
---|---|---|
committer | Andi Shyti <andi.shyti@kernel.org> | 2025-02-27 01:23:33 +0300 |
commit | 71c49ee9bb41e1709abac7e2eb05f9193222e580 (patch) | |
tree | 005193c4e29be7957558d8c86dd6ab60e9c671e8 /lib/zstd/common/debug.h | |
parent | dd1998e243f5fa25d348a384ba0b6c84d980f2b2 (diff) | |
download | linux-71c49ee9bb41e1709abac7e2eb05f9193222e580.tar.xz |
i2c: ls2x: Fix frequency division register access
According to the chip manual, the I2C register access type of
Loongson-2K2000/LS7A is "B", so we can only access registers in byte
form (readb()/writeb()).
Although Loongson-2K0500/Loongson-2K1000 do not have similar
constraints, register accesses in byte form also behave correctly.
Also, in hardware, the frequency division registers are defined as two
separate registers (high 8-bit and low 8-bit), so we just access them
directly as bytes.
Fixes: 015e61f0bffd ("i2c: ls2x: Add driver for Loongson-2K/LS7A I2C controller")
Co-developed-by: Hongliang Wang <wanghongliang@loongson.cn>
Signed-off-by: Hongliang Wang <wanghongliang@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Cc: stable@vger.kernel.org # v6.3+
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250220125612.1910990-1-zhoubinbin@loongson.cn
Diffstat (limited to 'lib/zstd/common/debug.h')
0 files changed, 0 insertions, 0 deletions