diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-23 16:23:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-23 16:23:30 -0700 |
commit | 1a13e36a79f25f4cf506258637e96a07ac1451f2 (patch) | |
tree | 35b55b9b2d45426584e1816bcad4e0fb4acc9e71 /drivers/video/fbdev/omap2/dss/dpi.c | |
parent | 36a1624d8844b6c165daf61649e6b68c02d0835f (diff) | |
parent | f778dad38a54ca5207d024b5ebe0e6d71b8bad83 (diff) | |
download | linux-1a13e36a79f25f4cf506258637e96a07ac1451f2.tar.gz linux-1a13e36a79f25f4cf506258637e96a07ac1451f2.tar.bz2 linux-1a13e36a79f25f4cf506258637e96a07ac1451f2.zip |
Merge tag 'fbdev-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull fbdev updates from Tomi Valkeinen:
- ssd1307fb: various fixes and improvements, SSD1305 support
- use architecture agnostic functions instead of MTRR functions in
various fbdev drivers
- TI DRA7xx SoC display support (arch/arm/ side)
- OMAPDSS componentization to fix probing order issues
- OMAPDSS scaling fixes
- msm_fb: remove obsoleted driver
* tag 'fbdev-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (77 commits)
msm: msm_fb: Remove dead code
OMAPDSS: HDMI: wait for framedone when stopping video
OMAPDSS: HDMI4: fix error handling
OMAPDSS: DISPC: scaler debug print
OMAPDSS: DISPC: do only y decimation on OMAP3
OMAPDSS: DISPC: check if scaling setup failed
OMAPDSS: DISPC: fix 64 bit issue in 5-tap
OMAPDSS: DISPC: fix row_inc for OMAP3
OMAPDSS: DISPC: add check for scaling limits
OMAPDSS: DISPC: fix check_horiz_timing_omap3 args
OMAPDSS: DISPC: fix predecimation for YUV modes
OMAPDSS: DISPC: work-around for errata i631
OMAPDSS: simplify submodule reg/unreg code
OMAPDSS: componentize omapdss
OMAPDSS: reorder uninit calls
OMAPDSS: remove uses of __init/__exit
OMAPDSS: fix dss_init_ports error handling
OMAPDSS: refactor dss probe function
OMAPDSS: move 'dss_initialized' to dss driver
fbdev: propagate result of fb_videomode_from_videomode()
...
Diffstat (limited to 'drivers/video/fbdev/omap2/dss/dpi.c')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/dpi.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dpi.c b/drivers/video/fbdev/omap2/dss/dpi.c index f83e7b030249..fb45b6432968 100644 --- a/drivers/video/fbdev/omap2/dss/dpi.c +++ b/drivers/video/fbdev/omap2/dss/dpi.c @@ -32,6 +32,7 @@ #include <linux/string.h> #include <linux/of.h> #include <linux/clk.h> +#include <linux/component.h> #include <video/omapdss.h> @@ -731,7 +732,7 @@ static void dpi_init_output(struct platform_device *pdev) omapdss_register_output(out); } -static void __exit dpi_uninit_output(struct platform_device *pdev) +static void dpi_uninit_output(struct platform_device *pdev) { struct dpi_data *dpi = dpi_get_data_from_pdev(pdev); struct omap_dss_device *out = &dpi->output; @@ -775,7 +776,7 @@ static void dpi_init_output_port(struct platform_device *pdev, omapdss_register_output(out); } -static void __exit dpi_uninit_output_port(struct device_node *port) +static void dpi_uninit_output_port(struct device_node *port) { struct dpi_data *dpi = port->data; struct omap_dss_device *out = &dpi->output; @@ -783,8 +784,9 @@ static void __exit dpi_uninit_output_port(struct device_node *port) omapdss_unregister_output(out); } -static int omap_dpi_probe(struct platform_device *pdev) +static int dpi_bind(struct device *dev, struct device *master, void *data) { + struct platform_device *pdev = to_platform_device(dev); struct dpi_data *dpi; dpi = devm_kzalloc(&pdev->dev, sizeof(*dpi), GFP_KERNEL); @@ -802,16 +804,32 @@ static int omap_dpi_probe(struct platform_device *pdev) return 0; } -static int __exit omap_dpi_remove(struct platform_device *pdev) +static void dpi_unbind(struct device *dev, struct device *master, void *data) { + struct platform_device *pdev = to_platform_device(dev); + dpi_uninit_output(pdev); +} + +static const struct component_ops dpi_component_ops = { + .bind = dpi_bind, + .unbind = dpi_unbind, +}; +static int dpi_probe(struct platform_device *pdev) +{ + return component_add(&pdev->dev, &dpi_component_ops); +} + +static int dpi_remove(struct platform_device *pdev) +{ + component_del(&pdev->dev, &dpi_component_ops); return 0; } static struct platform_driver omap_dpi_driver = { - .probe = omap_dpi_probe, - .remove = __exit_p(omap_dpi_remove), + .probe = dpi_probe, + .remove = dpi_remove, .driver = { .name = "omapdss_dpi", .suppress_bind_attrs = true, @@ -823,12 +841,12 @@ int __init dpi_init_platform_driver(void) return platform_driver_register(&omap_dpi_driver); } -void __exit dpi_uninit_platform_driver(void) +void dpi_uninit_platform_driver(void) { platform_driver_unregister(&omap_dpi_driver); } -int __init dpi_init_port(struct platform_device *pdev, struct device_node *port) +int dpi_init_port(struct platform_device *pdev, struct device_node *port) { struct dpi_data *dpi; struct device_node *ep; @@ -870,7 +888,7 @@ err_datalines: return r; } -void __exit dpi_uninit_port(struct device_node *port) +void dpi_uninit_port(struct device_node *port) { struct dpi_data *dpi = port->data; |