summaryrefslogtreecommitdiff
path: root/drivers/mfd/rsmu_spi.c
diff options
context:
space:
mode:
authorMin Li <min.li.xe@renesas.com>2024-05-01 19:32:55 +0300
committerLee Jones <lee@kernel.org>2024-05-10 17:39:18 +0300
commit53d3ff7be4a67841d7302c8d5e6521124959fdc1 (patch)
treecdf4714cc1b1dc8dc96f6eb4f2fe2705609c2986 /drivers/mfd/rsmu_spi.c
parentecbc0f273d835d27eabcd78adc05294f4b80e87e (diff)
downloadlinux-53d3ff7be4a67841d7302c8d5e6521124959fdc1.tar.xz
mfd: rsmu: support I2C SMBus access
8a3400x device implements its own reg_read and reg_write, which only supports I2C bus access. This patch adds support for SMBus access. Signed-off-by: Min Li <min.li.xe@renesas.com> Link: https://lore.kernel.org/r/LV3P220MB12021342F302AADEB6C1601CA0192@LV3P220MB1202.NAMP220.PROD.OUTLOOK.COM Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/rsmu_spi.c')
-rw-r--r--drivers/mfd/rsmu_spi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/rsmu_spi.c b/drivers/mfd/rsmu_spi.c
index ca0a1202c3ce..39d9be1e141f 100644
--- a/drivers/mfd/rsmu_spi.c
+++ b/drivers/mfd/rsmu_spi.c
@@ -106,10 +106,10 @@ static int rsmu_write_page_register(struct rsmu_ddata *rsmu, u32 reg)
return 0;
page_reg = RSMU_CM_PAGE_ADDR;
page = reg & RSMU_PAGE_MASK;
- buf[0] = (u8)(page & 0xff);
- buf[1] = (u8)((page >> 8) & 0xff);
- buf[2] = (u8)((page >> 16) & 0xff);
- buf[3] = (u8)((page >> 24) & 0xff);
+ buf[0] = (u8)(page & 0xFF);
+ buf[1] = (u8)((page >> 8) & 0xFF);
+ buf[2] = (u8)((page >> 16) & 0xFF);
+ buf[3] = (u8)((page >> 24) & 0xFF);
bytes = 4;
break;
case RSMU_SABRE: