hd44780.c (d47d88361feea2ce11f39bd70467ffc19a61d2d3) hd44780.c (c7c3f096eb5e721d8522ba060fa621ea906ef738)
1/*
2 * HD44780 Character LCD driver for Linux
3 *
4 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
5 * Copyright (C) 2016-2017 Glider bvba
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 250 unchanged lines hidden (view full) ---

259 hd->pins[PIN_CTRL_BL] = devm_gpiod_get_optional(dev, "backlight",
260 GPIOD_OUT_LOW);
261 if (IS_ERR(hd->pins[PIN_CTRL_BL])) {
262 ret = PTR_ERR(hd->pins[PIN_CTRL_BL]);
263 goto fail;
264 }
265
266 /* Required properties */
1/*
2 * HD44780 Character LCD driver for Linux
3 *
4 * Copyright (C) 2000-2008, Willy Tarreau <w@1wt.eu>
5 * Copyright (C) 2016-2017 Glider bvba
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License

--- 250 unchanged lines hidden (view full) ---

259 hd->pins[PIN_CTRL_BL] = devm_gpiod_get_optional(dev, "backlight",
260 GPIOD_OUT_LOW);
261 if (IS_ERR(hd->pins[PIN_CTRL_BL])) {
262 ret = PTR_ERR(hd->pins[PIN_CTRL_BL]);
263 goto fail;
264 }
265
266 /* Required properties */
267 ret = device_property_read_u32(dev, "display-height", &lcd->height);
267 ret = device_property_read_u32(dev, "display-height-chars",
268 &lcd->height);
268 if (ret)
269 goto fail;
269 if (ret)
270 goto fail;
270 ret = device_property_read_u32(dev, "display-width", &lcd->width);
271 ret = device_property_read_u32(dev, "display-width-chars", &lcd->width);
271 if (ret)
272 goto fail;
273
274 /*
275 * On displays with more than two rows, the internal buffer width is
276 * usually equal to the display width
277 */
278 if (lcd->height > 2)

--- 47 unchanged lines hidden ---
272 if (ret)
273 goto fail;
274
275 /*
276 * On displays with more than two rows, the internal buffer width is
277 * usually equal to the display width
278 */
279 if (lcd->height > 2)

--- 47 unchanged lines hidden ---