]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dsi: Fix regulator API abuse
authorArchit Taneja <architt@codeaurora.org>
Fri, 29 Apr 2016 09:49:35 +0000 (15:19 +0530)
committerRob Clark <robdclark@gmail.com>
Sun, 8 May 2016 14:22:17 +0000 (10:22 -0400)
commitc328892bd2aa25551d6b7fb47dc8a1e999c2bc89
tree0c5b7ef36440951d2d566d9e800d5d89d9020ae6
parentf2d58ba684a60f7ed9bb448a0e9adb3df42ac638
drm/msm/dsi: Fix regulator API abuse

The voltage changing code in this driver is broken and should be
removed.  The driver sets a single, exact voltage on probe.  Unless
there is a very good reason for this (which should be documented in
comments) constraints like this need to be set via the machine
constraints, voltage setting in a driver is expected to be used in cases
where the voltage varies at runtime.

In addition client drivers should almost never be calling
regulator_can_set_voltage(), if the device needs to set a voltage it
needs to set the voltage and the regulator core will handle the case
where the regulator is fixed voltage.  If the driver simply skips
setting the voltage if it doesn't have permission then it should just
not bother in the first place.

Originally authored by Mark Brown <broonie@kernel.org>

Remove the min/max voltage data entries per SoC managed by the driver.
These aren't needed as we don't try to set voltages any more. Mention in
comments the voltages that each regulator expects.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/dsi.h
drivers/gpu/drm/msm/dsi/dsi_cfg.c
drivers/gpu/drm/msm/dsi/dsi_host.c
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
drivers/gpu/drm/msm/dsi/phy/dsi_phy_20nm.c
drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm.c
drivers/gpu/drm/msm/dsi/phy/dsi_phy_28nm_8960.c