mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
video: tegra: add init/suspend/resume hooks to outputs
Allows board specific code to handle panel init. Signed-off-by: Erik Gilling <konkers@android.com>
This commit is contained in:
committed by
Colin Cross
parent
56fc16b7e0
commit
fc6fca2f38
@@ -62,6 +62,10 @@ struct tegra_dc_out {
|
||||
|
||||
struct tegra_dc_mode *modes;
|
||||
int n_modes;
|
||||
|
||||
int (*init)(void);
|
||||
int (*suspend)(pm_message_t state);
|
||||
int (*resume)(void);
|
||||
};
|
||||
|
||||
#define TEGRA_DC_ALIGN_MSB 0
|
||||
|
||||
@@ -747,6 +747,8 @@ static int tegra_dc_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
tegra_dc_init(dc);
|
||||
if (dc->out && dc->out->init)
|
||||
dc->out->init();
|
||||
|
||||
tegra_dc_set_blending(dc, tegra_dc_blend_modes[0]);
|
||||
|
||||
@@ -812,6 +814,9 @@ static int tegra_dc_suspend(struct platform_device *pdev, pm_message_t state)
|
||||
|
||||
dev_info(&pdev->dev, "suspend\n");
|
||||
|
||||
if (dc->out && dc->out->suspend)
|
||||
dc->out->suspend(state);
|
||||
|
||||
disable_irq(dc->irq);
|
||||
tegra_periph_reset_assert(dc->clk);
|
||||
clk_disable(dc->clk);
|
||||
@@ -835,6 +840,8 @@ static int tegra_dc_resume(struct platform_device *pdev)
|
||||
wins[i] = &dc->windows[i];
|
||||
|
||||
tegra_dc_init(dc);
|
||||
if (dc->out && dc->out->resume)
|
||||
dc->out->resume();
|
||||
|
||||
tegra_dc_set_blending(dc, tegra_dc_blend_modes[0]);
|
||||
tegra_dc_update_windows(wins, dc->n_windows);
|
||||
|
||||
Reference in New Issue
Block a user