Skip to content

Commit

Permalink
mfd: da9061: Fix Failed to set Two-Wire Bus Mode.
Browse files Browse the repository at this point in the history
[ Upstream commit 834382e ]

In da9062_i2c_probe() regmap_clear_bits() tries to access CONFIG_J
register. As CONFIG_J is not present in da9061_aa_writeable_ranges[] probe
of da9061 fails:

  da9062 2-0058: Entering I2C mode!
  da9062 2-0058: Failed to set Two-Wire Bus Mode.
  da9062: probe of 2-0058 failed with error -5

Add CONFIG_J register to da9061_aa_writeable_ranges[].

Fixes: 5c6f0f4 ("mfd: da9062: Support SMBus and I2C mode")
Signed-off-by: Jens Hillenstedt <jens.hillenstedt@ise.de>
Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220915092004.168744-1-jens.hillenstedt@ise.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
JensHillenstedt authored and gregkh committed Oct 21, 2022
1 parent 3503068 commit 64756f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/mfd/da9062-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ static const struct regmap_range da9061_aa_writeable_ranges[] = {
regmap_reg_range(DA9062AA_VBUCK1_B, DA9062AA_VBUCK4_B),
regmap_reg_range(DA9062AA_VBUCK3_B, DA9062AA_VBUCK3_B),
regmap_reg_range(DA9062AA_VLDO1_B, DA9062AA_VLDO4_B),
regmap_reg_range(DA9062AA_CONFIG_J, DA9062AA_CONFIG_J),
regmap_reg_range(DA9062AA_GP_ID_0, DA9062AA_GP_ID_19),
};

Expand Down

0 comments on commit 64756f4

Please sign in to comment.