arm-charlcd.c (c74a7469f97c0f40b46e82ee979f9fb1bb6e847c) arm-charlcd.c (ada953de4486a3e2a42c3b8146adb36d0dcbded2)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Driver for the on-board character LCD found on some ARM reference boards
4 * This is basically an Hitachi HD44780 LCD with a custom IP block to drive it
5 * http://en.wikipedia.org/wiki/HD44780_Character_LCD
6 * Currently it will just display the text "ARM Linux" and the linux version
7 *
8 * Author: Linus Walleij <triad@df.lth.se>

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

326 release_mem_region(lcd->phybase, SZ_4K);
327out_no_resource:
328 kfree(lcd);
329 return ret;
330}
331
332static int charlcd_suspend(struct device *dev)
333{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Driver for the on-board character LCD found on some ARM reference boards
4 * This is basically an Hitachi HD44780 LCD with a custom IP block to drive it
5 * http://en.wikipedia.org/wiki/HD44780_Character_LCD
6 * Currently it will just display the text "ARM Linux" and the linux version
7 *
8 * Author: Linus Walleij <triad@df.lth.se>

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

326 release_mem_region(lcd->phybase, SZ_4K);
327out_no_resource:
328 kfree(lcd);
329 return ret;
330}
331
332static int charlcd_suspend(struct device *dev)
333{
334 struct platform_device *pdev = to_platform_device(dev);
335 struct charlcd *lcd = platform_get_drvdata(pdev);
334 struct charlcd *lcd = dev_get_drvdata(dev);
336
337 /* Power the display off */
338 charlcd_4bit_command(lcd, HD_DISPCTRL);
339 return 0;
340}
341
342static int charlcd_resume(struct device *dev)
343{
335
336 /* Power the display off */
337 charlcd_4bit_command(lcd, HD_DISPCTRL);
338 return 0;
339}
340
341static int charlcd_resume(struct device *dev)
342{
344 struct platform_device *pdev = to_platform_device(dev);
345 struct charlcd *lcd = platform_get_drvdata(pdev);
343 struct charlcd *lcd = dev_get_drvdata(dev);
346
347 /* Turn the display back on */
348 charlcd_4bit_command(lcd, HD_DISPCTRL | HD_DISPCTRL_ON);
349 return 0;
350}
351
352static const struct dev_pm_ops charlcd_pm_ops = {
353 .suspend = charlcd_suspend,

--- 17 unchanged lines hidden ---
344
345 /* Turn the display back on */
346 charlcd_4bit_command(lcd, HD_DISPCTRL | HD_DISPCTRL_ON);
347 return 0;
348}
349
350static const struct dev_pm_ops charlcd_pm_ops = {
351 .suspend = charlcd_suspend,

--- 17 unchanged lines hidden ---