Skip to content

Commit fa32f7a

Browse files
AxelLinbroonie
authored andcommitted
regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE
The defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE makes regmap_write() call looks strange because it takes reg parameter fist then val. Base on Erick's suggestion to define SC2731_PWR_WR_PROT and SC2731_WR_UNLOCK_VALUE instead. Signed-off-by: Axel Lin <[email protected]> Reviewed-by: Erick Chen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 433c9bb commit fa32f7a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/regulator/sc2731-regulator.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
/*
1414
* SC2731 regulator lock register
1515
*/
16-
#define SC2731_PWR_WR_PROT_VALUE 0xf0c
17-
#define SC2731_WR_UNLOCK 0x6e7f
16+
#define SC2731_PWR_WR_PROT 0xf0c
17+
#define SC2731_WR_UNLOCK_VALUE 0x6e7f
1818

1919
/*
2020
* SC2731 enable register
@@ -203,8 +203,8 @@ static struct regulator_desc regulators[] = {
203203

204204
static int sc2731_regulator_unlock(struct regmap *regmap)
205205
{
206-
return regmap_write(regmap, SC2731_PWR_WR_PROT_VALUE,
207-
SC2731_WR_UNLOCK);
206+
return regmap_write(regmap, SC2731_PWR_WR_PROT,
207+
SC2731_WR_UNLOCK_VALUE);
208208
}
209209

210210
static int sc2731_regulator_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)