Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310346
b: refs/heads/master
c: 38f3daf
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed May 11, 2012
1 parent 8839095 commit d1e2394
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 81 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11ee9606407031827d43ecde8e62a418ac3b4f83
refs/heads/master: 38f3daf678d909e8ee5638f21a34f35c01343420
7 changes: 6 additions & 1 deletion trunk/drivers/video/omap2/dss/dpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
return 0;
}

static int __init omap_dpi_probe(struct platform_device *pdev)
static void __init dpi_probe_pdata(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
int i, r;
Expand All @@ -387,6 +387,11 @@ static int __init omap_dpi_probe(struct platform_device *pdev)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
}

static int __init omap_dpi_probe(struct platform_device *pdev)
{
dpi_probe_pdata(pdev);

return 0;
}
Expand Down
50 changes: 29 additions & 21 deletions trunk/drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4602,14 +4602,41 @@ static void dsi_put_clocks(struct platform_device *dsidev)
clk_put(dsi->sys_clk);
}

static void __init dsi_probe_pdata(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_board_info *pdata = dsidev->dev.platform_data;
int i, r;

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_DSI)
continue;

if (dssdev->phy.dsi.module != dsi->module_id)
continue;

r = dsi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &dsidev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
}

/* DSI1 HW IP initialisation */
static int __init omap_dsihw_probe(struct platform_device *dsidev)
{
u32 rev;
int r, i;
struct resource *dsi_mem;
struct dsi_data *dsi;
struct omap_dss_board_info *pdata = dsidev->dev.platform_data;

dsi = devm_kzalloc(&dsidev->dev, sizeof(*dsi), GFP_KERNEL);
if (!dsi)
Expand Down Expand Up @@ -4697,26 +4724,7 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev)
else
dsi->num_lanes_supported = 3;

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_DSI)
continue;

if (dssdev->phy.dsi.module != dsi->module_id)
continue;

r = dsi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &dsidev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
dsi_probe_pdata(dsidev);

dsi_runtime_put(dsidev);

Expand Down
45 changes: 26 additions & 19 deletions trunk/drivers/video/omap2/dss/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,35 @@ static void hdmi_put_clocks(void)
clk_put(hdmi.sys_clk);
}

static void __init hdmi_probe_pdata(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
int r, i;

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI)
continue;

r = hdmi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &pdev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
}

/* HDMI HW IP initialisation */
static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
struct resource *hdmi_mem;
int r, i;
int r;

hdmi.pdev = pdev;

Expand Down Expand Up @@ -813,23 +836,7 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)

dss_debugfs_create_file("hdmi", hdmi_dump_regs);

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_HDMI)
continue;

r = hdmi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &pdev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
hdmi_probe_pdata(pdev);

#if defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI) || \
defined(CONFIG_SND_OMAP_SOC_OMAP4_HDMI_MODULE)
Expand Down
45 changes: 26 additions & 19 deletions trunk/drivers/video/omap2/dss/rfbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,14 +927,37 @@ static int __init rfbi_init_display(struct omap_dss_device *dssdev)
return 0;
}

static void __init rfbi_probe_pdata(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
int i, r;

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_DBI)
continue;

r = rfbi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &pdev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
}

/* RFBI HW IP initialisation */
static int __init omap_rfbihw_probe(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
u32 rev;
struct resource *rfbi_mem;
struct clk *clk;
int r, i;
int r;

rfbi.pdev = pdev;

Expand Down Expand Up @@ -979,23 +1002,7 @@ static int __init omap_rfbihw_probe(struct platform_device *pdev)

dss_debugfs_create_file("rfbi", rfbi_dump_regs);

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_DBI)
continue;

r = rfbi_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &pdev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
rfbi_probe_pdata(pdev);

return 0;

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/video/omap2/dss/sdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ static int __init sdi_init_display(struct omap_dss_device *dssdev)
return 0;
}

static int __init omap_sdi_probe(struct platform_device *pdev)
static void __init sdi_probe_pdata(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
int i, r;
Expand All @@ -198,6 +198,11 @@ static int __init omap_sdi_probe(struct platform_device *pdev)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
}

static int __init omap_sdi_probe(struct platform_device *pdev)
{
sdi_probe_pdata(pdev);

return 0;
}
Expand Down
45 changes: 26 additions & 19 deletions trunk/drivers/video/omap2/dss/venc.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,13 +829,36 @@ static void venc_put_clocks(void)
clk_put(venc.tv_dac_clk);
}

static void __init venc_probe_pdata(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
int r, i;

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_VENC)
continue;

r = venc_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &pdev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
}

/* VENC HW IP initialisation */
static int __init omap_venchw_probe(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
u8 rev_id;
struct resource *venc_mem;
int r, i;
int r;

venc.pdev = pdev;

Expand Down Expand Up @@ -877,23 +900,7 @@ static int __init omap_venchw_probe(struct platform_device *pdev)

dss_debugfs_create_file("venc", venc_dump_regs);

for (i = 0; i < pdata->num_devices; ++i) {
struct omap_dss_device *dssdev = pdata->devices[i];

if (dssdev->type != OMAP_DISPLAY_TYPE_VENC)
continue;

r = venc_init_display(dssdev);
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
continue;
}

r = omap_dss_register_device(dssdev, &pdev->dev, i);
if (r)
DSSERR("device %s register failed: %d\n",
dssdev->name, r);
}
venc_probe_pdata(pdev);

return 0;

Expand Down

0 comments on commit d1e2394

Please sign in to comment.