20 #include <linux/hid.h>
32 static int picolcd_get_contrast(
struct lcd_device *ldev)
35 return data->lcd_contrast;
44 if (!report || report->
maxfield != 1 || report->
field[0]->report_count != 1)
47 data->lcd_contrast = contrast & 0x0ff;
52 spin_unlock_irqrestore(&data->
lock, flags);
61 static struct lcd_ops picolcd_lcdops = {
62 .get_contrast = picolcd_get_contrast,
63 .set_contrast = picolcd_set_contrast,
64 .check_fb = picolcd_check_lcd_fb,
74 if (report->
maxfield != 1 || report->
field[0]->report_count != 1 ||
75 report->
field[0]->report_size != 8) {
76 dev_err(dev,
"unsupported CONTRAST report");
82 dev_err(dev,
"failed to register LCD\n");
85 ldev->
props.max_contrast = 0x0ff;
86 data->lcd_contrast = 0xe5;
88 picolcd_set_contrast(ldev, 0xe5);
105 return picolcd_set_contrast(data->lcd, data->lcd_contrast);