Commit c288e34d authored by Mark Zhang's avatar Mark Zhang Committed by Greg Kroah-Hartman

regulator: max77620: Initialize values for DT properties

commit 0ab66b3c upstream.

If regulator DT node doesn't exist, its of_parse_cb callback
function isn't called. Then all values for DT properties are
filled with zero. This leads to wrong register update for
FPS and POK settings.
Signed-off-by: default avatarJinyoung Park <jinyoungp@nvidia.com>
Signed-off-by: default avatarMark Zhang <markz@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 462aee48
/* /*
* Maxim MAX77620 Regulator driver * Maxim MAX77620 Regulator driver
* *
* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
* *
* Author: Mallikarjun Kasoju <mkasoju@nvidia.com> * Author: Mallikarjun Kasoju <mkasoju@nvidia.com>
* Laxman Dewangan <ldewangan@nvidia.com> * Laxman Dewangan <ldewangan@nvidia.com>
...@@ -803,6 +803,14 @@ static int max77620_regulator_probe(struct platform_device *pdev) ...@@ -803,6 +803,14 @@ static int max77620_regulator_probe(struct platform_device *pdev)
rdesc = &rinfo[id].desc; rdesc = &rinfo[id].desc;
pmic->rinfo[id] = &max77620_regs_info[id]; pmic->rinfo[id] = &max77620_regs_info[id];
pmic->enable_power_mode[id] = MAX77620_POWER_MODE_NORMAL; pmic->enable_power_mode[id] = MAX77620_POWER_MODE_NORMAL;
pmic->reg_pdata[id].active_fps_src = -1;
pmic->reg_pdata[id].active_fps_pd_slot = -1;
pmic->reg_pdata[id].active_fps_pu_slot = -1;
pmic->reg_pdata[id].suspend_fps_src = -1;
pmic->reg_pdata[id].suspend_fps_pd_slot = -1;
pmic->reg_pdata[id].suspend_fps_pu_slot = -1;
pmic->reg_pdata[id].power_ok = -1;
pmic->reg_pdata[id].ramp_rate_setting = -1;
ret = max77620_read_slew_rate(pmic, id); ret = max77620_read_slew_rate(pmic, id);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment