12 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
14 #include <linux/device.h>
16 #include <linux/kernel.h>
18 #include <linux/module.h>
23 #include <mach/hardware.h>
27 #define LCD_MAX_CONTRAST 0xff
28 #define LCD_DEF_CONTRAST 0x80
49 pr_err(
"get contrast failed\n");
70 pr_err(
"set contrast failed\n");
81 static int jornada_lcd_set_power(
struct lcd_device *dev,
int power)
92 static struct lcd_ops jornada_lcd_props = {
93 .get_contrast = jornada_lcd_get_contrast,
94 .set_contrast = jornada_lcd_set_contrast,
95 .get_power = jornada_lcd_get_power,
96 .set_power = jornada_lcd_set_power,
106 if (IS_ERR(lcd_device)) {
107 ret = PTR_ERR(lcd_device);
108 pr_err(
"failed to register device\n");
112 platform_set_drvdata(pdev, lcd_device);
125 struct lcd_device *lcd_device = platform_get_drvdata(pdev);
133 .probe = jornada_lcd_probe,
134 .remove = jornada_lcd_remove,
136 .name =
"jornada_lcd",