1 /* drivers/video/msm_fb/mddi_client_dummy.c
3 * Support for "dummy" mddi client devices which require no
4 * special initialization code.
6 * Copyright (C) 2007 Google Incorporated
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
18 #include <linux/device.h>
19 #include <linux/slab.h>
20 #include <linux/module.h>
21 #include <linux/kernel.h>
22 #include <linux/platform_device.h>
24 #include <linux/platform_data/video-msm_fb.h>
27 struct platform_device pdev
;
28 struct msm_panel_data panel_data
;
31 static int mddi_dummy_suspend(struct msm_panel_data
*panel_data
)
36 static int mddi_dummy_resume(struct msm_panel_data
*panel_data
)
41 static int mddi_dummy_blank(struct msm_panel_data
*panel_data
)
46 static int mddi_dummy_unblank(struct msm_panel_data
*panel_data
)
51 static int mddi_dummy_probe(struct platform_device
*pdev
)
53 struct msm_mddi_client_data
*client_data
= pdev
->dev
.platform_data
;
54 struct panel_info
*panel
=
55 devm_kzalloc(&pdev
->dev
, sizeof(struct panel_info
), GFP_KERNEL
);
58 platform_set_drvdata(pdev
, panel
);
59 panel
->panel_data
.suspend
= mddi_dummy_suspend
;
60 panel
->panel_data
.resume
= mddi_dummy_resume
;
61 panel
->panel_data
.blank
= mddi_dummy_blank
;
62 panel
->panel_data
.unblank
= mddi_dummy_unblank
;
63 panel
->panel_data
.caps
= MSMFB_CAP_PARTIAL_UPDATES
;
64 panel
->pdev
.name
= "msm_panel";
65 panel
->pdev
.id
= pdev
->id
;
66 platform_device_add_resources(&panel
->pdev
,
67 client_data
->fb_resource
, 1);
68 panel
->panel_data
.fb_data
= client_data
->private_client_data
;
69 panel
->pdev
.dev
.platform_data
= &panel
->panel_data
;
70 return platform_device_register(&panel
->pdev
);
73 static struct platform_driver mddi_client_dummy
= {
74 .probe
= mddi_dummy_probe
,
75 .driver
= { .name
= "mddi_c_dummy" },
78 static int __init
mddi_client_dummy_init(void)
80 platform_driver_register(&mddi_client_dummy
);
84 module_init(mddi_client_dummy_init
);