]> Git Repo - linux.git/commitdiff
i3c: ast2600: fix register setting for 545 ohm pullups
authorJeremy Kerr <[email protected]>
Fri, 28 Apr 2023 00:18:49 +0000 (08:18 +0800)
committerAlexandre Belloni <[email protected]>
Fri, 28 Apr 2023 06:52:23 +0000 (08:52 +0200)
The 2k register setting is zero, OR-ing it in doesn't parallel the 2k
and 750 ohm pullups. We need a separate value for the 545 ohm setting.

Reported-by: Lukwinski Zbigniew <[email protected]>
Signed-off-by: Jeremy Kerr <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
drivers/i3c/master/ast2600-i3c-master.c

index 6715d1f044b64177bd171b4167b63b5d9b1ddae8..b72c12c5168fe59f0a0ad09b5fddc82e0c51549f 100644 (file)
@@ -21,6 +21,7 @@
 #define AST2600_I3CG_REG0_SDA_PULLUP_EN_MASK   GENMASK(29, 28)
 #define AST2600_I3CG_REG0_SDA_PULLUP_EN_2K     (0x0 << 28)
 #define AST2600_I3CG_REG0_SDA_PULLUP_EN_750    (0x2 << 28)
+#define AST2600_I3CG_REG0_SDA_PULLUP_EN_545    (0x3 << 28)
 
 #define AST2600_I3CG_REG1_I2C_MODE             BIT(0)
 #define AST2600_I3CG_REG1_TEST_MODE            BIT(1)
@@ -62,8 +63,7 @@ static int ast2600_i3c_pullup_to_reg(unsigned int ohms, u32 *regp)
                reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_750;
                break;
        case 545:
-               reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_2K |
-                       AST2600_I3CG_REG0_SDA_PULLUP_EN_750;
+               reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_545;
                break;
        default:
                return -EINVAL;
This page took 0.062842 seconds and 4 git commands to generate.