Skip to content

Commit

Permalink
video: tegra20: dsi: use regulator_set_enable_if_allowed
Browse files Browse the repository at this point in the history
With the commit 4fcba5d ("regulator: implement basic reference
counter") the return value of regulator_set_enable may be EALREADY or
EBUSY for fixed/gpio regulators and may be further expanded on all
regulators.

Change to use the more relaxed regulator_set_enable_if_allowed to
continue if regulator already was enabled or disabled.

Signed-off-by: Svyatoslav Ryhel <[email protected]>
  • Loading branch information
clamor-s committed Oct 3, 2023
1 parent a3c16a0 commit 9bca538
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/video/tegra20/tegra-dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,11 +831,9 @@ static int tegra_dsi_bridge_probe(struct udevice *dev)

tegra_dsi_get_format(device->format, &priv->format);

if (priv->avdd) {
ret = regulator_set_enable(priv->avdd, true);
if (ret)
return ret;
}
ret = regulator_set_enable_if_allowed(priv->avdd, true);
if (ret && ret != -ENOSYS)
return ret;

tegra_dsi_init_clocks(dev);

Expand Down

0 comments on commit 9bca538

Please sign in to comment.