14 #include <linux/module.h>
20 #include <linux/slab.h>
35 return lcd_get_data(lcd);
53 plcd->
pdata->set_power(plcd->
pdata, lcd_power);
67 return plcd->
us->parent == info->
device;
70 static struct lcd_ops platform_lcd_ops = {
71 .get_power = platform_lcd_get_power,
72 .set_power = platform_lcd_set_power,
73 .check_fb = platform_lcd_match,
83 pdata = pdev->
dev.platform_data;
85 dev_err(dev,
"no platform data supplied\n");
92 dev_err(dev,
"no memory for state\n");
99 plcd, &platform_lcd_ops);
100 if (IS_ERR(plcd->
lcd)) {
101 dev_err(dev,
"cannot register lcd device\n");
102 err = PTR_ERR(plcd->
lcd);
106 platform_set_drvdata(pdev, plcd);
125 static int platform_lcd_suspend(
struct device *dev)
130 platform_lcd_set_power(plcd->
lcd, plcd->
power);
135 static int platform_lcd_resume(
struct device *dev)
140 platform_lcd_set_power(plcd->
lcd, plcd->
power);
146 platform_lcd_resume);
150 static const struct of_device_id platform_lcd_of_match[] = {
159 .name =
"platform-lcd",
162 .pm = &platform_lcd_pm_ops,
166 .probe = platform_lcd_probe,