提交 4123de21 编写于 作者: T Tomi Valkeinen

OMAPDSS: DPI: change regulator handling

Regulator handling for DPI and SDI is currently handled in the core.c,
using the 'virtual' omapdss platform device. Nowadays we have proper
devices for both DPI and SDI, and so we can handle the regulators inside
the respective drivers.

This patch moves the regulator handling for DPI into dpi.c.
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: NArchit Taneja <archit@ti.com>
上级 349c3d95
......@@ -43,8 +43,6 @@
static struct {
struct platform_device *pdev;
struct regulator *vdds_dsi_reg;
const char *default_display_name;
} core;
......@@ -78,22 +76,6 @@ struct platform_device *dss_get_core_pdev(void)
return core.pdev;
}
/* REGULATORS */
struct regulator *dss_get_vdds_dsi(void)
{
struct regulator *reg;
if (core.vdds_dsi_reg != NULL)
return core.vdds_dsi_reg;
reg = devm_regulator_get(&core.pdev->dev, "vdds_dsi");
if (!IS_ERR(reg))
core.vdds_dsi_reg = reg;
return reg;
}
int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask)
{
struct omap_dss_board_info *board_data = core.pdev->dev.platform_data;
......
......@@ -554,15 +554,11 @@ static int dpi_init_regulator(void)
if (dpi.vdds_dsi_reg)
return 0;
vdds_dsi = dss_get_vdds_dsi();
if (IS_ERR(vdds_dsi)) {
vdds_dsi = devm_regulator_get(&dpi.pdev->dev, "vdds_dsi");
if (IS_ERR(vdds_dsi)) {
DSSERR("can't get VDDS_DSI regulator\n");
return PTR_ERR(vdds_dsi);
}
}
dpi.vdds_dsi_reg = vdds_dsi;
......
......@@ -164,7 +164,6 @@ struct platform_device;
/* core */
struct platform_device *dss_get_core_pdev(void);
struct bus_type *dss_get_bus(void);
struct regulator *dss_get_vdds_dsi(void);
int dss_dsi_enable_pads(int dsi_id, unsigned lane_mask);
void dss_dsi_disable_pads(int dsi_id, unsigned lane_mask);
int dss_set_min_bus_tput(struct device *dev, unsigned long tput);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册