OMAPDSS fixes for 3.10:

* Compilation fix when DSI is disabled in Kconfig
 * Basic deferred probe support to fix DT boot
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRglxIAAoJEPo9qoy8lh71PnAP+QHbkk1w857vFqNyYTAfzIXa
 fJB/RfUAdOl4Uq8okmogzDirq7X2a3zZSgVcqZyYzHB2wD8D1S+PHTbeKr3sNWmK
 6Q63icgCPxnPqkKOY8oUzkg4Mj6uWOzKXVUJFCyg1EiPupb0WqvVtIpNhPgNXBVE
 bD7RgT9bpx3z+MDaeDNeHFqT1XCBEr3+RqPAocAXpdlTe4+ykYOJPldBzU5cCSSO
 rj0HjuWBKW0z830HeCzTQjgtcSKCgH78WyfR5nskSjhEr2XL74jAafICoX4NKdhk
 DODeJ+kmE7yVtAQG+k1n9T2wRDOKeBVuBqL3Oqrrti3E4v9puNmTZ1IZcIlb953C
 nOBwt4YCWwjnbpXZe1nCLndroav/66r412jHNNI4Papuv4Mw59CYd2BqDDnAtY8F
 lrr8DaSs1B7eoCaBywbylRDViAbn6lrkxMMuLOCUdvUMPLlToFGWIRrI0XTftTF0
 JjZjudwMZ8Tou44tpYcSY9uA2JPsw+vUv5sBnUELmxk50gm0u/LzmqcgLgcW3ZvT
 rwUFVVns2RFcvgRuXlNNZXMTDp2NegOGdDN8mQxdXoIgc7sDSWuje3r6t/b7IyML
 p8SxvkBNknsOa5VO2L2EkUz7ElJyLaRcbxEtKKUyk/Zl6qW4+lsYTqCcciw7pYRD
 r+6an+10q6P4dENiELC/
 =KqHQ
 -----END PGP SIGNATURE-----

Merge tag 'omapdss-for-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux into drm-next

OMAPDSS fixes for 3.10:

* Compilation fix when DSI is disabled in Kconfig
* Basic deferred probe support to fix DT boot

* tag 'omapdss-for-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux:
  OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found
  OMAPDSS: VENC: Add error handling for venc_probe_pdata
  OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata
  OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata
  OMAPDSS: DSI: Add error handling for dsi_probe_pdata
  OMAPDSS: SDI: Add error handling for sdi_probe_pdata
  OMAPDSS: DPI: Add error handling for dpi_probe_pdata
  OMAPDSS: VENC: use platform_driver_register()
  OMAPDSS: HDMI: use platform_driver_register()
  OMAPDSS: RFBI: use platform_driver_register()
  OMAPDSS: DSI: use platform_driver_register()
  OMAPDSS: SDI: use platform_driver_register()
  OMAPDSS: DPI: use platform_driver_register()
  OMAPFB: defer probe if no displays
  OMAPFB: use module_platform_driver()
  OMAPDSS: Makefile: move omapfb after panels
  OMAPDSS: DPI: fix compilation if DSI not compiled in
This commit is contained in:
Dave Airlie 2013-05-03 10:10:23 +10:00
commit 7e17fc0b69
10 changed files with 160 additions and 106 deletions

View File

@ -1,5 +1,5 @@
obj-$(CONFIG_OMAP2_VRFB) += vrfb.o
obj-$(CONFIG_OMAP2_DSS) += dss/
obj-$(CONFIG_FB_OMAP2) += omapfb/
obj-y += displays/
obj-$(CONFIG_FB_OMAP2) += omapfb/

View File

@ -135,7 +135,7 @@ static int tfp410_probe(struct omap_dss_device *dssdev)
if (!adapter) {
dev_err(&dssdev->dev, "Failed to get I2C adapter, bus %d\n",
i2c_bus_num);
return -EINVAL;
return -EPROBE_DEFER;
}
ddata->i2c_adapter = adapter;

View File

@ -520,7 +520,7 @@ void omapdss_dpi_set_data_lines(struct omap_dss_device *dssdev, int data_lines)
}
EXPORT_SYMBOL(omapdss_dpi_set_data_lines);
static int __init dpi_verify_dsi_pll(struct platform_device *dsidev)
static int dpi_verify_dsi_pll(struct platform_device *dsidev)
{
int r;
@ -572,7 +572,7 @@ static enum omap_channel dpi_get_channel(void)
}
}
static int __init dpi_init_display(struct omap_dss_device *dssdev)
static int dpi_init_display(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev;
@ -607,7 +607,7 @@ static int __init dpi_init_display(struct omap_dss_device *dssdev)
return 0;
}
static struct omap_dss_device * __init dpi_find_dssdev(struct platform_device *pdev)
static struct omap_dss_device *dpi_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
@ -635,7 +635,7 @@ static struct omap_dss_device * __init dpi_find_dssdev(struct platform_device *p
return def_dssdev;
}
static void __init dpi_probe_pdata(struct platform_device *dpidev)
static int dpi_probe_pdata(struct platform_device *dpidev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
@ -644,11 +644,11 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev)
plat_dssdev = dpi_find_dssdev(dpidev);
if (!plat_dssdev)
return;
return 0;
dssdev = dss_alloc_and_init_device(&dpidev->dev);
if (!dssdev)
return;
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
@ -656,7 +656,7 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev)
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}
r = omapdss_output_set_device(&dpi.output, dssdev);
@ -664,7 +664,7 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev)
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}
r = dss_add_device(dssdev);
@ -672,11 +672,13 @@ static void __init dpi_probe_pdata(struct platform_device *dpidev)
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&dpi.output);
dss_put_device(dssdev);
return;
return r;
}
return 0;
}
static void __init dpi_init_output(struct platform_device *pdev)
static void dpi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &dpi.output;
@ -696,13 +698,19 @@ static void __exit dpi_uninit_output(struct platform_device *pdev)
dss_unregister_output(out);
}
static int __init omap_dpi_probe(struct platform_device *pdev)
static int omap_dpi_probe(struct platform_device *pdev)
{
int r;
mutex_init(&dpi.lock);
dpi_init_output(pdev);
dpi_probe_pdata(pdev);
r = dpi_probe_pdata(pdev);
if (r) {
dpi_uninit_output(pdev);
return r;
}
return 0;
}
@ -717,6 +725,7 @@ static int __exit omap_dpi_remove(struct platform_device *pdev)
}
static struct platform_driver omap_dpi_driver = {
.probe = omap_dpi_probe,
.remove = __exit_p(omap_dpi_remove),
.driver = {
.name = "omapdss_dpi",
@ -726,7 +735,7 @@ static struct platform_driver omap_dpi_driver = {
int __init dpi_init_platform_driver(void)
{
return platform_driver_probe(&omap_dpi_driver, omap_dpi_probe);
return platform_driver_register(&omap_dpi_driver);
}
void __exit dpi_uninit_platform_driver(void)

View File

@ -5225,7 +5225,7 @@ static enum omap_channel dsi_get_channel(int module_id)
}
}
static int __init dsi_init_display(struct omap_dss_device *dssdev)
static int dsi_init_display(struct omap_dss_device *dssdev)
{
struct platform_device *dsidev =
dsi_get_dsidev_from_id(dssdev->phy.dsi.module);
@ -5366,7 +5366,7 @@ static int dsi_get_clocks(struct platform_device *dsidev)
return 0;
}
static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *pdev)
static struct omap_dss_device *dsi_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
struct dsi_data *dsi = dsi_get_dsidrv_data(pdev);
@ -5398,7 +5398,7 @@ static struct omap_dss_device * __init dsi_find_dssdev(struct platform_device *p
return def_dssdev;
}
static void __init dsi_probe_pdata(struct platform_device *dsidev)
static int dsi_probe_pdata(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_device *plat_dssdev;
@ -5408,11 +5408,11 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev)
plat_dssdev = dsi_find_dssdev(dsidev);
if (!plat_dssdev)
return;
return 0;
dssdev = dss_alloc_and_init_device(&dsidev->dev);
if (!dssdev)
return;
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
@ -5420,7 +5420,7 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev)
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}
r = omapdss_output_set_device(&dsi->output, dssdev);
@ -5428,7 +5428,7 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev)
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}
r = dss_add_device(dssdev);
@ -5436,11 +5436,13 @@ static void __init dsi_probe_pdata(struct platform_device *dsidev)
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&dsi->output);
dss_put_device(dssdev);
return;
return r;
}
return 0;
}
static void __init dsi_init_output(struct platform_device *dsidev)
static void dsi_init_output(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_output *out = &dsi->output;
@ -5456,7 +5458,7 @@ static void __init dsi_init_output(struct platform_device *dsidev)
dss_register_output(out);
}
static void __exit dsi_uninit_output(struct platform_device *dsidev)
static void dsi_uninit_output(struct platform_device *dsidev)
{
struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
struct omap_dss_output *out = &dsi->output;
@ -5465,7 +5467,7 @@ static void __exit dsi_uninit_output(struct platform_device *dsidev)
}
/* DSI1 HW IP initialisation */
static int __init omap_dsihw_probe(struct platform_device *dsidev)
static int omap_dsihw_probe(struct platform_device *dsidev)
{
u32 rev;
int r, i;
@ -5561,7 +5563,13 @@ static int __init omap_dsihw_probe(struct platform_device *dsidev)
dsi_init_output(dsidev);
dsi_probe_pdata(dsidev);
r = dsi_probe_pdata(dsidev);
if (r) {
dsi_runtime_put(dsidev);
dsi_uninit_output(dsidev);
pm_runtime_disable(&dsidev->dev);
return r;
}
dsi_runtime_put(dsidev);
@ -5632,6 +5640,7 @@ static const struct dev_pm_ops dsi_pm_ops = {
};
static struct platform_driver omap_dsihw_driver = {
.probe = omap_dsihw_probe,
.remove = __exit_p(omap_dsihw_remove),
.driver = {
.name = "omapdss_dsi",
@ -5642,7 +5651,7 @@ static struct platform_driver omap_dsihw_driver = {
int __init dsi_init_platform_driver(void)
{
return platform_driver_probe(&omap_dsihw_driver, omap_dsihw_probe);
return platform_driver_register(&omap_dsihw_driver);
}
void __exit dsi_uninit_platform_driver(void)

View File

@ -277,6 +277,12 @@ int sdi_init_platform_driver(void) __init;
void sdi_uninit_platform_driver(void) __exit;
/* DSI */
typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
unsigned long pll, void *data);
typedef bool (*dsi_hsdiv_calc_func)(int regm_dispc, unsigned long dispc,
void *data);
#ifdef CONFIG_OMAP2_DSS_DSI
struct dentry;
@ -295,10 +301,6 @@ u8 dsi_get_pixel_size(enum omap_dss_dsi_pixel_format fmt);
unsigned long dsi_get_pll_clkin(struct platform_device *dsidev);
typedef bool (*dsi_pll_calc_func)(int regn, int regm, unsigned long fint,
unsigned long pll, void *data);
typedef bool (*dsi_hsdiv_calc_func)(int regm_dispc, unsigned long dispc,
void *data);
bool dsi_hsdiv_calc(struct platform_device *dsidev, unsigned long pll,
unsigned long out_min, dsi_hsdiv_calc_func func, void *data);
bool dsi_pll_calc(struct platform_device *dsidev, unsigned long clkin,
@ -358,6 +360,27 @@ static inline struct platform_device *dsi_get_dsidev_from_id(int module)
{
return NULL;
}
static inline unsigned long dsi_get_pll_clkin(struct platform_device *dsidev)
{
return 0;
}
static inline bool dsi_hsdiv_calc(struct platform_device *dsidev,
unsigned long pll, unsigned long out_min,
dsi_hsdiv_calc_func func, void *data)
{
return false;
}
static inline bool dsi_pll_calc(struct platform_device *dsidev,
unsigned long clkin,
unsigned long pll_min, unsigned long pll_max,
dsi_pll_calc_func func, void *data)
{
return false;
}
#endif
/* DPI */

View File

@ -328,7 +328,7 @@ static void hdmi_runtime_put(void)
WARN_ON(r < 0 && r != -ENOSYS);
}
static int __init hdmi_init_display(struct omap_dss_device *dssdev)
static int hdmi_init_display(struct omap_dss_device *dssdev)
{
int r;
@ -954,7 +954,7 @@ int hdmi_audio_config(struct omap_dss_audio *audio)
#endif
static struct omap_dss_device * __init hdmi_find_dssdev(struct platform_device *pdev)
static struct omap_dss_device *hdmi_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
@ -982,7 +982,7 @@ static struct omap_dss_device * __init hdmi_find_dssdev(struct platform_device *
return def_dssdev;
}
static void __init hdmi_probe_pdata(struct platform_device *pdev)
static int hdmi_probe_pdata(struct platform_device *pdev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
@ -992,11 +992,11 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
plat_dssdev = hdmi_find_dssdev(pdev);
if (!plat_dssdev)
return;
return 0;
dssdev = dss_alloc_and_init_device(&pdev->dev);
if (!dssdev)
return;
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
@ -1010,7 +1010,7 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}
r = omapdss_output_set_device(&hdmi.output, dssdev);
@ -1018,7 +1018,7 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}
r = dss_add_device(dssdev);
@ -1027,11 +1027,13 @@ static void __init hdmi_probe_pdata(struct platform_device *pdev)
omapdss_output_unset_device(&hdmi.output);
hdmi_uninit_display(dssdev);
dss_put_device(dssdev);
return;
return r;
}
return 0;
}
static void __init hdmi_init_output(struct platform_device *pdev)
static void hdmi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &hdmi.output;
@ -1052,7 +1054,7 @@ static void __exit hdmi_uninit_output(struct platform_device *pdev)
}
/* HDMI HW IP initialisation */
static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
static int omapdss_hdmihw_probe(struct platform_device *pdev)
{
struct resource *res;
int r;
@ -1096,7 +1098,13 @@ static int __init omapdss_hdmihw_probe(struct platform_device *pdev)
dss_debugfs_create_file("hdmi", hdmi_dump_regs);
hdmi_probe_pdata(pdev);
r = hdmi_probe_pdata(pdev);
if (r) {
hdmi_panel_exit();
hdmi_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
return r;
}
return 0;
}
@ -1151,6 +1159,7 @@ static const struct dev_pm_ops hdmi_pm_ops = {
};
static struct platform_driver omapdss_hdmihw_driver = {
.probe = omapdss_hdmihw_probe,
.remove = __exit_p(omapdss_hdmihw_remove),
.driver = {
.name = "omapdss_hdmi",
@ -1161,7 +1170,7 @@ static struct platform_driver omapdss_hdmihw_driver = {
int __init hdmi_init_platform_driver(void)
{
return platform_driver_probe(&omapdss_hdmihw_driver, omapdss_hdmihw_probe);
return platform_driver_register(&omapdss_hdmihw_driver);
}
void __exit hdmi_uninit_platform_driver(void)

View File

@ -943,13 +943,13 @@ void omapdss_rfbi_display_disable(struct omap_dss_device *dssdev)
}
EXPORT_SYMBOL(omapdss_rfbi_display_disable);
static int __init rfbi_init_display(struct omap_dss_device *dssdev)
static int rfbi_init_display(struct omap_dss_device *dssdev)
{
rfbi.dssdev[dssdev->phy.rfbi.channel] = dssdev;
return 0;
}
static struct omap_dss_device * __init rfbi_find_dssdev(struct platform_device *pdev)
static struct omap_dss_device *rfbi_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
@ -977,7 +977,7 @@ static struct omap_dss_device * __init rfbi_find_dssdev(struct platform_device *
return def_dssdev;
}
static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
static int rfbi_probe_pdata(struct platform_device *rfbidev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
@ -986,11 +986,11 @@ static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
plat_dssdev = rfbi_find_dssdev(rfbidev);
if (!plat_dssdev)
return;
return 0;
dssdev = dss_alloc_and_init_device(&rfbidev->dev);
if (!dssdev)
return;
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
@ -998,7 +998,7 @@ static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}
r = omapdss_output_set_device(&rfbi.output, dssdev);
@ -1006,7 +1006,7 @@ static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}
r = dss_add_device(dssdev);
@ -1014,11 +1014,13 @@ static void __init rfbi_probe_pdata(struct platform_device *rfbidev)
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&rfbi.output);
dss_put_device(dssdev);
return;
return r;
}
return 0;
}
static void __init rfbi_init_output(struct platform_device *pdev)
static void rfbi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &rfbi.output;
@ -1039,7 +1041,7 @@ static void __exit rfbi_uninit_output(struct platform_device *pdev)
}
/* RFBI HW IP initialisation */
static int __init omap_rfbihw_probe(struct platform_device *pdev)
static int omap_rfbihw_probe(struct platform_device *pdev)
{
u32 rev;
struct resource *rfbi_mem;
@ -1091,7 +1093,12 @@ static int __init omap_rfbihw_probe(struct platform_device *pdev)
rfbi_init_output(pdev);
rfbi_probe_pdata(pdev);
r = rfbi_probe_pdata(pdev);
if (r) {
rfbi_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
return r;
}
return 0;
@ -1135,6 +1142,7 @@ static const struct dev_pm_ops rfbi_pm_ops = {
};
static struct platform_driver omap_rfbihw_driver = {
.probe = omap_rfbihw_probe,
.remove = __exit_p(omap_rfbihw_remove),
.driver = {
.name = "omapdss_rfbi",
@ -1145,7 +1153,7 @@ static struct platform_driver omap_rfbihw_driver = {
int __init rfbi_init_platform_driver(void)
{
return platform_driver_probe(&omap_rfbihw_driver, omap_rfbihw_probe);
return platform_driver_register(&omap_rfbihw_driver);
}
void __exit rfbi_uninit_platform_driver(void)

View File

@ -248,7 +248,7 @@ void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs)
}
EXPORT_SYMBOL(omapdss_sdi_set_datapairs);
static int __init sdi_init_display(struct omap_dss_device *dssdev)
static int sdi_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("SDI init\n");
@ -268,7 +268,7 @@ static int __init sdi_init_display(struct omap_dss_device *dssdev)
return 0;
}
static struct omap_dss_device * __init sdi_find_dssdev(struct platform_device *pdev)
static struct omap_dss_device *sdi_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
@ -296,7 +296,7 @@ static struct omap_dss_device * __init sdi_find_dssdev(struct platform_device *p
return def_dssdev;
}
static void __init sdi_probe_pdata(struct platform_device *sdidev)
static int sdi_probe_pdata(struct platform_device *sdidev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
@ -305,11 +305,11 @@ static void __init sdi_probe_pdata(struct platform_device *sdidev)
plat_dssdev = sdi_find_dssdev(sdidev);
if (!plat_dssdev)
return;
return 0;
dssdev = dss_alloc_and_init_device(&sdidev->dev);
if (!dssdev)
return;
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
@ -317,7 +317,7 @@ static void __init sdi_probe_pdata(struct platform_device *sdidev)
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}
r = omapdss_output_set_device(&sdi.output, dssdev);
@ -325,7 +325,7 @@ static void __init sdi_probe_pdata(struct platform_device *sdidev)
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}
r = dss_add_device(dssdev);
@ -333,11 +333,13 @@ static void __init sdi_probe_pdata(struct platform_device *sdidev)
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&sdi.output);
dss_put_device(dssdev);
return;
return r;
}
return 0;
}
static void __init sdi_init_output(struct platform_device *pdev)
static void sdi_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &sdi.output;
@ -357,11 +359,17 @@ static void __exit sdi_uninit_output(struct platform_device *pdev)
dss_unregister_output(out);
}
static int __init omap_sdi_probe(struct platform_device *pdev)
static int omap_sdi_probe(struct platform_device *pdev)
{
int r;
sdi_init_output(pdev);
sdi_probe_pdata(pdev);
r = sdi_probe_pdata(pdev);
if (r) {
sdi_uninit_output(pdev);
return r;
}
return 0;
}
@ -376,6 +384,7 @@ static int __exit omap_sdi_remove(struct platform_device *pdev)
}
static struct platform_driver omap_sdi_driver = {
.probe = omap_sdi_probe,
.remove = __exit_p(omap_sdi_remove),
.driver = {
.name = "omapdss_sdi",
@ -385,7 +394,7 @@ static struct platform_driver omap_sdi_driver = {
int __init sdi_init_platform_driver(void)
{
return platform_driver_probe(&omap_sdi_driver, omap_sdi_probe);
return platform_driver_register(&omap_sdi_driver);
}
void __exit sdi_uninit_platform_driver(void)

View File

@ -633,7 +633,7 @@ void omapdss_venc_invert_vid_out_polarity(struct omap_dss_device *dssdev,
mutex_unlock(&venc.venc_lock);
}
static int __init venc_init_display(struct omap_dss_device *dssdev)
static int venc_init_display(struct omap_dss_device *dssdev)
{
DSSDBG("init_display\n");
@ -726,7 +726,7 @@ static int venc_get_clocks(struct platform_device *pdev)
return 0;
}
static struct omap_dss_device * __init venc_find_dssdev(struct platform_device *pdev)
static struct omap_dss_device *venc_find_dssdev(struct platform_device *pdev)
{
struct omap_dss_board_info *pdata = pdev->dev.platform_data;
const char *def_disp_name = omapdss_get_default_display_name();
@ -754,7 +754,7 @@ static struct omap_dss_device * __init venc_find_dssdev(struct platform_device *
return def_dssdev;
}
static void __init venc_probe_pdata(struct platform_device *vencdev)
static int venc_probe_pdata(struct platform_device *vencdev)
{
struct omap_dss_device *plat_dssdev;
struct omap_dss_device *dssdev;
@ -763,11 +763,11 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
plat_dssdev = venc_find_dssdev(vencdev);
if (!plat_dssdev)
return;
return 0;
dssdev = dss_alloc_and_init_device(&vencdev->dev);
if (!dssdev)
return;
return -ENOMEM;
dss_copy_device_pdata(dssdev, plat_dssdev);
@ -775,7 +775,7 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev);
return;
return r;
}
r = omapdss_output_set_device(&venc.output, dssdev);
@ -783,7 +783,7 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
DSSERR("failed to connect output to new device: %s\n",
dssdev->name);
dss_put_device(dssdev);
return;
return r;
}
r = dss_add_device(dssdev);
@ -791,11 +791,13 @@ static void __init venc_probe_pdata(struct platform_device *vencdev)
DSSERR("device %s register failed: %d\n", dssdev->name, r);
omapdss_output_unset_device(&venc.output);
dss_put_device(dssdev);
return;
return r;
}
return 0;
}
static void __init venc_init_output(struct platform_device *pdev)
static void venc_init_output(struct platform_device *pdev)
{
struct omap_dss_output *out = &venc.output;
@ -816,7 +818,7 @@ static void __exit venc_uninit_output(struct platform_device *pdev)
}
/* VENC HW IP initialisation */
static int __init omap_venchw_probe(struct platform_device *pdev)
static int omap_venchw_probe(struct platform_device *pdev)
{
u8 rev_id;
struct resource *venc_mem;
@ -864,7 +866,13 @@ static int __init omap_venchw_probe(struct platform_device *pdev)
venc_init_output(pdev);
venc_probe_pdata(pdev);
r = venc_probe_pdata(pdev);
if (r) {
venc_panel_exit();
venc_uninit_output(pdev);
pm_runtime_disable(&pdev->dev);
return r;
}
return 0;
@ -922,6 +930,7 @@ static const struct dev_pm_ops venc_pm_ops = {
};
static struct platform_driver omap_venchw_driver = {
.probe = omap_venchw_probe,
.remove = __exit_p(omap_venchw_remove),
.driver = {
.name = "omapdss_venc",
@ -932,7 +941,7 @@ static struct platform_driver omap_venchw_driver = {
int __init venc_init_platform_driver(void)
{
return platform_driver_probe(&omap_venchw_driver, omap_venchw_probe);
return platform_driver_register(&omap_venchw_driver);
}
void __exit venc_uninit_platform_driver(void)

View File

@ -2422,7 +2422,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
return 0;
}
static int __init omapfb_probe(struct platform_device *pdev)
static int omapfb_probe(struct platform_device *pdev)
{
struct omapfb2_device *fbdev = NULL;
int r = 0;
@ -2484,7 +2484,7 @@ static int __init omapfb_probe(struct platform_device *pdev)
if (fbdev->num_displays == 0) {
dev_err(&pdev->dev, "no displays\n");
r = -EINVAL;
r = -EPROBE_DEFER;
goto cleanup;
}
@ -2595,6 +2595,7 @@ static int __exit omapfb_remove(struct platform_device *pdev)
}
static struct platform_driver omapfb_driver = {
.probe = omapfb_probe,
.remove = __exit_p(omapfb_remove),
.driver = {
.name = "omapfb",
@ -2602,36 +2603,13 @@ static struct platform_driver omapfb_driver = {
},
};
static int __init omapfb_init(void)
{
DBG("omapfb_init\n");
if (platform_driver_probe(&omapfb_driver, omapfb_probe)) {
printk(KERN_ERR "failed to register omapfb driver\n");
return -ENODEV;
}
return 0;
}
static void __exit omapfb_exit(void)
{
DBG("omapfb_exit\n");
platform_driver_unregister(&omapfb_driver);
}
module_param_named(mode, def_mode, charp, 0);
module_param_named(vram, def_vram, charp, 0);
module_param_named(rotate, def_rotate, int, 0);
module_param_named(vrfb, def_vrfb, bool, 0);
module_param_named(mirror, def_mirror, bool, 0);
/* late_initcall to let panel/ctrl drivers loaded first.
* I guess better option would be a more dynamic approach,
* so that omapfb reacts to new panels when they are loaded */
late_initcall(omapfb_init);
/*module_init(omapfb_init);*/
module_exit(omapfb_exit);
module_platform_driver(omapfb_driver);
MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
MODULE_DESCRIPTION("OMAP2/3 Framebuffer");