From e322261dc1f2d2f05f05040df2fb07410f7c234d Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Sun, 30 Dec 2012 19:11:08 +0530 Subject: [PATCH 11/51] video: da8xx-fb: minimal dt support Driver is provided a means to have the probe triggered by DT. Signed-off-by: Afzal Mohammed --- Documentation/devicetree/bindings/video/fb-da8xx.txt | 16 ++++++++++++++++ drivers/video/da8xx-fb.c | 7 +++++++ 2 files changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/video/fb-da8xx.txt Index: linux-3.12.36-rt50-r4s2/Documentation/devicetree/bindings/video/fb-da8xx.txt =================================================================== --- /dev/null +++ linux-3.12.36-rt50-r4s2/Documentation/devicetree/bindings/video/fb-da8xx.txt @@ -0,0 +1,16 @@ +TI LCD Controller on DA830/DA850/AM335x SoC's + +Required properties: +- compatible: + DA830 - "ti,da830-lcdc" + AM335x SoC's - "ti,am3352-lcdc", "ti,da830-lcdc" +- reg: Address range of lcdc register set +- interrupts: lcdc interrupt + +Example: + +lcdc@4830e000 { + compatible = "ti,am3352-lcdc", "ti,da830-lcdc"; + reg = <0x4830e000 0x1000>; + interrupts = <36>; +}; Index: linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c =================================================================== --- linux-3.12.36-rt50-r4s2.orig/drivers/video/da8xx-fb.c +++ linux-3.12.36-rt50-r4s2/drivers/video/da8xx-fb.c @@ -1657,6 +1657,12 @@ static int fb_resume(struct platform_dev #define fb_resume NULL #endif +static const struct of_device_id da8xx_fb_of_match[] = { + {.compatible = "ti,da830-lcdc", }, + {}, +}; +MODULE_DEVICE_TABLE(of, da8xx_fb_of_match); + static struct platform_driver da8xx_fb_driver = { .probe = fb_probe, .remove = fb_remove, @@ -1665,6 +1671,7 @@ static struct platform_driver da8xx_fb_d .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, + .of_match_table = of_match_ptr(da8xx_fb_of_match), }, };