1 /* Copyright (c) 2008-2009, Code Aurora Forum. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 static int lcdc_panel_on(struct platform_device
*pdev
)
25 static int lcdc_panel_off(struct platform_device
*pdev
)
30 static int __init
lcdc_panel_probe(struct platform_device
*pdev
)
32 msm_fb_add_device(pdev
);
37 static struct platform_driver this_driver
= {
38 .probe
= lcdc_panel_probe
,
44 static struct msm_fb_panel_data lcdc_panel_data
= {
46 .off
= lcdc_panel_off
,
49 static int lcdc_dev_id
;
51 int lcdc_device_register(struct msm_panel_info
*pinfo
)
53 struct platform_device
*pdev
= NULL
;
56 pdev
= platform_device_alloc("lcdc_panel", ++lcdc_dev_id
);
60 lcdc_panel_data
.panel_info
= *pinfo
;
61 ret
= platform_device_add_data(pdev
, &lcdc_panel_data
,
62 sizeof(lcdc_panel_data
));
65 "%s: platform_device_add_data failed!\n", __func__
);
69 ret
= platform_device_add(pdev
);
72 "%s: platform_device_register failed!\n", __func__
);
79 platform_device_put(pdev
);
83 static int __init
lcdc_panel_init(void)
85 return platform_driver_register(&this_driver
);
88 module_init(lcdc_panel_init
);