Lines Matching defs:lcd
40 static void hd44780_backlight(struct charlcd *lcd, int on)
42 struct hd44780 *hd = lcd->drvdata;
104 static void hd44780_write_cmd_gpio8(struct charlcd *lcd, int cmd)
106 struct hd44780 *hd = lcd->drvdata;
115 static void hd44780_write_data_gpio8(struct charlcd *lcd, int data)
117 struct hd44780 *hd = lcd->drvdata;
132 static void hd44780_write_cmd_gpio4(struct charlcd *lcd, int cmd)
134 struct hd44780 *hd = lcd->drvdata;
143 static void hd44780_write_cmd_raw_gpio4(struct charlcd *lcd, int cmd)
146 struct hd44780 *hd = lcd->drvdata;
160 static void hd44780_write_data_gpio4(struct charlcd *lcd, int data)
162 struct hd44780 *hd = lcd->drvdata;
181 struct charlcd *lcd;
201 lcd = charlcd_alloc(sizeof(struct hd44780));
202 if (!lcd)
205 hd = lcd->drvdata;
245 &lcd->height);
248 ret = device_property_read_u32(dev, "display-width-chars", &lcd->width);
256 if (lcd->height > 2)
257 lcd->bwidth = lcd->width;
260 device_property_read_u32(dev, "internal-buffer-width", &lcd->bwidth);
262 lcd->ifwidth = ifwidth;
263 lcd->ops = ifwidth == 8 ? &hd44780_ops_gpio8 : &hd44780_ops_gpio4;
265 ret = charlcd_register(lcd);
269 platform_set_drvdata(pdev, lcd);
273 charlcd_free(lcd);
279 struct charlcd *lcd = platform_get_drvdata(pdev);
281 charlcd_unregister(lcd);
283 charlcd_free(lcd);